Upgrading Linkstation to Lenny
I’ve had a Buffalo Linkstation Live NAS for few years, which I bought just because I could use it as a fully featured low power Linux server with FreeLink, which is just normal Debian Linux with patched kernel etc.
While it has mostly worked fine, FreeLink currently is based on Etch and is starting to be a little aged. Also the box had 250GB harddrive which was feeling a little small. Perfect opportunity for little tinkering, so after little reading I bought an 1TB hard drive for it and decided to install Lenny on it.
I mostly just followed davy_gravy’s instructions of installing the current preview, but because of a slight misunderstanding I had some problems. The gist of it was that the instructions mention that you need serial or netconsole access to u-boot (the bootloader in the flash), but you don’t. It might be a good idea to have if something goes wrong though. And more importantly, tftp -booting should work as is on stock system. Though I had some trouble using tftp-hpa as the tftp server on my mac, I ended up using the one mentioned in NAS recovery instructions, it was a windows program though.
If you, like me, are doing the bulk of the installation on a desktop linux, say with a SATA-USB adapter, the only thing you need the tftp booting is for booting the foonas-em image that has the tools for setting the u-boot boot parameters (fw_printenv, fw_setenv, which are what the fooboot script uses), those I couldn’t find compiled for the old freelink nor couldn’t I find the right patched u-boot source to compile from.
Steps
Anyway, in summary the process (that was actually needed for me) was
- Partition, format the new disk
- Unpack the image to root partition and copy the /boot over to the boot partition, edit net/
fstabconfig - Disassemble box, remove old disk, connect new disk
- Set up a working tftp server at 192.168.11.1, serve the foonas-em (the special installer version) image as uImage.buffalo and boot it
- Do the
foobootmagic in the davy_gravy’s instructions - Reboot with your fancy new installation.
- After making sure everything is OK, assemble back.
Woo! It works!
Post-install
Now for some post-install set up.
1 passwd # Absolutely change the root password! 2 apt-get update # Update package listings 3 apt-get install debian-archive-keyring 4 # Install current keys 5 apt-get upgrade 6 # Upgrades a *lot* of packages 7 apt-get dist-upgrade 8 # Few new dependencies ended up requiring this 9 dpkg-reconfigure tzdata # For correct timezone
Now this next step was probably not strictly required, but it kinda feels odd to use the same ssh host keys as everyone else using the same lenny-image, so I decided to regenerate it, following some advice I found. I guess you could try to preserve the host keys from previous installation if you had one, then you wouldn’t need to reset the known_hosts file everywhere.
1 rm /etc/ssh/ssh_host_* 2 dpkg-reconfigure openssh-server
Next, I edited /etc/sources.list, changed it to use a local (Finnish) mirror, added contrib and non-free, added security and volatile repos, so the file looked like this:
1 deb http://ftp.fi.debian.org/debian lenny main contrib non-free 2 deb http://security.debian.org lenny/updates main contrib non-free 3 deb http://ftp.fi.debian.org/debian-volatile lenny/volatile main non-free contrib
And apt-get update & upgrade once again.
Then install some stuff,
avahi-daemonis useful to get the mac like link-local names,foobar.localetc.nginxIs my choice of low-overhead and high-performance web serverscreenis useful everywheresudois something I’m very used to use. Funny detail, users insudogroup by default aren’t asked for any password.sambais for, well, the file sharing, it is a NAS after all.usbmountI’m not sure if it is a good idea yet, but is supposed to automagically mount inserted usb drivesless, well I like to scroll back and forth when reading manpages ;)mt-daapdfor sharing music to itunesmediatombfor sharing media to ps3
Summary
So what did I gain from this ordeal, that I didn’t have before?
- More disk space!
- Etch to Lenny, updating the whole system a great deal
- Everything is now EABI
- Recent vanilla kernel, with good deal of modules and features included, instead of dated and patched barebones kernel.
- From the last bullet follows, that I now have working IPv6 networking, FUSE (ntfs-3g, sshfs, etc) and stuff like updated drivers, I’ve heard some have USB-DVB for recording tv shows, or USB-soundcards for playing music etc.
Excellent! So far I’m very happy with the little box.
