Home >> Notes >> Linux kernel migration | Asim Shankar |
Updates
Introduction
The steps described here should work for any kernel 2.4 setup. The migration is divided into the following steps:
My machine is a Dell Inspiron 8500 laptop and if you install Fedora Core 1 on it, most of the things work without effort. For more information on Linux on the Inspiron 8500/8600 you may want to check out Diwaker's notes or Diego's notes.
The wireless card may be slightly problematic if you have a Dell TrueMobile 1300/1400 or an Intel PRO/Wireless 2100 miniPCI card. I have a Dell TrueMobile 1150 whose drivers (orinoco) are available and works without trouble. To get the other cards to work you may find NdisWrapper useful. I've heard of it being used successfully with 2.6.0 and the Intel PRO/Wireless 2100 card.
Backing Up
The upgrade requires a few modifications to various config files. Just to be safe, it would be a good idea to copy these files to a safe location so that reverting back to your existing setup is easy. The files are:
Now it's time to get down to work. By the way, so far you have not affected your current setup at all. In fact, only in Step 3 do we begin modifications that will affect your current setup.
$ tar -xvzf module-init-tools-0.9.15-pre4.tar.gz $ cd module-init-tools-0.9.15-pre4 $ ./configure --prefix=/ $ make moveold $ make $ make install $ ./generate-modprobe.conf /etc/modprobe.confThis will create /etc/modprobe.conf which is what 2.6 uses instead of /etc/modules.conf. View the README file for more detailed information.
$ cd /usr/src $ bunzip2 -c linux-2.6.0.tar.bz2 | tar -xv $ cd linux-2.6.0There are tons of configuration options and you may be overwhelmed. You can use my config file as a starting point. Download this (updated January 20, 2004) and copy it to /usr/src/linux-2.6.0/.config (or wherever you've unpacked the kernel source). Then, change configuration options to your liking and compile the new kernel:
$ make xconfig $ make $ make modules $ make modules_installNow you have a compiled kernel, time to copy it and make changes to the boot loader (grub).
$ make installLines looking somewhat as follows would have been added to /boot/grub/grub.conf:
title Linux 2.6.0 root (hd0,2) kernel /boot/vmlinuz-2.6.0 ro root=LABEL=/ acpi=on initrd /boot/initrd-2.6.0.img(hd0,2) would be replaced with whatever your root partition is. Though you now have a bootable kernel, don't boot it up just yet. We need to change some config files in order to achieve a smooth first boot.
Patchwork
There are various functionality-enhancing patches already available for 2.6, most notable of which is swsusp which provides Windows' Hibernate like functionality. I haven't experimented with that yet, will update this doc when I do. The patch is available at swsusp.sourceforce.net.
First, open /etc/modprobe.conf and replace occurrences of usb-uhci with uhci-hcd (this will probably be at one place, changing alias usb-controller1 usb-uhci to alias usb-controller1 uhci-hcd).
Also, change all instances of mousedev to usbmouse and instances of keybdev to usbkbd.
Now repeat the mousedev and keybdev replacements in /etc/rc.sysinit.
First, create a /sys directory and add the following line to /etc/fstab:
none /sys sysfs defaults 0 0
Second, edit /etc/init.d/halt and change
awk '$2 ~ /^\/$|^\/proc|^\/dev/{next} to
awk '$2 ~ /^\/$|^\/proc|^\/sys|^\/dev/{next}.
Now for some changes to /etc/rc.sysinit:
Open /etc/modprobe.conf and delete any lines that look like any of the following:
options i810_audio clocking=48000 alias sound-slot-0 i810_audio install sound-slot-0 /sbin/modprobe [...blah blah...] remove sound-slot-0 [...blah blah...]Note that my machine uses the Intel i810 audio drivers. If you use something else, then you will have something else instead of i810_audio. Now that we got rid of the OSS stuff, time to add ALSA lines. Add the following:
alias char-major-116 snd alias snd-card-0 snd-intel8x0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-ossAgain, if you don't use the Intel 810 audio drivers, then snd-intel8x0 will have to be changed to suit your card. Also, add the following two lines:
install snd-card-0 /sbin/modprobe --ignore-install snd-card-0 && { /usr/sbin/alsactl restore >/dev/null 2>&1 || :; }
remove snd-card-0 { /usr/sbin/alsactl store >/dev/null 2>&1 || :; } ; /sbin/modprobe -r --ignore-remove snd-card-0
However, if you have an nvidia graphics card and use their binary driver some extra effort is required. NVidia drivers need to be installed so boot into console mode, i.e., without an X server. To prevent the X server from automatically starting hit 'a' on the grub screen after selecting the appropriate entry. On the command prompt, add 3 and then hit Enter. What this does is causes the system to boot into runlevel 3 (no X server) instead of 5 (X server).
You have two options. One is to download the drivers from nvidia and the corresponding .README and .diff files from http://www.minion.de/. The README explains things quite well and worked for me quite smoothly.
Alternatively, instead of doing the patchwork manually you can download the patched nvidia driver binaries from http://www.sh.nu/download/nvidia/linux-2.6/.
Once installed, then start the X server by:
$ init 5