2008-05-30 Robert Millan <rmh@aybabtu.com>
* util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable. * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as the `root' parameter to Linux.
This commit is contained in:
parent
51500452b9
commit
5786569b41
3 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
* util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
|
||||||
|
* util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
|
||||||
|
GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
|
||||||
|
the `root' parameter to Linux.
|
||||||
|
|
||||||
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
2008-05-30 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* commands/search.c (options): Rename --fs_uuid to --fs-uuid.
|
* commands/search.c (options): Rename --fs_uuid to --fs-uuid.
|
||||||
|
|
|
@ -27,6 +27,12 @@ else
|
||||||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] ; then
|
||||||
|
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||||
|
else
|
||||||
|
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||||
|
fi
|
||||||
|
|
||||||
test_numeric ()
|
test_numeric ()
|
||||||
{
|
{
|
||||||
local a=$1
|
local a=$1
|
||||||
|
@ -105,7 +111,7 @@ while [ "x$list" != "x" ] ; do
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${OS}, linux ${version}" {
|
menuentry "${OS}, linux ${version}" {
|
||||||
linux ${rel_dirname}/${basename} root=${GRUB_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}
|
linux ${rel_dirname}/${basename} root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}
|
||||||
EOF
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
@ -118,7 +124,7 @@ EOF
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
menuentry "${OS}, linux ${version} (single-user mode)" {
|
menuentry "${OS}, linux ${version} (single-user mode)" {
|
||||||
linux ${rel_dirname}/${basename} root=${GRUB_DEVICE} ro single ${GRUB_CMDLINE_LINUX}
|
linux ${rel_dirname}/${basename} root=${LINUX_ROOT_DEVICE} ro single ${GRUB_CMDLINE_LINUX}
|
||||||
EOF
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
|
@ -152,7 +152,7 @@ esac
|
||||||
export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
|
export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
|
||||||
|
|
||||||
# These are optional, user-defined variables.
|
# These are optional, user-defined variables.
|
||||||
export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL GRUB_SERIAL_COMMAND
|
export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID
|
||||||
|
|
||||||
exec > ${grub_cfg}.new
|
exec > ${grub_cfg}.new
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue