News Register Control Panel Private Messages Members List Team Search News Posts About Us
 

Kernel Compilation under Linux
  Author: Unknown
Added: 12/21/2002
Type: Tutorial
Viewed: 1384 time(s)
Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10Average visitor rating of 9.1/10
Configure bootloaders

The bootloader permits you to boot on the OS you want and on the kernel you want. It makes the link between the BIOS and the kernel. I'll talk about the two most well known bootloaders on linux: LILO and GRUB.

   5.1 LILO

First backup your working lilo.conf:

$ cp -p /etc/lilo.conf /root/lilo.txt

Now edit /etc/lilo.conf to make it bootable on the new kernel. Add this in the file:

image=/boot/vmlinuz-2.4.19
label=Linux-2.4.19
initrd=/boot/initrd-2.4.19.img
read-only
root=/dev/hda2


Do not change the "default=" line (above in lilo.conf) for the moment and do not delete lines corrosponding to current working kernel. The line "initrd=/boot/initrd-2.4.19.img" will be used only if you have made an initrd image (step 9). Now tell LILO to read lilo.conf:

$ lilo -v

Make sure the kernel have been loaded by looking at the output "Writing boot sector". Also tell LILO to treat "linux-2.4.19" as default boot kernel just for one time only with -R:

$ lilo -R linux-2.4.19

   5.2 GRUB

backup the config file of GRUB:

$ cp /boot/grub/grub.conf /root/grub.txt

Edit grub.conf and make this changes:

title Linux 2.4.19
root (hd0,1)
kernel /boot/vmlinuz-2.4.19 ro root=/dev/hda2 hdd=ide-scsi
initrd /boot/initrd-2.4.19.img


(hd0,1) is the partition where GRUB is installed. root=/dev/hda2 is where the kernel image is located. Here again the line "initrd /boot/initrd-2.4.19.img" will be used only if you have made an initrd image (step 9). If your /boot has its own partition, remove /boot in the kernel path:

kernel /vmlinuz-2.4.19 ro root=/dev/hda2 hdd=ide-scsi

Higher in the configuration file, you can see a line "default=0". It means the first entry of grub.conf will be the default entry. If you want to set your new kernel as default, you have to put the above lines before your old kernel entry or if you wrote it at the end of the file, set "default=1".

Article Pages:  � Prev | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next �  


How would you rate this article:    Bad Good   Go � 


� Copyright Linux Advisory 2003. All rights reserved.
We are not responsible for the comment and story contributed by users.