Difference between revisions of "Upgrade to the 2.6-kernel (ppc only)"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(System control phase)
m
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Template:Articles}}''<font color=red><small>
+
{{Template:Articles}}''
This article
+
Based on work by andre.
+
Originally by mindbender.
+
at Linkstationwiki.org
+
</small></font>''<br>
+
 
{{Warning|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.}}
 
{{Warning|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 =
+
Please refer to the following documents:
  
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. Gentoo''' is supported aswell, altough it hasn't been tested thoroughly yet.  
+
* http://hvkls.dyndns.org/downloads/documentation/README-webinstaller.html
  
Firmware flashing currently requires kernel 2.4; you've got to disable kernel 2.6 temporarily for it, as described in [http://linkstationwiki.net/index.php?title=Upgrade_to_the_2.6-kernel_%28ppc_only%29#User_control_phase User Control phase] at the bottom of this page.
+
* http://hvkls.dyndns.org/downloads/documentation/README-kernel.html
  
== Overview ==
+
* http://hvkls.dyndns.org/downloads/documentation/README-bootloader.html
  
Our 2.6* kernels address virtually all shortcomings of the LS stock kernels: Very good USB support, NFS, routing, quotas, and much more.
+
* http://hvkls.dyndns.org/downloads/
 
+
More than 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.
+
 
+
== Easy Installation ==
+
 
+
An easy-to-use (yet powerful) webinstaller is provided; please see http://hvkls.dyndns.org/downloads/documentation/README-webinstaller.html for details.
+
 
+
Having run the webinstaller and rebooted '''twice''', execute
+
 
+
uname -a
+
 
+
* 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
+
lspci
+
uname -a
+
 
+
* For advanced troubleshooting, check out the "Bootloader System Control Phase" section below.
+
 
+
== Maintenance ==
+
 
+
=== Staying Up-To-Date ===
+
 
+
* There's an RSS feed at http://hvkls.dyndns.org/index.rss which informs about the latest versions and serves as a Changelog. In case you can't access this resource, or are interested in older news, point your browser to http://hvkls.dyndns.org/news/ instead, the Changelog archive. Note that MSIE browsers might not display the pages correctly.
+
 
+
=== Housekeeping ===
+
 
+
* 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''
+
 
+
== Modules ==
+
 
+
* Kernel modules can be loaded by
+
modprobe ''modulename''
+
without the <tt>.ko</tt> 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*
+
 
+
== Headers ==
+
 
+
The kernel headers are available; see http://hvkls.dyndns.org/downloads/documentation/README-kernel-headers.html
+
 
+
= The boot process and how to control it =
+
 
+
== Overview ==
+
 
+
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, aswell as Gentoo's BSD style.
+
 
+
The "bootloader" really is 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 <tt>/boot/loader*.o</tt>, which in turn boots the new kernel <tt>/boot/vmlinux.bin*</tt>. 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 the [http://u-boot.sourceforge.net/ 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 <tt>/boot/try_new_kernel*</tt>. The files are initially created for you in <tt>/boot</tt>. They must contain
+
echo -n "vmlinux.bin*" > /boot/try_new_kernel*
+
with * expanding to LS, HG, II, KB, KG, or KO respectively (see below).
+
 
+
If the file reflecting the target system doesn't exist, or contains unexpected content, or a file <tt>/boot/try_new_kernel*.running</tt> exists, the old kernel continues booting. If it does, the root filesystem is remounted read-write, the control file is moved to <tt>/boot/try_new_kernel*.running</tt>, and the root filesystem is remounted read-only. Thereafter, an attempt to load the new kernel is made. If this attempt is successful, <tt>/boot/try_new_kernel*</tt> 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 running its shutdown or reboot scripts:
+
mv /boot/*running /boot/$(basename /boot/*running .running) && reboot || echo "failed"
+
If it worked, the box should reboot into kernel 2.6. If it doesn't, perform
+
cd /boot/
+
rm *running 2>/dev/null
+
ls -1 loader* | sed -e "s/^.*loader\(.*\)\.o$/\1/" | while read a ; do echo -n "vmlinux.bin${a}" > /tmp/try_new_kernel${a} ; done
+
reboot
+
 
+
No action is performed if <tt>/boot/uImage</tt> is detected. The kernel loader assumes you've got the [http://u-boot.sourceforge.net/ U-Boot] bootloader installed, and quits silently.
+
 
+
== User control phase ==
+
 
+
In a second step, the bootloader reads <tt>/etc/default/boot_new.sh</tt> to determine what system it runs on. You can configure the <tt>NO_START</tt> variable here but should '''not''' have to touch the others.
+
 
+
If you change <tt>NO_START="'''0'''"</tt> to <tt>NO_START="'''1'''"</tt> in <tt>/etc/default/boot_new.sh</tt>, the LS will boot into kernel 2.4.* from the next system start up on. You can switch between the two settings whenever you want. Don't forget to reboot to activate them.
+
 
+
== Logging ==
+
 
+
Errors will be written to <tt>/boot/boot.log</tt>, if possible.
+
  
 
[[Category:General]]
 
[[Category:General]]

Latest revision as of 04:25, 19 August 2011

Nuvola apps important.png 
WARNING!

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.


Please refer to the following documents: