Michael Milligan wrote:
<snip>
> To add a little bit of thinking on /boot... I have a small ext2fs partition
> (/dev/sda1) which is mounted as /boot that is not raid. That same partition
> is mirrored (manually) as /dev/sdb1, and I instructed lilo to install a boot
> block in the MBR of /dev/sdb. This covers your butt in case sda fails and
> you have to reboot for some reason (i.e., sdb becomes sda) and saves having
> to boot off a rescue disk of some kind. To accomplish this, I did:
>
> # dd bs=1024 if=/dev/sda1 of=/dev/sdb1
> # /sbin/fsck.ext2 /dev/sdb1 [to "clean" the file system]
> Edit /etc/lilo.conf, change boot spec to "boot = /dev/sdb"
> # /sbin/lilo [you'll get a warning about it not being the first disk]
> Edit /etc/lilo.conf, change back the boot spec to /dev/sda
Humm, did you test it (by unplugging the sda disk and booting) ?
If you didn't you might be in for a surprise...
If you didn't mount /dev/sdb1 as /boot before running lilo to put a MBR
into /dev/sdb, lilo will write a MBR in /dev/sdb witha first stage
loader that will look in /dev/sda1 for the second stage boot loader, map
and kernel at boot time. If that's the case and your /dev/sda fails, you
probably will need a floppy bootdisk...
I've never had any success putting MBRs in /dev/sbd while /dev/sda was
running. If anybody actually have done it, I would like to know how.
What I have been doing is (raidtools 0.90 only):
- make a bootdisk with a kernel (with the raid modules or a initrd file)
mounting my raid1 root filesystem.
- test the disk (boot from it and see what happens)
- power off and unplug the data cable from /dev/sda
- power on, boot from the floppy, mount /boot if it isn't already
mounted (since the former /dev/sdb is now /dev/sda, the /boot entry in
/etc/fstab will be ok)
- run lilo
- reboot without the floppy bootdisk to test
- power off, plug back the data cable on /dev/sda again
- power on and run raidhotadd to sync the raid1 root filesystem
Anyone has a better idea?
Cheers,
Leandro