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

Bug#375927: RAID: groot is always set to (hd0,0)



Frans Pop wrote:
> reassign 375927 installation-reports
> severity 375927 normal
> thanks
> 
> On Thursday 29 June 2006 01:53, Michael Biebl wrote:
>> md0 (sda1,sdb1) => swap
>> md1 (sda2,sdb2) => /
> 
>> grub is installed correctly, but groot in /boot/grub/menu.lst is set to
>> (hd0,0), so update-grub generates a /boot/grub/menu.lst, where root is
>> not correctly set leading to an unbootable system.
> 
> groot is not the same as root. (hd0,0) seems perfectly OK to me for groot.

The relevant part of the generated /boot/grub/menu.lst is this:

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

Looking at /sbin/update-grub, groot is used to determine the root device
  (line 684). This generates a menu entry like this

title 	Debian GNU/Linux, ...
root 	(hd0,0) <= This is wrong, should be (hd0,1)
kernel	...
...

So (hd0,0) for groot is not ok, as it is more or less the same as root
(at least for update-grub).

> Please show us the lines as generated by the installer in grub's menu.lst 
> for the default entry for the installed system and the lines as you think 
> they should be (or better: with which the system does boot).

See above

>> (this is the reason, why I set the severity to grave).
> 
> This is a fairly unusual setup and the error should be easy to correct, 
> especially given that grub menu lines can be corrected during the boot.
> Therefore a RC severity is not correct.

I don't think that softraid1 is that uncommon and correcting the boot
entry on the grub prompt is not that obvious (I guess most people would
not know, what exactly went wrong, where they have to fix it and how).
But it's of course your decision.

Assuming that d-i uses update-grub to generate /boot/grub/menu.lst, I
started digging through /sbin/update-grub and I think I found the problem.
Please see /sbin/update-grub, line 114ff:
It uses mdadm to determine, if the softraid is a raid1 and then
determines the devices by running "mdadm -D -B $1" (as grub does not
support to be installed into /dev/md*, instead it has to be installed
directly on one of the harddisk of the array).
The problem is, that the output of "madm -D -B" has changed between the
version in sarge and etch. The etch version does not output a devices
line anymore. So raiddev will be empty thus the default (hd0,0) will be
taken.
A better approach would be to directly read /proc/mdstat, because it's
output format has not changed. I could even write a patch for that if
desired.
Given that d-i uses /sbin/update-grub, I think that the bug should
probably be reassigned to grub.

Cheers,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: