FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-22-2010, 03:06 PM
Peter Tenenbaum
 
Default Configuring RAID-1 boot partition

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
}

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.


Any suggestions about how to correctly configure a RAID-1 boot partition (ie, what I did wrong and how to fix it) will be very much appreciated!

Thanks in advance,
-PT
 
Old 11-23-2010, 12:41 AM
Andrew Reid
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201011222041.45801.reidac@bellatlantic.net">http://lists.debian.org/201011222041.45801.reidac@bellatlantic.net
 
Old 11-23-2010, 01:15 AM
Andrew Reid
 
Default Configuring RAID-1 boot partition

On Monday 22 November 2010 11:06:32 Peter Tenenbaum wrote:
[stuff, then]
> 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 withdraw my earlier criticism of (hd0,1) -- it seems that Grub2 *does*
index partitions starting from 1, and not from 0, as "legacy grub" does.

Bad assumption on my part, sorry for the noise.

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201011222115.02412.reidac@bellatlantic.net">http://lists.debian.org/201011222115.02412.reidac@bellatlantic.net
 
Old 11-23-2010, 06:27 AM
Tom H
 
Default Configuring RAID-1 boot partition

On Mon, Nov 22, 2010 at 11:06 AM, Peter Tenenbaum
<peter.g.tenenbaum@gmail.com> 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
> }
>
> 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.

Boot from the DVD, mount md3 and md1, chroot to md3, run "grub-install
/dev/sda", "grub-install /dev/sdb", "update-grub", "update-initramfs
-u -k $(uname -r)", exit, and try rebooting into your install.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin_-DNyW+ap2K55DFpsBy-Exs+3=+aSf44W4urp@mail.gmail.com">http://lists.debian.org/AANLkTin_-DNyW+ap2K55DFpsBy-Exs+3=+aSf44W4urp@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 12:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org