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

Re: Configuring RAID-1 boot partition



On Monday 22 November 2010 11:06:32 Peter Tenenbaum wrote:
> I'm running squeeze on my desktop and recently decided to configure it for
> RAID-1 as part of my recovery from a hard drive failure.  I found an
> article online about how to do this:
> http://linuxconfig.org/Linux_Software_Raid_1_Setup .  I followed the
> article's recipe as best I could, but could not in general do exactly as
> was shown for setting up the boot partition as the instructions seem to
> correspond to GRUB 1 and I am running GRUB 2 (well, 1.98).  When I
> attempted to boot off of my RAID-1 boot partition, I got into grub and then
> got the following message:
>
> error: file not found!
> Entering rescue mode...
> grub rescue>
>
> At the moment I am booting off of a Debian Live DVD.  Here is the content
> of the grub.cfg file on the RAID boot partition:
>
> set default=0
> set timeout=5
>
> menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' {
>     set root=(hd0,1)
>     echo    'Loading Linux 2.6.32-5-amd64 ...'
>     linux /vmlinuz-2.6.32-5-amd64 ro root=/dev/md3 quiet
>     echo    'Loading initial ramdisk ...'
>     initrd /initrd.img-2.6.32-5-amd64
> }

  I'm unfamiliar with the details of grub2, so my first wish is that
you please share your results -- Grub 2 is supposed to be able to 
read MD arrays.

>
> Note that /dev/md3 is the RAID-1 array which is going to be root in the
> fully booted system, and it is made of /dev/sda3 and /dev/sdb3.  The boot
> array is /dev/md1, which is made of /dev/sda1 and /dev/sdb1.

  I think your "set root" is wrong, certainly one way, and probably
two.  The first way is, grub counts disks from zero, so the first 
partition of the first drive is (hd0,0), which is what you want, I 
think.  The probable second problem is that what you *really* want is
to point it at the RAID device.  I don't know how grub2 names RAID
devices, but (hd) notation is probably not it.

  Note that, because of the nature of RAID1, setting root=(hd0,0) will
probably allow your system to boot, but it's still not really right.

  You should be able to type in the relevant bits in grub rescue mode,
you don't have to edit the files until after you've booted.


				-- A.
-- 
Andrew Reid / reidac@bellatlantic.net


Reply to: