Bug#422851: "grub-probe -t partmap" doesn't work with software RAID

Sam Morris sam at robots.org.uk
Sun May 13 11:02:26 UTC 2007


On Sat, 2007-05-12 at 22:16 +0100, Sam Morris wrote:
> On Wed, 2007-05-09 at 18:13 +0200, Robert Millan wrote:
> > I'm forwarding you a bug report from Debian.  It seems that the grub-probe
> > -t partmap feature I just added doesn't play nice with RAID.  Unfortunately,
> > I have no idea how software RAID is implemented.  Is it okay to just exit
> > succesfuly and install core.img without any partmap module?
> 
> Hi Robert,
> 
> I altered grub-install to not fail if the partmap module could not be
> determined, and then rebooted. I was put straight into rescue mode, and
> 'ls' only showed (hd0) (hd1) (hd2)... so I guess at least 'pc' is
> necessary for Linux software RAID setups.
> 
> After editing the script to fall back to 'pc' if partmap_module could
> not be determined, I rebooted again. This time I got the menu, however
> it had (what appeared to be) only a single, blank entry. Hitting enter
> or pressing 'e' locked up the system. I could press 'c' to get to a
> command prompt, however.
> 
> Upon doing so, I did 'ls' and could see the individual partitions insead
> of just the disk devices. However I didn't know what else to do, so I
> booted back up with grub 1 and sent this message.

I experimented some more. At the command prompt I entered 'insmod raid'
and got the message 'error: out of disk'. I assume that is because the
partition containing my RAID1 array extends past the area readably by
BIOS functions. However, I was able to ignore the message: if I then ran
'ls', '(md0)' showed up in the list of devices just fine!

Next I did 'source (md0)/boot/grub.cfg' and was brought to the working
GRUB menu. I guess that is because /boot and its contents are within the
area of the disk readable by the BIOS functions.

I had to do one more thing to boot up correctly: edit the command line.
It had 'root=md0' but it needed 'root=/dev/md0'. It appears that
'grub-probe -t device /boot/grub' outputs 'md0' when it should be
outputting '/dev/md0' (just as it outputs e.g., '/dev/hde1' instead of
'hde1' for 'grub-probe -t device /mnt'). Shall I file a separate bug for
that?

BTW, it would be convenient if I could override the detected GRUB_DEVICE
by editing /etc/default/grub; however it seems that update-grub ignores
the environment variable and always overrides it with the value output
by grub-probe. It might be useful to allow the user to specify the grub
device manually in this manner.

So anyway, having booted up, I edited grub-install again, to set
partmap_module='pc raid', and re-ran it. However when booting up this
time, I was straight back to the recovery console. It appears that I can
only boot up if I insert the 'raid' module manually at the regular GRUB
prompt.

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20070513/6653e3ed/attachment.pgp 


More information about the Pkg-grub-devel mailing list