Contents
- INDEX
- Linux Index
- Solaris
- HP-UX Index
- Other Unix types
- General Unix
- Unix Networking
- Unix Scripts
- Unix Databases
Associated Information
- none
Useful Links
- HOWTOs, FAQs, etc
- Linux Documentation Project
- Linux Search Engine
- GNU free software sight
- Freshmeat software sight
- Linux Weekly News
- Linux Gazzette
- Caldera Openlinux knowledge d/base
- Corel Linux knowledge d/base
- Debian documentation
- Mandrake documentation
- Redhat Online Manuals
- Slackware FAQs
- SUSE support database
|
Rebuilding the Linux Kernel
Before rebuilding the kernel, you must have the source available. Download it if you haven't.
There's two options for building the kernel, based on you current kernel configuration or based on the default. You can only do a build based on your current configuration if you've rebuilt your
kernel before and you saved the configuration file from the previous build. By default the saved
configuration file is /usr/src/linux/.config although xconfig has an option to call it something else or
you can copy it after. The default config file (for i386 architecture) is
/usr/src/linux/arch/i386/defconfig. The build process is slightly different depending on which
one you're doing. Both are described below:
- cd /usr/src/linux
- If the is a first time kernel build or you want to base the build on the defaults:
- Run make mrproper
- Run make xconfig if you are running X,
otherwise you'll need to run make menuconfig or make config (which is a lot more tedious)
- select the options you require for your kernel and select save . A
.config file will be created .
- Run make dep
Or , if you have a config you want to base it on:
- Run make xconfig if you are running X,
otherwise run make menuconfig and select the option to use your existing configuration file.
- select the options you require for your kernel and select save . A new
.config file will be created .
- Run make dep
- Run make clean
- Edit /usr/src/linux/Makefile amending the EXTRAVERSION statement to
a unique name (This allows you to have the old and new kernel on the system at
the same time)
- Run make bzImage to create the kernel
- Run make modules to build any modules
- Run make modules_install to copy the modules
into place.
- cp /usr/src/linux/arch/i386/boot/bzImage
/boot/vmlinuz-version to copy the kernel into place,
- cp /usr/src/linux/arch/i386/boot/System.mapversion
/boot and relink System.map to this file.
- If you need to load the SCSI or RAID module at boot time run
/sbin/mkinitrd /boot/newinitrd-image kernel-versionl .
lilo.conf should also be updated to include this (see below).
- Edit /etc/lilo.conf to add the new kernel. It is a good idea to leave the
old kernel there in case of problems. Run /sbin/lilo
to update LILO.
You are now ready to reboot.
|