[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Woody+initrd+raid1+boot = :-(



Hi,

The problem is that the existing HOWTO's on root-on-RAID refer to lilo
versions earlier than 21.8.

Debian woody comes with 22.2, which is easier to configure for
root-on-RAID, once you find out how...

You should have, in /mnt/etc/lilo.conf (better leave lilo.conf on your
original installation alone):

--- Begin lilo.conf extract ---

# Better use the first BIOS ID for the disk we'll boot from;
# we'll use the BIOS setup to boot from this
disk=/dev/hdc
	bios=0x80

# /boot is on /dev/md0
boot=/dev/md0

	# Write an MBR only to /dev/hdc for now
	raid-extra-boot="/dev/hdc"

# The root fs is on /dev/md1
root=/dev/md1

--- End lilo.conf extract ---

NOne of all that messing around with partition geometry specs that you
needed to "trick" the earlier lilo into booting from a RAID-1 /boot.

Once you've done this, then do

chroot /mnt /sbin/lilo

You don't need initrd if the RAID stuff is compiled into your kernel.  If
the RAID stuff is in the form of modules, then to make the initrd for your
new system, just do

chroot /mnt mkinitrd -o /boot/initrd

to create an initrd image /boot/initrd (or your choice of filename).
mkinitrd is good at detecting what modules to include; I haven't yet had
an instance where I needed to tell it what to include.

If you're using initrd as above, you will obviously need to include a line

initrd=/boot/initrd

in /mnt/etc/lilo.conf.

Reboot your machine, go into BIOS setup and set your BIOS to boot from the
secondary master (/dev/hdc).  With any luck, you will boot into the
root-on-RAID system with the degraded arrays.

Check that everything is OK.  Then you can add the partitions on /dev/hda
to the arrays.  Make sure the partition type is set to 0xFD (Linux RAID
Autodetect), and edit your /etc/raidtab to change the failed-disk entries
to raid-disk.  You can then raidhotadd the partitions:

raidhotadd /dev/md0 /dev/hda1
raidhotadd /dev/md1 /dev/hda3

Now you have a full RAID system.  It's a good idea to also duplicate the
MBR's to make sure that if one disk fails, you can boot from the other by
changing the BIOS setup.  This is another instance where the new lilo is
much easier than the old one to set up.  Just make the following changes
to /etc/lilo.conf:

--- Begin lilo.conf extract ---

# Better use the first BIOS ID for all disks;
# we'll use the BIOS setup to choose which one to boot from.
disk=/dev/hda
	bios=0x80
disk=/dev/hdc
	bios=0x80

# /boot is on /dev/md0
boot=/dev/md0

	# Write an MBR to all disks
	raid-extra-boot="/dev/hda,/dev/hdc"

--- End lilo.conf extract ---

Now run /sbin/lilo.

Done; you have a fully redundant disk system, down to the MBR's.

You might want to look at my Unofficial Kernel 2.4 Root-on-RAID and
Root-on-LVM-on-RAID HOWTO at:

http://www.linustech.com.cy/linux/HOWTO/lvmraid/

or at

http://karaolides.com/computing/HOWTO/lvmraid/

Best regards,

|      George Karaolides       8, Costakis Pantelides St.,         |
|      tel:   +357 99 68 08 86                  Strovolos,         |
|      email: george@karaolides.com       Nicosia CY 2057,         |
|      web:   www.karaolides.com      Republic  of Cyprus          |



-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: