NSLU2-Linux
view · edit · print · history

HowTo.ChangeConfigBin History

Hide minor edits - Show changes to markup

November 01, 2007, at 03:57 PM by Darek --
Added lines 1-2:

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).

July 16, 2007, at 09:58 PM by pedxing --
Changed lines 3-6 from:

There are two main ways to make a change to an unslung NSLU2 "sticky" across reboots: 1) Use a diversion script in /unslung 2) Edit the contents of config.bin

to:

There are three main ways to make a change to an unslung NSLU2 "sticky" across reboots:

  1. Use a diversion script in /unslung
  2. Edit the contents of config.bin
  3. Use some trick appropriate to the application (like /etc/samba/user_smb.conf)
Changed lines 24-34 from:

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!

to:

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...

  1. Download a copy of your current config.bin from the web GUI - Administration -> Advanced -> Backup -> Download
  2. Back up your config.bin in place by typing cp /share/flash/conf/config.bin /share/flash/conf/config.bin.bak
  3. Change to /tmp by typing cd /tmp
  4. Expand the current config.bin by typing tar -xvf /share/flash/conf/config.bin
  5. 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!
  6. Now you will create a new config.bin. Type cd /tmp ; tar -cvf config.bin config
  7. Copy this to your PC with scp and apply it through the web panel using the upload button
  8. On reboot, your changes should stick.
July 16, 2007, at 09:52 PM by pedxing --
Changed line 4 from:

1) Use a diversion script? in /unslung

to:

1) Use a diversion script in /unslung

July 16, 2007, at 09:51 PM by pedxing --
Added lines 1-23:

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 two main ways to make a change to an unslung NSLU2 "sticky" across reboots: 1) Use a diversion script? in /unslung 2) Edit the contents of config.bin

Editing config.bin

Despite its name, config.bin is simply a tar file (created on the NSLU2 using busybox) containing the following key files:

 config/
 config/flash/
 config/flash/CGI_ds.conf
 config/flash/passwd
 config/flash/group
 config/flash/smbpasswd
 config/flash/.htpasswd
 config/flash/smb.conf
 config/flash/share.info
 config/flash/usrgrp.info

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!

view · edit · print · history · Last edited by Darek.
Originally by pedxing.
Page last modified on November 01, 2007, at 03:57 PM