2008-05-30 Robert Millan <rmh@aybabtu.com>
* commands/search.c (options): Rename --fs_uuid to --fs-uuid. * util/update-grub_lib.in (prepare_grub_to_access_device): Replace --fs_uuid with --fs-uuid. * util/update-grub.in: Allow filesystem UUID probes to fail (since not all filesystems support them).
This commit is contained in:
parent
811d3878d8
commit
51500452b9
4 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
* commands/search.c (options): Rename --fs_uuid to --fs-uuid.
|
||||||
|
* util/update-grub_lib.in (prepare_grub_to_access_device): Replace
|
||||||
|
--fs_uuid with --fs-uuid.
|
||||||
|
* util/update-grub.in: Allow filesystem UUID probes to fail (since not
|
||||||
|
all filesystems support them).
|
||||||
|
|
||||||
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
|
* fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
|
||||||
|
|
|
@ -32,7 +32,7 @@ static const struct grub_arg_option options[] =
|
||||||
{
|
{
|
||||||
{"file", 'f', 0, "search devices by a file (default)", 0, 0},
|
{"file", 'f', 0, "search devices by a file (default)", 0, 0},
|
||||||
{"label", 'l', 0, "search devices by a filesystem label", 0, 0},
|
{"label", 'l', 0, "search devices by a filesystem label", 0, 0},
|
||||||
{"fs_uuid", 'u', 0, "search devices by a filesystem UUID", 0, 0},
|
{"fs-uuid", 'u', 0, "search devices by a filesystem UUID", 0, 0},
|
||||||
{"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first device found", "VAR", ARG_TYPE_STRING},
|
{"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first device found", "VAR", ARG_TYPE_STRING},
|
||||||
{0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,11 +101,11 @@ fi
|
||||||
|
|
||||||
# Device containing our userland. Typically used for root= parameter.
|
# Device containing our userland. Typically used for root= parameter.
|
||||||
GRUB_DEVICE="`grub-probe --target=device /`"
|
GRUB_DEVICE="`grub-probe --target=device /`"
|
||||||
GRUB_DEVICE_UUID="`grub-probe --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`"
|
GRUB_DEVICE_UUID="`grub-probe --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
|
||||||
|
|
||||||
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
|
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
|
||||||
GRUB_DEVICE_BOOT="`grub-probe --target=device /boot`"
|
GRUB_DEVICE_BOOT="`grub-probe --target=device /boot`"
|
||||||
GRUB_DEVICE_BOOT_UUID="`grub-probe --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`"
|
GRUB_DEVICE_BOOT_UUID="`grub-probe --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
|
||||||
|
|
||||||
# Filesystem for the device containing our userland. Used for stuff like
|
# Filesystem for the device containing our userland. Used for stuff like
|
||||||
# choosing Hurd filesystem module.
|
# choosing Hurd filesystem module.
|
||||||
|
|
|
@ -117,7 +117,7 @@ prepare_grub_to_access_device ()
|
||||||
# If there's a filesystem UUID that GRUB is capable of identifiing, use it;
|
# If there's a filesystem UUID that GRUB is capable of identifiing, use it;
|
||||||
# otherwise set root as per value in device.map.
|
# otherwise set root as per value in device.map.
|
||||||
if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2> /dev/null`" ; then
|
if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2> /dev/null`" ; then
|
||||||
echo "search --fs_uuid --set ${fs_uuid}"
|
echo "search --fs-uuid --set ${fs_uuid}"
|
||||||
else
|
else
|
||||||
echo "set root=`${grub_probe} --device ${device} --target=drive`"
|
echo "set root=`${grub_probe} --device ${device} --target=drive`"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue