Kernel

From HerzbubeWiki
Jump to navigation Jump to search

This page is concerned with managing the Linux kernel on a Debian system. These days I use pre-packaged kernels provided by Debian, they just work fine with my MacMini box. On older hardware I used to build my own kernel, the KernelConfiguration page on this wiki still has a bit information on that (probably getting out of date).


Debian packages

The Linux kernel in Debian is packaged under the name

linux-image-<foo>

The packages with prefixes linux-headers and linux-source are only interesting if you compile your own kernel, or compile programs that need to interface with the kernel (e.g. drivers).

There are also packages for the FreeBSD kernel (kfreebsd-image-<foo>) and the GNU Mach kernel (gnumach-image-<foo>) upon which a GNU Hurd system is based, but I am ignoring these.


How to upgrade

The process of upgrading from one version of the Linux kernel to the next is very simple and works in 2 steps:

  1. Install the Debian package with the new kernel version. This does the following things automatically:
    • Install the files for the new image on the system (e.g. boot/vmlinuz-3.2.0-4-686-pae)
    • Updates all symlinks (e.g. /vmlinuz points to the new kernel, and /vmlinuz.old points to the old kernel)
    • Creates a new initramfs package (a cpio archive that is unpacked by the kernel into RAM at boot time, creating an initial root filesystem)
    • Updates the boot loader configuration to include the new kernel in the boot menu
  2. Reboot


Praying is optional.


Past upgrades

linux-image-2.6.32-5-686 > linux-image-2.6.38-2-686

The update itself went smooth.


I never did much with the kernel 2.6.32 which was installed by the Debian install image. Instead, I immediately upgraded to 2.6.38 kernel and only then noticed that the Gigabit Ethernet-over-USB controller that is attached to my MacMini did not work properly: The interface was recognized and I was able to bring it up with ifup, but the interface never transmitted any data. The Gigabit controller has an ASIX chipset, just like the MacMini's built-in Fast Ethernet controller, but apparently the chipset requires a newer kernel driver than the one supplied by Debian.


Howto: ASIX 88178 USB Ethernet Adapter on Ubuntu 10.10 Linux: This article provided the clues for getting the controller to work. The newest drivers can be downloaded from here: http://www.asix.com.tw/download.php?sub=searchresult&PItemID=84&download=driver. I used the driver with the following line:

AX88178	Linux kernel 2.6.38 	For Android 1.x/2.x/3.0, Linux kernel 2.6.14 and later		29.7 KB	v4.1.0	2009-03-27


The command line transcript for installing the driver:

cd /usr/src
tar xfvj /var/archive/kernel/AX88772B_772A_760_772_178_LINUX_Driver_v4.1.0_Source.tar.bz2
chown -R root:root AX88772B_772A_760_772_178_LINUX_Driver_v4.1.0_Source/
cd AX88772B_772A_760_772_178_LINUX_Driver_v4.1.0_Source/
apt-get install module-assistant
module-assistant prepare
modprobe -r asix
make
make install
modprobe asix

Note: The DHCP daemon possibly needed to be restarted to get the driver up and running.


linux-image-2.6.38-2-686 > linux-image-3.2.0-4-686-pae

  • The suffix "-pae" refers to the term "Physical_Address_Extension" (Wikipedia link), a feature supported by Intel processors since a long time ago. The Intel Core 2 Duo in my MacMini definitely supports this, so I can definitely use this kernel.
  • On installation of the Debian package, I get a DebConf warning about required firmware that is possibly missing in the new kernel (but was present in the old kernel), firmware which is available from the "contrib" or "non-free" sections of the Debian package archive. The firmware modules that are listed are all from the "b43" family, which refers to WLAN chips produced by Broadcom (also see this page). The AirPort Extreme controller in my MacMini indeed is powered by a Broadcom chip, but since I don't use this I don't bother installing the firmware.
  • This kernel does not need a special ASIX kernel driver to be built (cf. previous kernel), the pre-built driver is sufficient to run the Gigabit Ethernet-over-USB controller.