LinkStation

Network Storage Center


The LinkStation is a Linux based Network-attached storage (NAS) system manufactured by Buffalo Technology . It is small, reasonably quiet and has a relatively high capacity hard drive. Depending on the model, it has either a PowerPC or a MIPS processor, 64 or 128 MB RAM, 4 MB flash ROM, two USB 2.0 ports and a network interface which supports either 10/100 Mbps or 10/100/1000 Mbps. Overall, the LinkStation can be a good choice for a file server for a small network.

Unfortunately, Buffalo designed the LinkStation as a consumer electronic device. It is difficult to disassemble and disassembling it voids your warranty. It supports only Windows and Mac networks and it can only be controlled using a web interface. The kernel is stored in the on-board flash and there is no option to boot a different kernel from the hard disk. Buffalo changed the magic value used to identify the file system type on the first partition of the hard disk so, even if it is still a normal ext3 file system, only a modified kernel can access it. There is no NFS server and some versions of the software don't have telnet or telnet is not enabled.

A closed Linux appliance goes against the spirit of Linux and against the GNU Public License (GPL) under which Linux is released. A very active user community decided to “open” the LinkStation. Ways to gain telnet access were found, new software and kernel modules were compiled and, for those who want it, the original software can be replaced with other Linux distributions like Debian, Gentoo or Fedora. The Linkstation wiki has a lot of useful information and there are many other sites.

The only problem not fully resolved yet is the bootloader. The original bootloader is stored in the on-board flash and appears to be based on an old version of U-Boot. Either intentionally or due to a bug, it can only boot the kernel from flash. The current method to boot a different kernel is to boot the original kernel from flash and then use a kernel module called loader.o, written by Chih-Chung Chang. The module loads the new kernel over the running one and starts it. As the old kernel is not shut down orderly, devices are left running and the disk buffers are not flushed. Ext3 is robust enough to recover from such brutal treatment but the USB controller, at least the USB UHCI, uses a frame list, transfer descriptor and queue headers which are all located in the main memory. The UHCI allocates the PCI bus every millisecond and reads the current frame pointer. This may crash the new kernel during boot.

Loader.o can be changed to receive notifications when the kernel reboots. The old kernel is overwritten only at the end of the shut down sequence and this allows the new kernel to boot properly. Eiji Kawauchi ported the module to the LinkStation v2 (mips) and changed the code to shutdown the runing kernel orderly before booting the new kernel. However, using Linux to boot Linux requires different boot environments for each kernel and I believe that having a proper bootloader in flash is a better solution. This is why I ported U-Boot to the LinkStation and U-Boot for the LinkStation and U-Boot for the Linkstation v2 (mips) are now available to those who want to use them.

Buffalo ships the LinkStation with a modified version of linux-2.4.17 and the LinkStation HG with a modified version of linux-2.4.20. A few enthusiasts ported newer kernls. Both linux-2.4.33 and linux-2.6.17 are now available. Unfortunately, all these ports suffer from a common problem: they are specific to the LinkStation model. Imagine having to hunt for a kernel specifically compiled for your PC every time you decide to upgrade. I have decided to put an end to this situation hoping that other will do the same. On the LinkStation Kernels page you can find kernels which run on both the LinkStation 1 / KuroBox standard and the LinkStation HG / KuroBox HG.

On the same page, LinkStation Kernels, you will also find my ports of linux-2.6.x to the LinkStation v2. The ports are based from kernels from www.linux-mips.org which is the home of Linux on mips.

Enjoy!...