Linux Mall - The Linux SuperStore!
Linux books, Linux CDs, Linux toys, you name it, they have it!

W W W . L I N U X D O T . O R G

Newbie's Linux Manual
Upgrading Your Kernel
by Laurence Hunter
[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
Dispelling The Mysticism

Much mysticism has been built around the difficulty of upgrading your Linux kernel. Truth is, it's not that difficult.

Note:

You'll need to be logged on as root whilst performing all of the following steps.

- 1 -

Download/move a kernel source file (e.g. linux-2.2.13.tar.gz) to your /usr/src directory.

- 2 -

Enter:

cd /usr/src

- 3 -

Enter:

rm linux

...to remove the symbolic link named linux.

- 4 -

Enter:

tar xzf linux-2.2.13.tar.gz

...(changing linux-2.2.13.tar.gz to the name of your kernel source file), to extract the compressed and archived source code files.

- 5 -

You'll now have a new directory called linux. 'cd' into it, by entering:

cd linux

- 6 -

It's now time to configure everything to your liking -- prior to actually building the kernel image. Newbies will likely find the graphical configuration utility friendlier that the console version, so in X, enter:

make xconfig

Note:

For those who prefer to do things at the console, enter: make menuconfig instead.

- 7 -

Now I know all this looks pretty scary, but the online help is excellent, and you'll soon have the hang of it. Just select the first option on the list, "Code maturity level options", and select the "Help" button to the right for help on that particular option. When you're finished with "Code maturity level options", select the "Next" button to move onto the next set of options... and so on.

When you're finished, select the "Save and Exit" button.

Note:

The reason many options are greyed out is because they rely on another option being selected.

- 8 -

Now enter each of the following in turn:

make dep
(Ensures everything gets built in the right order.)

make clean
(Cleans out information from previous compiles.)

make bzImage
(Creates the new kernel image.)

make modules
(Creates the new kernel modules.)

make module_install
(Installs modules to /lib/modules/kernel.version.number)
Tip:

Show-offs could have entered:

make dep; make clean; make bzImage; make modules; make modules_install

...instead (i.e. all on one line), whilst gooroos would have an alias to run this one big line, just by entering something suitably cryptic, like: mk

- 9 -

As long as it's a x86 PC your using, enter:

mv /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.13

...(if not, then replace the i386 part (determined by listing /usr/src/linux/arch)). Feel free to replace the vmlinuz-2.2.13 part with whatever filename you want.

- 10 -

Now you need to tell Lilo about the kernel image so that it can boot it. Enter:

pico /etc/lilo.conf

...and enter the following at the end of the file:


image=/boot/vmlinuz-2.2.13 label=newlinux read-only root=/dev/hda6

...making sure to change the vmlinuz-2.2.13 part to whatever you called the kernel image in step 10, and the hda6 part to wherever your root (/) partition is located (easy to determine since the other root= entry in this file will tell you). The newlinux part is what you enter at Lilo's boot: prompt to boot this particular kernel image. Change it to whatever you want. Now save the file and exit Pico.

- 11 -

Enter:

lilo

...to update Lilo with its new configuration.

- 12 -

Reboot your computer to test out the new kernel. If it doesn't work -- don't panic. You still have your old kernel to fall back on.

[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
Homepage | The Last 5 Days | The Daily Linux News | The Linux Bits | Newbie's Linux Manual
The Best Linux Sites | Linux Book Reviews | A Windows Vendetta?
Diary of a Linux Newbie | Diary of an Open Source Newbie
The Linux Forum | Just For Fun
Amazon - The World's Biggest Bookstore!
4.7 million books, CDs, videos, and DVDs available to buy!
© MM Linuxdot.org | Webmaster | Manual's Copyright Terms