Make your own free website on Tripod.com

Booting a Red Hat Linux 6.2 system installed on RAID1 devices

If you install a new kernel on a Red Hat Linux 6.2 system that boots off of a RAID1 devices, you will need to create/include an initial ramdisk image with the kernel in lilo.

All you need to do is copy the existing ramdisk image from the /boot directory to the floppy disk. The ramdisk image is usually name initrd-<kernel-version> (e.g. initrd-2.2.14-5.0 on the default Red Hat Linux 6.2 installation).

If you want to make a new initial ramdisk image then you can create one by running the command

    bash# /sbin/mkinitrd --with=module-name image-name <kernel-version>
 

e.g.

    bash# /sbin/mkinitrd --with=raid1 --with=ne initrd-2.2.14-5.0.img 2.2.14-5.0
 

This command has to be run as the root user. This line tells mkinintrd to name the image raid-ne-ramdisk, to include the modules raid1.o and ne.o in the ramdisk image and to use kernel version 2.2.14-5.0 for this ramdisk.

When creating a ramdisk, mkinitrd will look in /etc/conf.modules and use all SCSI adapter information. The /etc/fstab file is also used by mkinitrd to determine what type of filesystem the root device is on. Read the mkinitrd man page for more options.

The lilo.conf file should look similar to

e.g.

 	#global definitions
 	boot=/dev/md0
 	map=/boot/map
 	install=/boot/boot.b
 	prompt
 	timeout=50
 	default=linux2217
 	#kernel image specific definitions
 	image=/boot/vmlinuz-2.2.14-5.0
         	label=linux
 		initrd=initrd-2.2.14-5.0.img
         	root=/dev/md0
 	image=/boot/vmlinuz-2.2.17-14
         	label=linux2217
 		initrd=initrd-2.2.17-14.img
         	root=/dev/md0
 
 
 

The boot and root device is /dev/md0 on the system as it is installed by Red Hat Linux 6.2. The map and boot.b files are in the /boot directory. The initial ramdisks for each kernel are indicated (they have to be created for each kernel since they will be different).

Creating a lilo based boot floppy with an initial ramdisk is not much difficult. An example lilo.conf file is given below

 	#global definitions
 	boot=/dev/fd0
 	map=/mnt/floppy/map
 	install=/mnt/floppy/boot.b
 	prompt
 	timeout=50
 	default=linux2217
 	#kernel image specific definitions
 	image=/mnt/floppy/vmlinuz-2.2.14-5.0
         	label=linux
 		initrd=/mnt/floppy/initrd-2.2.14-5.0.img
         	root=/dev/hda1
 	image=/mnt/floppy/vmlinuz-2.2.17-14
         	label=linux2217
 		initrd=/mnt/floppy/initrd-2.2.17-14.img
         	root=/dev/hda1
 
 
 

The only differences between the two lilo.conf files are in the location of boot, root and files.

(C) 2001 Petar Knezevich

Disclaimer

Every attempt has been made to ensure that the information presented in this mini-HOWTO is safe and accurate. However, this information is given without any warranty, either expressed or implied, as to its suitability for a particular use. It is generally considered a GoodThing(TM) to make backups of your system files before changing system configurations and/or files. I suggest you take this precaution "just in case".