From Lilo to Grub
Install grub using your prefered package manager or installer
grub-install /dev/hda (or /dev/hdb if you install it in your second HardDisc ). This installs the grub configuration files. update-grub (to create the configuration files for our system).
Preservation of configuration files
Configuration files are in Lilo in
/etc/lilo.conf
and in Grub in
/boot/grub/menu.lst
Lilo conf
boot = tells where you want lilo to reside for your boot Later you can see a label, and the boot sector to use on a specific partition.
boot = /dev/hda <<install on the master boot record of hda
install = /boot/boot.b
prompt
delay = 50
timeout = 50
vga = normal
default = linux
# maintain the original distributed kernel (and it's modules) at all times
image = /boot/vmlinuz-2.2.10-modular
label = linux
root = /dev/hdc1
read-only
# use this image when compiling 'new' kernels
image = /boot/some_other_image
label = new
root = /dev/hdc1
read-only
# use this for dos dual booting
other = /dev/hda1
label = dos
table = /dev/hda
Kernels, disks and partition designations
Grub uses its own designations for hard disks and partitions instead of the common Linux device designations (such as /dev/hda1). The device and partition numbering starts with zero.
The floppy disk drive is designated as fd0, all hard disks are designated as hd0, hd1, and so on. The partition designation is appended, separated by a comma: hd0,0 is the first partition on the first hard disk.
(fd0) Floppy disk drive (hd0) First hard disk in the system (the boot hard disk) (hd1) Second hard disk (hd0,0) First partition on the first hard disk
The partition numbers 0 to 3 represent the four primary partitions. Logical partitions are numbered from 4:
(hd0,0) First primary partition on the first hard disk (hd0,1) Second primary partition (hd0,2) Third primary partition (hd0,3) Extended partition (hd0,4) First logical partition (hd0,5) Second logical partition (hd0,6) Third logical partition
In Lilo /dev/hda1 is equivalent to (hd0,0) in Grub
It has been proposed a new system to avoid the zero, using n before hd (nhd). So (hd0,0) would be (nhd1,1)
Lilo
image=/boot/vmlinuz-2.5.44 label=linux-2.5.44 root=/dev/hda1 read-only
Grub
title Scary New Kernel (2.5.44) root (hd0,0) kernel /vmlinuz-2.5.44 ro root=LABEL=/ hdd=ide-scsi initrd /initrd-2.5.44.img
When you reboot, the Scary New Kernel option will be available (but not the default).
See also
NewKernel - automatical grub update after installing a new Kernel