So you want to setup a Linksys NSLU2 as an embedded linux system? GREAT! You have a variety of options:
You can find all of the above on the slug firmware website. As of 03/03/07, installing Debian on an external disk is currently b0rked. It would be a great option to use considering I want to get emstar up and running on my NSLU2. But that's another story... To continue with the task at hand. I've highlighted that you can have a fully functional linux distribution on an external disk, but you can also use two other "distributions:" OpenSlug and Unslung. Openslug is not for the faint of heart and is based on the work of the folks at OpenEmbedded. Openslug does not retain any of the Linksys firmware, and thus, you cannot access the "friendly" administrative website located at 192.168.1.77 (user: admin, password: admin). Of course, they also limit you to Winblows only filesystems: why would you want that anyway? Moving on again, we come to OpenSlug. Here is how I proceeded:
Trying 192.168.0.1... Connected to 192.168.0.1 (192.168.0.1). Escape Character is '^]'. == Executing boot script in 1.820 seconds - enter ^C to abort ^C Redboot> upgrade
sudo ./upslug2 -t xx:xx:xx:xx:xx:xx -i debianslug-3.10-beta.bin The series of xx letters split by a colon represent the slugs mac address. You can determine this by doing sudo ./upslug2 -l. If you do this properly, you should see the following on the command line: Upgrading LKG7EF947 00:0f:66:7e:f9:47
. original flash contents * packet timed out
! being erased - erased
u being upgraded U upgraded
v being verified V verified
Display:
So I found a really old tutorial on getting Debian Sid running on my slug. Currently I have it running off two USB flash drives: One 512M Memorex for / and another 512M Sandisk for swap. Unfortunately I need to find a wireless adapter for the little bugger and get a bigger flash drive. Woo hoo!!! Here is a printout of the terminal output:
root@192.168.1.106's password:
Linux SLUG 2.6.16 #1 PREEMPT Thu Jun 8 23:38:13 PDT 2006 armv5tel
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
SLUG:~#
SLUG:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 463M 185M 255M 42% /
tmpfs 15M 0 15M 0% /lib/init/rw
tmpfs 15M 0 15M 0% /dev/shm
/dev/root 6.4M 5.0M 1.4M 79% /initrd
SLUG:~#
When following the following tutorial make sure you make the largest partition /dev/sda1 and NOT /dev/sda2. That way you will be able to install a lot of extra packages through ipkg (you can always change the default installation location but who wants to do that???
Here is my configuration:
mke2fs -j /dev/sda1
mke2fs -j /dev/sda2
tune2fs -c 0 -i 0 /dev/sda1
tune2fs -c 0 -i 0 /dev/sda2
mkswap /dev/sda3
then:
cd /sbin
mv fdisk fdisk.old
echo "#!/bin/sh" > fdisk
chmod +x fdisk
then:
cd /sbin
rm fdisk
mv fdisk.old fdisk
unsling disk1
then:
cat > /unslung/rc.unslung << EOF
#!/bin/sh
/sbin/swapoff /dev/sda3
return 1
EOF
chmod +x /unslung/rc.unslung
then:
dd if=/dev/zero of=/unslung/swap.file bs=1M count=25
mkswap /unslung/swap.file
swapon /unslung/swap.file
echo "swapon /unslung/swap.file" > /unslung/rc.local
I fixed it with these directions.