WARNING Playing with the kernel of a Linux/Unix system is a risky adventure! be ready to have your whole system crashing and such issues. Prior to starting this short tutorial, be sure you know how to rescue a linux system! This tutorial is for a slackware distribution (v10.X) but should apply to any convenient Linux distribution. For the L20-120, there are additional post-install issues for which I recommend to use the Slackware distribution. Have CD#1 ready and at disposition. Here's the menu :
Configuring the kernel
Building the kernel
System post-install (Satellite P20)
System post-install (Satellite L20-120)
Installing the kernel-headers
I did these installations using the 2.6.16-1 kernel sources and a GNU Linux Slackware 10.2. First of all login as root user (1). This system has a master partition for linux in ReiserFS format (but the configurations below should fit a Ext2/Ext3 system)
Unpack the kernel sources in /usr/src
# tar xfj /path/to/linux-2.6.16-1.tar.bz2
You now have a
directory. Remove previous links (2) :
# rm /usr/src/linux
and link the new sources tree
# ln -s /usr/src/linux-2.6.16-1 /usr/src/linux
Change to that directory and clean the source tree
# cd /usr/linux-2.6.16-1 # make mrproper
If you own a Toshiba Satellite P20, copy this configuration file to the root of the source tree
# cp config-p20 /usr/src/linux-2.6.16-1/.config
and for the Toshiba Satellite L20-120, copy this configuration to the root tree
# cp config-L20-120 /usr/src/linux-2.6.16-1/.config
If you are motivated to fine tune the kernel by hand run
# make menuconfig
Again, this is not an easy task! removing necessary features may cause problems later...
Nothing easier, maybe long...
This builds kernel components. Run then
# make modules_install # make install
To install the kernel plug-ins in /lib/modules/(version), and copy the system image to the /boot directory type :
# cp arch/i386/bzImage /boot/vmlinuz-2.6.16-1
Here the image was renamed to a conventional name.
Save the configuration by hand :
# cp .config /boot/config-2.6.16-1
Now all elements are at the right place.
This is quite trivial for the P20. Up here you did not modify the system structure, simply edit the
file with your favourite editor and append a standard configuration scheme to '/etc/lilo.conf' :
image = /boot/vmlinuz-2.6.16-1 root = /dev/hdaX label = "Slack2.6.16-1"
Do not forget to set correctly the root path, it is the same as for the previous kernel (search for the corresponding section, or look for it using cfdisk).
And do not forget to run lilo :
Reboot quitely (ctrl+alt+del), you should boot without problems with the new kernel.
Here the procedure is a bit more complex because the main harddrive has all device codes reassigned to /dev/sda*. Thus, you NEED a boot cdrom with a (testing or released) 2.6X series kernel e.g. slackware 10.2+ CDROM disk 1.
Reboot the system onto the bootable cdrom, using the test26.s kernel (type it at the boot prompt). Log-in as root at the prompt, select your keyboard, then mount the linux partition :
# mkdir /a # mount /dev/sdaX /a # chroot /a
Replace sdaX above by the device code of your linux bootable partition (use 'cfdisk' for checking...)
/dev/hda1 /win ntfs ... /dev/hda7 / reiserfs ...
Should be replaced with
/dev/sda1 /win ntfs ... /dev/sda7 / reiserfs ...
then edit '/etc/lilo.conf' and replace, again ALL occurences of '/dev/hdaX' with '/dev/sdaX' including the root = '/dev/hda' statement. And do not forget to run :
once edited and saved. Once /etc/fstab and /etc/lilo.conf correctly modified, reboot the system normally (ctrl+alt+del). Now the partitions shoud be correctly mounted and the new kernel boot without problems. If a problem occurs, verify the boot messages and try to identify where your mistake remains.
This is only necessary if you compile a category of program which requires system description, like gcc and for the P20, the NVidia graphic drivers. I did not find information to do that cleanly, so in order to be able to easily remove them prior to further kernel upgrades, we will create a simple package :
# mkdir /usr/src/PKG
Answer with defaults when the package is created.
Now, take care of the following prior to installing the headers system wide. If there exists a
directory, you may have to remove the kernel_headers-* package already installed (from the previous kernel). Check for the package name by doing a
# ls /var/log/packages/kernel-header*
and remove the found package
# removepkg kernel-headerXXX
(another way is to use the pkgtool utility) Then you can install your newly created package :
# installpkg kernel-headers-22.214.171.124-i686fred.tgz
For the Toshiba Satellite P20, you need to recompile the NVidia drivers prior to launching the X Server.
If you are too lazy, at this point, to create the package, here is the L20-120 kernel headers package!
(1) if you don't have any root user, you are running an Ubuntu-like friendly distribution and probably do not have to deal with kernel installation issues. Reread the introductory statement above (WARNING).
(2) on certain distribution it is a directory. You may have to remove a binary package from the distribution which should be entitled kernel_headers or linux_headers... if you delete it by hand (rm -rf) you may break internal dependencies...
< Bring me back home!