grub-devel
[Top][All Lists]
Advanced

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

Re: Various build failures in current bzr tree


From: Lennart Sorensen
Subject: Re: Various build failures in current bzr tree
Date: Fri, 10 Feb 2012 10:54:50 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Feb 10, 2012 at 12:02:52AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
> On 09.02.2012 21:56, Lennart Sorensen wrote:
> >On Thu, Feb 09, 2012 at 03:50:45PM -0500, Lennart Sorensen wrote:
> >>grub-install also still (as reported about 2 years ago) tries to use
> >>$grub_device rather than $install_device when getting the partition
> >>table type.
> >>
> >>However, I did now manage to boot after fixing that.
> >>
> >>So there is a chance I can make a patch to fix grub-install soon so it
> >>actually works on IBM power systems.  Given I have a production machine
> >>and a new machine around for a few days I can experiment until it
> >>is right.
> >Is this supposed to work:
> >
> >address@hidden:~# /usr/sbin/grub-probe --device /dev/md0 --target=abstraction
> >diskfilter mdraid1x
> >address@hidden:~# /usr/sbin/grub-probe --device /dev/md1 --target=abstraction
> >/usr/sbin/grub-probe: error: Couldn't find PV (null). Check your device.map.
> >
> >md0 is raid1, md1 is raid5, but with a missing device at the moment.
> >
> >Does grub-probe not work if the raid5 isn't fully healthy?
> >
> The problem is how to figure out which partmap module is used on the
> missing disk (which isn't necessarily the same as on the other
> disks). Do you have any ideas?

Hmm, good question.  So not working in this case is expected then at
this time.  However, is not returning the partition table of the devices
you can find better than returning the partition map of what is found?

By the way, does grub-probe have any way to return the underlying device
of an md device?

It seems that if you are running raid, then you have to find the raw
device in order to find the PReP partition there to install grub to
(since that is the only place you can use on an IBM powerpc machine).

So in my current setup I have:

sda1: 8MB PReP boot (type 0x41) partition
sdb1: same
sdc1: will be the same as soon as sdc arives from IBM (just ordered it).
sda2/sdb2: raid1 1GB ext3 mounted as /boot.  Will have sdc2 join it later.
sda3/sdb3/sdc3 (when present): raid5 ext4 mounted as /

So what grub-install should preferably do is figure out that / is md1,
/boot is md0 which is raid1 on sda2 and sdb2, and that hence the boot
partition to install to should be on sda and sdb.  It already has code
to detect the type 0x41 partition, but it seems to only work when there
is no raid involved.

What I did so far is change a few places using $grub_device to
$install_device in grub-install, and then run grub-install /dev/sda1,
and that actually does the right thing now since that allows it to get
the partion table type of sda1 and include part_msdos.

It also sets the nvram to boot from whatever sda is called in ofpathname.

Of course I want it to set nvram to both sda and sdb (and eventually sdc)
so that the system can still boot in case of disk failure, and I want
grub installed to the boot partition of all three drives.  If I could pass
/dev/sda1 /dev/sdb1 /dev/sdc1 to grub-install and have it install to all
three, and add all three disks to the nvram, that would be exactly right.

For now I did grub-install /dev/sda1;grub-install /dev/sdb1; and then
manually updated the nvram to have both disks as boot devices.

-- 
Len Sorensen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]