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

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Installation (automatic))
m
 
(42 intermediate revisions by 14 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'''.
+
* 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, lots more.
+
* http://hvkls.dyndns.org/downloads/
 
+
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:
+
http://hvkls.dyndns.org/downloads/documentation/README-webinstaller.html
+
 
+
* Provided you've installed the kernel, check what version you're running after a reboot:
+
 
+
uname -a
+
Linux linkstation 2.6.17.11-kurobox #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
+
lspci
+
uname -a
+
 
+
* For advanced trouble-shooting, check out the "Bootloader System Control Phase" section below.
+
 
+
== Modules ==
+
 
+
* Kernel modules can be loaded with
+
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*
+
 
+
== Maintenance ==
+
 
+
* 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 an older news, point your browser to http://hvkls.dyndns.org/news/ instead, the Changelog archive.
+
 
+
* 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 ==
+
 
+
=== 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. 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 <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 kernel 2.6 is already running, or 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 (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 <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 shutting down gracefully:
+
rm /boot/*running
+
echo -n "vmlinux.bin*" > /boot/try_new_kernel*
+
reboot
+
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 kernel 2.6 is already running, or <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 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: