Cloning a working Debian Slug (NSLU2)
some notes for when I have to do it again
1) Copy the slug firmware and USB harddrive contents from a working Slug to a new Slug
2) Modify files to set a new LAN address - in this case change from 192.168.0.51 to 192.168.0.52
3) Modify with new files to test new applications etc.
I bought a "new" Slug off eBay and wanted to clone the working Slug I had spent hours setting up to the new hardware.
Clone the USB hard disk
1) Copy all files from the existing USB hard disk (57 GBytes) to a folder in Linux on VMWare on my Mac
2) Plug a new USB hard disk (80 GBytes) into the Mac and drag and drop all files onto this - I think this disk was Ext2 not Ext3 - not sure if it matters.
3) Test this disk on the original Debian Slug - it works!
Copy the Firmware
On the original Slug do -
cd /data <--on the hard disk
cat /dev/mtdblock* > image.bin
plug the disk into the Mac and copy the firmware file image.bin to a folder in Linux on the Mac
Set the Slug for firmware upgrade
- hold the reset and power switches on - count to 10 - see the Ready/Status flashing between 2 colours
(I think it was red and green in the new Slug (it must be an old model) - dark orange/light orange in more recent ones)
In a Linux terminal cd to the folder containing image.bin in the Linux on the Mac
Wait 5 minutes after it has loaded - switch off - plug in the hard disk - power up - disconnect the old slug from the LAN since both are at 192.168.0.51 at present
In the Mac terminal - ssh email@example.com - it works!
Now change 192.168.0.51 to 192.168.0.52
There are config files all over the place !
These are the ones I found -
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet static
# dns-* options are implemented by the resolvconf package, if installed
This one needs no change - it is the ADSL router
syslog = 0
syslog only = yes
workgroup = WORKGROUP
server string = Slug 52 samba
security = share
encrypt passwords = yes
guest account = nobody
local master = yes
name resolve order = lmhosts hosts bcast
comment = /
path = /
browseable = yes
public = yes
writeable = yes
etc/lighttpd/lighttpd.conf - (if you need to set a differnt port than the usual 80)
## bind to port (default: 80)
server.port = 8051
ssh ftp and (even) samba now all work on 192.168.0.52 !!!!
- now to see if I can get an old webcam to run.........