[Bug 1048763] Re: grub-mkconfig/probe gives incorrect device name on PowerPC
Phillip Susi
psusi at ubuntu.com
Fri Oct 5 15:58:34 UTC 2012
You seem to be questioning grub internals rather than actually
describing a problem. At least I can't see anything that isn't working
as it should be in your description. (hd0) is grub's name for the first
hard disk detected, and is correct. If there is an actual problem with
using this name, please describe it.
** Changed in: grub2 (Ubuntu)
Status: New => Incomplete
--
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:
Incomplete
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 elseif 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)
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