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
|
@ -27,6 +27,12 @@ else
|
|||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
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 ()
|
||||
{
|
||||
local a=$1
|
||||
|
@ -105,7 +111,7 @@ while [ "x$list" != "x" ] ; do
|
|||
|
||||
cat << EOF
|
||||
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
|
||||
if test -n "${initrd}" ; then
|
||||
cat << EOF
|
||||
|
@ -118,7 +124,7 @@ EOF
|
|||
|
||||
cat << EOF
|
||||
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
|
||||
if test -n "${initrd}" ; then
|
||||
cat << EOF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue