reader beware: This howto may be aged. The
/share/flash/conf/config.bin file does not appear to be available in V2.3R63 (uNSLUng-6.8).
config.bin is where the Linksys and derived NSLU2 software stores its "permanent" configuration information - things like smb.conf, passwd, and such. Every time the NSLU2 is rebooted, the content of the conf directory is overwritten with the content of config.bin, overriding any changes to key system configuration files.
There are three main ways to make a change to an unslung NSLU2 "sticky" across reboots:
- Use a diversion script in /unslung
- Edit the contents of config.bin
- Use some trick appropriate to the application (like /etc/samba/user_smb.conf)
Despite its name, config.bin is simply a tar file (created on the NSLU2 using busybox) containing the following key files:
If you wish to permanently change the content of one of these files, simply edit the content of config.bin and re-upload it through the web panel.
Warning! If you accidentally upload a faulty config.bin, you may end up with an unbootable slug! Make sure you save a copy of a working file on your PC, and get familiar with the content of ResetSysConf. And back up your data!
Let's say you want to change a parameter in smb.conf like the workgroup setting. This assumes you're booting from the flash disk in /dev/sda... Use "/share/hdd" instead of "/share/flash" otherwise...
- Download a copy of your current config.bin from the web GUI - Administration -> Advanced -> Backup -> Download
- Back up your config.bin in place by typing
cp /share/flash/conf/config.bin /share/flash/conf/config.bin.bak
- Change to /tmp by typing
- Expand the current config.bin by typing
tar -xvf /share/flash/conf/config.bin
- You now have a workable copy of the config files. Change to /tmp/config/flash to view them. Edit them at will - but maybe do one step at a time in interests of sanity!
- Now you will create a new config.bin. Type
cd /tmp ; tar -cvf config.bin config
- Copy this to your PC with scp and apply it through the web panel using the upload button
- On reboot, your changes should stick.