Upgrading Linkstation to Lenny

Linkstation LiveI’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 hard­drive which was feeling a little small. Perfect oppor­tunity 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 mis­under­standing I had some problems. The gist of it was that the inst­ructions mention that you need serial or net­console 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.

Linkstation Live open 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 para­meters (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/fstab config
  • 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 fooboot magic 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 pre­serve the host keys from previous instal­lation 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-daemon is useful to get the mac like link-local names, foobar.local etc.
  • nginx Is my choice of low-overhead and high-performance web server
  • screen is useful everywhere
  • sudo is something I’m very used to use. Funny detail, users in sudo group by default aren’t asked for any password.
  • samba is for, well, the file sharing, it is a NAS after all.
  • usbmount I’m not sure if it is a good idea yet, but is supposed to automagically mount inserted usb drives
  • less, well I like to scroll back and forth when reading manpages ;)
  • mt-daapd for sharing music to itunes
  • mediatomb for 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-sound­cards for playing music etc.

Excellent! So far I’m very happy with the little box.

Tagged as: Linkstation, linux

Woo, mingw-gcc-4.4!

Oh man, as an occasional reader of mingw-users list, newer gcc in the mingw project is the most requested thing. And while the gcc-3.4.5 based release has served well, for many years, it’s really nice to see it updated to this millenia. Props for the mingw-team!

Tagged as: code, mingw

Launch!

So, I finally managed to set up this site.

I decided to make my own blog app, using merb, so things might be a bit still a bit broken.

Now to get inspiration for actual content =)

Tagged as: announcement