Mise à jour du noyau II - RPM
- 1 Installation
- 2 Checking System Configuration
- 3 Checking ~LiLo Boot loader Configuration
- 4 Checking GNU GRUB Boot loader Configuration
- 5 Rebuilding & Customizing the Mandrake Kernel SRPM
- 6 Autres ressources
Page précédente : Mise à jour du noyau I - Premiers pas
Page suivante : Mise à jour du noyau III - Les sources
Index de la section ~~Administration avancée du système~~ - Index de la Base de Connaissances
So, you have downloaded the needed RPMs mentioned on the Preparations page and you are ready to go for it. Take your time. Don't panic if you encounter errors: the current kernel is stored safely in system memory and on your disk. As long as you install the new kernel along the old one and you have a boot floppy at hand, nothing serious can happen.
Installation
Download all the kernel RPMs you need to a local directory, 'cd' to that directory, switch to the 'root' account and runrpm -i kernel*
or
urpmi kernel*
If you got all the packages, that should work out fine. You should use 'urpmi' instead of pure 'rpm'.
Notice that you can't have two different versions of the packages 'kernel-source' and 'kernel-headers' installed. Once you have successfully rebooted with the new kernel, you should generate a new boot floppy via the Mandrake Control Center or the 'mkbootdisk' script. Index de la section ~~Administration avancée du système~~ - Index de la Base de Connaissances
Checking System Configuration
Usually you don't have to do anything at all with the exception of those who are booting from RAID or SCSI devices: the RPMs do all the necessary configuration upon installation and the system initscripts check upon each boot which kernel you are booting and are changing the symlinks in the '/boot' directory accordingly. If you need SCSI or RAID devices at boot time, create a new 'initrd image':mkinitrd /boot/{initrd image} {new kernel version}Checking ~LiLo Boot loader Configuration
Open the file '/etc/lilo.conf' in your favorite editor or use '~DrakBoot' in the Mandrake Control Center. You will notice that it now contains another entry for the new kernel at the end of the file.The only things you might want to change is the
label
defaultIf you are doing this in an editor, do not forget to run the
lilo
Checking GNU GRUB Boot loader Configuration
Installing a new kernel will add an entry to '/boot/grub/menu.lst' with the kernel version as the menu entry. A standard 'menu.lst' file will then look like this: timeout 5 color black/cyan yellow/cyan i18n (hd0,0)/boot/grub/messages keytable (hd0,0)/boot/us.klt default 0 title Linux kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 {2 more entries} title 2.2.16-9mdk kernel (hd0,0)/boot/vmlinuz-2.2.16-9mdk root=/dev/hda1 (The linekernel (hd0,0)/boot/vmlinuz
root=/dev/hda1
- Append an entry for an 'initrd' image, if needed (.
initrd /boot/{name of initrd image}
- boots the first entry by default. If you want to boot the new kernel by default, change the number to that of the entry (in this example it's the fourth entry, but since GNU GRUB starts counting from 0, the entry would be
default 0).default 3 - You might also want to adjust the field from
title
to something more descriptive, like2.2.16-9mdk
.New Kernel
uname -r
rpm -e
urpme
Rebuilding & Customizing the Mandrake Kernel SRPM
(Contributed by Mandrake Linux user Roger with kudos to the Mandrake Kernel team) Prerequisites:- A working knowledge of rpm (man rpm) * Some past experience with building the kernel (read the README in the kernel source for building the kernel)
- Download or obtain the 'kernel-2.4.xx.xmdk.src.rpm' and install it:
- Now customize it to your liking by copying the config file from the SRPM to the Linux source directory and running the kernel configuration utility on it. After configuration, copy the the changed config file back:
- rpm -bp /usr/src/RPM/SPECS/kernel.spec
- cp /usr/src/RPM/SOURCES/kernel-2.4.xx.x-i586.config /usr/src/RPM/BUILD/linux/.config * cd /usr/src/RPM/BUILD/linux/ * make xconfig * cp .config /usr/src/RPM/SOURCES/kernel-2.4.xx.x-i586.config
- Now start the build process:
/usr/src/RPM/SOURCES/kernel-2.4.xx.x-i686.config In Closure:
Mandrake does a very good job of making sure that the max amount of modules are built and available to users while making sure of compatability. So, if you try to slim down your kernel, you may find that it might break the build because you either: a) choose not to build some module required by other modules or, b) you choose to build a module which was experimental or has problems building statically instead of only as a module. So, I usually only worry about providing explicit support for my i686 cpu's and maybe to adjust the APM module. I keep it simple in case the build does break. This way, I'll have an easier type debugging. Note: Users can also denote which patches they want omitted from the build process, but this is more of an advanced topic as it requires one to actually READ & UNDERSTAND the kernel.spec scripting. Usually, tho, if a person wants to omit a certain patch (because of conflicts with a 3rd party driver or "what not"), they would simply comment-out the patch# listed within the top of the kernel.spec after tracing the patch number back to the "title of the patch source". Next Item: Upgrading via compiling
Autres ressources
Mdk Reference, 14The Linux Kernel HOWTO
Kernel Notes
Docs in /usr/src/linux/ or /usr/doc/kernel-doc-{...}/
man lilo.conf
info grub
Page suivante : Mise à jour du noyau III - Les sources
Revision / Modified: Sep. 18, 2001 / May 14, 2002
Author: Tom Berger
Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Mise à jour du noyau II - RPM
Version 1.14 last modified by ptyxs on 05/11/2006 at 09:10
Version 1.14 last modified by ptyxs on 05/11/2006 at 09:10
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!
Mandriva.com
Store
Club


