[Bug 1048763] Re: grub-mkconfig/probe gives incorrect device name on PowerPC
Phillip Susi
psusi at ubuntu.com
Mon Oct 8 02:34:20 UTC 2012
I'm pretty sure that it should be "hd0". Can you be more specific about
"doesn't work" and do you mean to say that changing to "hd" fixes it?
Can you get to the grub prompt and just run an ls command and list the
results?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1048763
Title:
grub-mkconfig/probe gives incorrect device name on PowerPC
Status in “grub2” package in Ubuntu:
Confirmed
Bug description:
Hi, in my grub.cfg created with grub-mkconfig I have repeated lines
like this:
set root='(hd0,apple4)'
search --no-floppy --fs-uuid --set=root big-long-number-1000
I'm on PowerPC and the 'hd0' I think should be just 'hd' (the
openfirmware devalias).
Tracing this back through the code I find it comes from
prepare_grub_to_access_device (in grub-mkconfig_lib.in) which calls
grub-probe (and this is where the hd0 comes from). I haven't delved
any further than this yet (I'm very rusty at reading code). Obviously
it would be great to fix grub-probe for PowerPC, but there is an
obvious and easy solution in prepare_grub_to_access_device. Currently
the code is:
# If there's a filesystem UUID that GRUB is capable of identifying, use it;
# otherwise set root as per value in device.map.
echo "set root='`"${grub_probe}" --device "${device}" --target=drive`'"
if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then
echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
fi
I think there should be an else in there. Currently it sets root
using the device map and then immediatly overrides it with the UUID.
I can't see why it should be done twice. It should be one or the
other: use the device map OR the UUID. This would also make grub.cfg
files shorter and easier to read.
If you need anymore info let me know! Thanks
lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04
dpkg -l | grep grub
ii grub-common 1.99-21ubuntu3.1 GRand Unified Bootloader (common files)
ii grub-ieee1275 1.99-21ubuntu3.1 GRand Unified Bootloader, version 2 (Open Firmware version)
ii grub-ieee1275-bin 1.99-21ubuntu3.1 GRand Unified Bootloader, version 2 (Open Firmware binaries)
ii grub2-common 1.99-21ubuntu3.1 GRand Unified Bootloader (common files for version 2)
EDIT: changed the elseif to just else
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1048763/+subscriptions
More information about the foundations-bugs
mailing list