Grub2 does not setup existing linux operating systems correctly on PowerPC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fedora |
New
|
Undecided
|
Unassigned | ||
os-prober (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello
I don't know if Ubuntu have any plans to use Grub2 for PowerPC, but currently there is an easily fixable bug with os-prober:
Existing installations that use yaboot will normally have their root defined like so in a yaboot.conf:
root=UUID=
However, os-prober (or more accuratly the file 40yaboot) when it scans the yaboot.conf will read this as
root=UUID
Consequently, when the operating system is selected from a grub2 menu it fails to boot.
This can be solved by changing (in 40yaboot)
case "$1" in
root)
rootdev=
to
case "$1" in
root)
shift 1
rootdev=
I'll make a proper diff patch when I'm back on a linux machine. I'm not sure if the shift 1 is necessary. but some of the other cases seem to have it so I put it in.
I had a look at yaboot-installer to see how that does things and interestingly that has its own piece of code to setup root:
# Get UUID= or LABEL= for the given unix partition block device.
# If it could not be determined, give the unix partition block device back.
uuidlabel() {
echo `devsymlink "$1" nobyid` \
| sed -e "s,/dev/
-e "s,/dev/
}
root="`uuidlabel "$mappedpartiti
This therefore doesn't suffer from this bug. It's actually quite a sensible thing to do since root=/dev/sdx (which a lot of old installs used to use) is unreliable. I don't know whether to create a patch for os-prober to do the same, or if the grub2 scripts should really sort it out.
Anyway, that's turned into a bit of a ramble. Oh, nearly forgot, fedora also has a patch on os-prober for PowerPC - see https:/
I'm toying with the idea of creating an updated iso for Ubuntu 12.04. If I do then I plan to use Grub2 as the bootloader. If you would like to collaborate on shifting PowerPC to grub2 then get in touch!
Thanks
Attached is the patch. If anybody wants to fix this on their system then all you need to do is edit the file /usr/lib/ linux-boot- probes/ mounted/ 40yaboot and apply the changes.