Unslingging NSLU2
From KdjWiki
Project wiki: [1]
NOTE: These instructions are for using a USB flash drive as the boot/root system.
Contents |
NAS Preparation
NOTE: Don't attach a disk yet
- Download the latest linksys firmware (currently 2.3 R63) from linksys.com: [2] and extract
- Attach and power-on device
- Determine IP address - via your router's connected devices list : will default to 192.168.1.77 (?)
- Browse the devices IP address - should get the NAS administration site
- Set gateway address, server name, date, time etc as required
- Upgrade to latest linksys firmware from admin site on NAS: Administration -> Advanced -> Upgrade (default login: admin/admin)
Update Firmware
NOTE: Still don't attach a disk yet
- Download the latest release from here: [3] and extract
- Unsling by upgrade to slug firmware from admin site on NAS
Disk Preparation
- Shutdown, attach disk to port 2, and restart
- Format using admin site on NAS: Administration -> Advanced -> Disk -> Format Disk 2(default login: admin/admin)
- If after formatting it says Formatted FAT/Win32, power down, power up and format again
Unsling
- Shutdown, remove disk, and restart
- Enable telnet via admin site on NAS: Manage Telnet' -> Enable Telnet
- Connect to NAS via telnet (login: root/uNSLUng)
- Connect disk to port 2 and wait until it's registered on NAS admin site
- In the telnet session, run the unsling command:
# /sbin/unsling disk2
- When it asks you for a password, enter one (which will become your new root password for telnet sessions)
- Close the telnet session:
# exit
- Reboot the NAS (keeping the disk connected)
- Confirm success by accessing the NAS admin site -> uNSLUng status: Unslung to disk2, /dev/sda1 message on bottom of screen
- Enable telnet via NAS admin site
Configuration for USB flash drive
- Connect to NAS via telnet (using root and your entered password)
- Make a home folder for root user:
# mkdir /root
- Inform device we're using flash:
# touch /.ext3flash
- Close the telnet session and reboot the NAS
- Enable telnet via NAS admin site
ipkg
- From telnet session:
# ipkg update # ipkg install unslung-feeds # ipkg update
- Useful tools:
# ipkg install bash # ipkg install nano # ipkg install ntpclient
- Run ntpclient daily:
# echo "5 3 * * * root /opt/bin/ntpclient -s -l -h 0.pool.ntp.org > /var/log/ntp.log && hwclock --systohc --utc" >> /etc/crontab
- You should also comment out the following line in your /etc/crontab file:
1 * * * * root /usr/sbin/hwclock -s &>/dev/null
- Switch shell:
# cat /etc/passwd | sed "s/\/bin\/sh$/\/bin\/bash/g" > /root/passwd && cat /root/passwd > /etc/passwd && rm /root/passwd
- Fix environment:
# cd # echo "export PATH=\"/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin\"" > .profile # echo "export TERM=ansi" >> .profile # echo "PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '" >> .profile # echo "alias ll=\"ls -al\"" >> .profile
- Logout and re-connect to activate