Upgrade to the 2.6-kernel (ppc only)

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 10:44, 21 November 2006 by (Talk) (Overview)

Jump to: navigation, search

This article Based on work by andre. Originally by mindbender. at Linkstationwiki.org

Nuvola apps important.png 

USE AT YOUR OWN RISK IN ANY RESPECT. If unsure, just leave everything as it is. Detailled information on the boot process is available on this page.

Kernel 2.6

Upgrade from Buffalo's outdated kernel 2.4, currently included in the Debian (FreeLink) release, on LS1, HG, HS, KuroBox, and KuroHG. There's a package with additional files for users on Openlink, Sylver, or Stock Firmwares.

Firmware flashing currently requires kernel 2.4; you've got to disable kernel 2.6 temporarily for it, as described in User Control phase at the bottom of this page.


Our 2.6* kernels address virtually all shortcomings of the LS stock kernels: Very good USB support, NFS, routing, quotas, lots more.

About 600 modules are available, yet optional. As the "LS core functions", support for mass storage devices and printing, have been compiled into the kernel, you could delete the modules if you were short on disk space.

Installation (automatic)

  • A webinstaller is provided; it can set up everything for you, and will make optimal use of the download server's limited upstream bandwidth. The webinstaller is the recommended download and/or installation method for all users. It comes with a safe 'dry run' option, so you can evaluate what a 'real install' would do. For complete instructions, learn about it and where to download it from:


  • Provided you've installed the kernel, check what version you're running after a reboot:
uname -a
Linux linkstation #12 Fri Aug 25 18:04:58 CEST 2006 ppc GNU/Linux
  • If you see a 2.6.x kernel, it worked.
  • If you see a 2.4.x kernel, it didn't work. Gather information, and get help. While booted into the stock kernel, check the output of
cat /boot*/boot.log
dmesg | head
uname -a
  • For advanced trouble-shooting, check out the "Bootloader System Control Phase" section below.


  • Kernel modules can be loaded with
modprobe modulename

without the .ko extension, e.g.,

modprobe fuse
  • If you don't need any functionality beyond what you could achieve using the 'original' web interface and want to conserve disk space, you can delete the modules altogether, using
rm -r /lib/modules/2.6*


  • If you keep up with development, remove the obsoleted old modules from time to time. Old modules consume a lot of space. Always keep the 2.4* modules and the 2.6.* modules with the highest version number, and you're on the safe side.
rm -r /lib/modules/2.6.old.versions-only

The boot process and how to control it


All Linkstations, Kuro Boxes, and Kuro HGs are supported by the bootloader, if running a Buffalo (Stock Firmware, OpenLink, Sylver) or Debian (FreeLink) style init system. Gentoo's BSD style is not supported by the bootloader out-of-the-box, although the bootloader comes with everything else you need to boot a custom 2.6 kernel. If you know Gentoo well enough to contribute, please visit https://hvkls.dyndns.org/contact.html.

The "bootloader" is really a kernel loader: The system boots into the Buffalo kernel in the Flash ROM, then checks your LS flavor and loads the special kernel module /boot/loader*.o, which in turn boots the new kernel /boot/vmlinux.bin*. The process is fail-safe to our best knowledge: The operation is performed on a read-only file system. If booting the new kernel fails, the old one simply continues booting; or your next boot will take you back to the old kernel. Errors are logged, if possible.

If kernel 2.6 is already running, or the U-Boot bootloader is detected, the kernel loader will quit silently, which makes it 100% compatible.

The bootloader itself is controlled in two phases, the first shall be used by the system only, the second by the user.

System control phase

On startup, the bootloader checks for the presence of the files /boot/try_new_kernel*. The files are initially created for you in /boot. They must contain

echo -n "vmlinux.bin*" > /boot/try_new_kernel*

with * expanding to LS, HG, II, KB, KG, or KO respectively (i.e., you've got to fill in the right code).

If the file reflecting for the target system doesn't exist, or contains unexpected content, or a file /boot/try_new_kernel*.running exists, the old kernel continues booting. If it does, the root filesystem is remounted read-write, the control file is moved to /boot/try_new_kernel*.running, and the root filesystem is remounted read-only. Thereafter, an attempt to load the new kernel is made. If this attempt is successful, /boot/try_new_kernel* is restored on shutdown and reboot.

Do not interfere unless you have to, which is only the case if your first boot into the new kernel failed, or your system wasn't able to run complete its reboot or shutdown procedure (e.g., due to a power outage).

In case you have to recover from a power failure or other event which prevented the system from shutting down gracefully:

rm /boot/*running
echo -n "vmlinux.bin*" > /boot/try_new_kernel*

with * expanding to LS, HG, II, KB, KG, or KO respectively (i.e., you've got to fill in the right code).

No action is performed if /boot/uImage is detected. The kernel loader assumes you've got the U-Boot bootloader installed, and quits silently.

User control phase

In a second step, the bootloader reads /etc/default/boot_new.sh to determine what system it runs on. You can configure the NO_START variable here but should not have to touch the others.

If you change NO_START="0" to NO_START="1" in /etc/default/boot_new.sh, the LS will boot into kernel 2.4.* from the system start up on. You can switch between the two settings whenever you want. Don't forget to reboot to activate them.


Errors will be written to /boot/boot.log, if possible.