2008-05-30 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (prepare_grub_to_access_device): New function. * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without converting it first. * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup grub.cfg for access to font file, and afterwards call it again to set the root device.
This commit is contained in:
parent
6219127445
commit
972e2f7a66
4 changed files with 34 additions and 12 deletions
|
@ -96,6 +96,22 @@ convert_system_path_to_grub_path ()
|
|||
echo ${drive}${relative_path}
|
||||
}
|
||||
|
||||
prepare_grub_to_access_device ()
|
||||
{
|
||||
device=$1
|
||||
|
||||
# If there's a filesystem UUID that GRUB is capable of identifiing, use it;
|
||||
# otherwise set root as per value in device.map.
|
||||
if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2> /dev/null`" ; then
|
||||
echo "search --fs_uuid --set ${fs_uuid}"
|
||||
else
|
||||
echo "set root=`${grub_probe} --device ${device} --target=drive`"
|
||||
fi
|
||||
|
||||
# Abstraction modules aren't auto-loaded.
|
||||
GRUB_PRELOAD_MODULES="${GRUB_PRELOAD_MODULES} `${grub_probe} --device ${device} --target=abstraction`"
|
||||
}
|
||||
|
||||
font_path ()
|
||||
{
|
||||
# Prefer system path for space reasons (/boot/grub might be a very small
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue