OpenSlug 2.5 is designed to be run from an external hard drive or flash stick. Initially, after the firmware flash, the unit will restart and boot from the JFFS2 partition. Currently, the static IP information in the Linksys system configuration partition is used to setup the DHCP/Static IP configuration, the Domain and the hardware MAC address.
After reflashing to the OpenSlug 2.5 I was not able to SSH in to the slug. The network parameters were set up properly before the box was flashed from Linksys firmware to the OpenSlug (using the Linksys web interface) !!Remember, NSLU2 keeps its network settings even it is reflashed with another firmware !! I was trying to SSH on the home local network where DHCP server is connected as well.
I have found it is necessary to disconnect DHCP server from the network. Then reboot NSLU2 and from an other machine connect to the NSLU2 via SSH. Then run 'turnup init' and change the boot protocol from 'dhcp' to 'static' (see below).
> login as: root
After that it is possible to connect DHCP server back to the network and reboot NSLU2. Now it is possible to SSH on to the static IP address which you have set at the beginning.
N.B. When OpenSlug boots only portmapper and dropbear are running. Be sure to be familiar with ssh'ing into the box. Test this before loading OpenSlug firmware.
Note: The Disk1 and Disk2 LEDs are not driven when devices are present or removed. Just be aware of this state of affairs.
[beewoolie] BTW, the default root password is opeNSLUg.
Running from hard drive
Note: Only boot to the sda right now. Make sure that's in USB port 1. We will be working out a procedure for proper recognition of multiple drives shortly. Currently, only 1 drive plugged into USB port 1 will be device sda. If one added a drive at a later time to USB port 2, that device would likely turn into sdb. So, stick with sda in USB port 1 for right now.
The example below shows running from sda1 as the root partition. Users with data on sda1 (UNSLUNG users) will want to use sda2 (or sdb2). N.B. You will lose all your UNSLUNG system files and configuration data. Please backup that partition and save it away 'BEFORE' trying to use OpenSlug. Or use a virgin hd. This example assumes the drive is formatted ext3 and clean.
#Mount the drive on sda1 or sda2 #Clear it off mount -t ext3 /dev/sda1 /media/hdd cd / ; find . -print0 -mount | cpio -p -0 -d -m -u /media/hdd rm -rf /media/hdd/dev find /dev -print0 | cpio -p -0 -d -m -u /media/hdd touch /.sda1root # vi /media/hdd/etc/fstab and add a swap partition you are using one. sync umount /media/hdd shutdown -r now
[beewoolie] You can simplify the transition to the hard drive a little bit. I made the swap creation steps more explicit and I assume you've already partitioned the drive into sda1 for / and sda2 for swap. I found that performing the mkswap with the drive connected to my notebook computer initialized swap in a way that is not compatible with the openslug kernel.
# mkswap /dev/sda2 # mount -t ext3 /dev/sda1 /media/hdd # rm -rf /media/hdd/dev # find / /dev/ -print0 -xdev | cpio -p -mud0 /media/hdd # echo /dev/sda2 swap swap defaults 0 0 >> /media/hdd/etc/fstab # touch /.sda1root # umount /media/hdd # reboot
[Takai] After following the steps from beewoolie i also had to run the following commands:
# turnup disk /dev/sda1 # reboot
Running from NFS
Export the root directory from your server Change the mount line in the script above to mount your empty root. EX: mount 192.168.0.63:/home/link2a /media/net Run the script. edit /.nfsroot on the slug. EX: nfsrootloc=192.168.0.63:/home/link2a nfsrootopts=nolock,intr,rsize=1024,wsize=1024 This was added 2/27/2005. Switchbox doesn't handle the nfs connection properly. I added some patches to .nfsroot to temporarily fix them. Here is the file until fixes are completed. Substitute your server information. /usr/bin/killall portmap /sbin/insmod sunrpc /sbin/insmod lockd /sbin/insmod nfs nfsrootloc=192.168.0.63:/home/link2a nfsrootopts=nolock,intr,rsize=1024,wsize=1024 /sbin/ifconfig eth0 up $ipaddr netmask $netmask
Reboot, and you should be running on an NFS root.
Running from Flash Stick
The turnup script has direct support for this (as of 2.7beta), you just need to do something like this:
$ fdisk /dev/sdX # where X is the flash stick device number [verify the partitions look like you want, or change them] [DOS partitions do not seem to work, even though the scripts apparently run ok and you can mount the file system and view the files. You seem to have to delete the partition and re-create it as a linux partition using fdisk to persuade the system to boot off it.] $ mkfs.ext3 /dev/sdXN # format the flash stick, N is the partition you want to use $ turnup memstick -i /dev/sdXN -t ext3 # copy the filesystem and set the bootloader to use it
Note that if you're doing this by hand instead of using the turnup script you'll want to make sure to use the noatime mount option to prevent system from doing a write every time something is read (flash parts can only sustain a fixed amount of writes, ~10k-100k).