* util/grub-mkconfig_lib.in (uses_abstraction): New function.
* util/grub.d/10_linux.in: Use it to check for LVM, so that LVM-on-RAID is handled correctly.
This commit is contained in:
parent
e3c8cd3719
commit
507736c87c
3 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2010-07-02 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/grub-mkconfig_lib.in (uses_abstraction): New function.
|
||||||
|
* util/grub.d/10_linux.in: Use it to check for LVM, so that
|
||||||
|
LVM-on-RAID is handled correctly.
|
||||||
|
|
||||||
2010-07-02 Colin Watson <cjwatson@ubuntu.com>
|
2010-07-02 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* docs/grub.texi (Changes from GRUB Legacy): New section.
|
* docs/grub.texi (Changes from GRUB Legacy): New section.
|
||||||
|
|
|
@ -190,3 +190,15 @@ version_find_latest ()
|
||||||
gettext_quoted () {
|
gettext_quoted () {
|
||||||
$gettext "$@" | sed "s/'/'\\\\''/g"
|
$gettext "$@" | sed "s/'/'\\\\''/g"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uses_abstraction () {
|
||||||
|
device=$1
|
||||||
|
|
||||||
|
abstraction="`${grub_probe} --device ${device} --target=abstraction`"
|
||||||
|
for module in ${abstraction}; do
|
||||||
|
if test "x${module}" = "x$2"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ esac
|
||||||
|
|
||||||
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|
||||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
|
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
|
||||||
|| [ "x`grub-probe -t abstraction --device ${GRUB_DEVICE}`" = "xlvm" ] ; then
|
|| uses_abstraction "${GRUB_DEVICE}" lvm; then
|
||||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||||
else
|
else
|
||||||
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||||
|
|
Loading…
Add table
Reference in a new issue