[Top][All Lists]

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

Re: grub2 on power6 box.

From: Lennart Sorensen
Subject: Re: grub2 on power6 box.
Date: Fri, 23 Jul 2010 16:02:56 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Jul 23, 2010 at 02:35:48PM -0400, Lennart Sorensen wrote:
> Turns out using nvalias instead of devalias makes it permanent.
> So I now boot to grub directly with an nvalias hd /pci.... set and
> boot-device set to hd (which means boot the PReP boot partition).
> I now have to set root manually to (md0) and then load /boot/grub/grub.cfg
> as a configfile.  Then I can boot.  The fat partition is now needed
> at all.  The grub image has mdraid, raid and ext modules included in it
> and then dd'd to the PReP partition.
> So how do I convince grub where to look for the config, or should I
> create a small config file that sets the root and loads a config file
> and embed that in the image perhaps?

OK, I am now booting from the disk directly.  Here are the steps I took.
Perhaps someone can help make grub-install actually work out of the box
on the IBM pSeries based on this.

I created a permanent devalias called hd using:
nvalias hd

I set boot-device to hd

The resulting nvram --print-config stuff is:
devalias  valias hd /address@hidden/pci1014,address@hidden/sas/address@hidden   

I have an msdos partition table on my two disks with:
8MB partition1 type 0x41 (PReP boot partition)
140GB partition2 type 0xfd (linux raid autodetect)
6GB partition3 type 0xfd (linux raid autodetect)

This is then turned into md0 (for the 140GB partitions) and md1 (for
the 6GB partitions).  md1 is swap, md0 is root filesystem.

Fixing ofpathname in powerpc-ibm-utils (debian package name) to use find
/sys -type d -name $device makes it able to find the right OF pathnames,
but grub is unable to use those at this time, hence the manual devalias
above.  If grub ever did support the actual path, then the devalias
won't be needed and the ofpathname fix would be required.

I ran grub-install /dev/sda1 after hacking the script to not complain
about /boot/grub not being a seperate partition (that applies to Macs
and such, not the IBM).  I noted what modules it generated /boot/grub/grub
with.  It got the list right (ext2, mdraid, raid in my case) except it
missed that the partition table format is part_msdos.  I added part_msdos
and ram grub-mkimage again manually with the same arguments.  I also
added -p '(md0)/boot/grub' to embed the correct path to /boot/grub into
the image.  This was very important.  I then dd'd /boot/grub/grub to
/dev/sda1 and /dev/sdb1 (the PReP partitions) and set the partitions
bootable (not that I think it matters if they are bootable).

After all that, the IBM pSeries p520 power6 now boots directly from disk.

So how would one explain to grub-install that it needs part_msdos when
the partition tables that the md devices are running on are of type msdos?
How would one make it automatically add the correct prefix (since it
needs either (hd,msdos#)/boot/grub or (md0)/boot/grub or similar added
instead of the default)?  And of course finally it would have to dd to
the target device, rather than just create a file and try to make the
firmware boot that file.  The boot device also has to be the full disk
on the IBM, not a disk,partition,file combination.

But hey, at least it can work with a bit of manual work.

Thanks for the hints everyone.

Len Sorensen

reply via email to

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