diff options
Diffstat (limited to 'sys-boot/grub/files/ubuntu-upstream-1.98/962_no_device_map.diff')
-rw-r--r-- | sys-boot/grub/files/ubuntu-upstream-1.98/962_no_device_map.diff | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/sys-boot/grub/files/ubuntu-upstream-1.98/962_no_device_map.diff b/sys-boot/grub/files/ubuntu-upstream-1.98/962_no_device_map.diff new file mode 100644 index 00000000..c129254a --- /dev/null +++ b/sys-boot/grub/files/ubuntu-upstream-1.98/962_no_device_map.diff @@ -0,0 +1,112 @@ +Ubuntu: Don't generate a device map by default. + +diff -Nur -x '*.orig' -x '*~' grub2/util/grub-install.in grub2.new/util/grub-install.in +--- grub2/util/grub-install.in 2010-03-22 14:11:42.000000000 +0000 ++++ grub2.new/util/grub-install.in 2010-03-22 16:23:14.000000000 +0000 +@@ -39,7 +39,6 @@ + else + grub_mkimage=${bindir}/`echo grub-mkelfimage | sed ${transform}` + fi +-grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}` + grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` + grub_editenv=${bindir}/`echo grub-editenv | sed ${transform}` + rootdir= +@@ -74,7 +73,6 @@ + instead of the root directory + --grub-setup=FILE use FILE as grub-setup + --grub-mkimage=FILE use FILE as grub-mkimage +- --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap + --grub-probe=FILE use FILE as grub-probe + --no-floppy do not probe any floppy drive + --recheck probe a device map even if it already exists +@@ -124,7 +122,7 @@ + --grub-mkimage=*) + grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;; + --grub-mkdevicemap=*) +- grub_mkdevicemap=`echo "$option" | sed 's/--grub-mkdevicemap=//'` ;; ++ : ;; # compatibility only + --grub-probe=*) + grub_probe=`echo "$option" | sed 's/--grub-probe=//'` ;; + --no-floppy) +@@ -209,14 +207,6 @@ + exit 1 + fi + +-set $grub_mkdevicemap dummy +-if test -f "$1"; then +- : +-else +- echo "$1: Not found." 1>&2 +- exit 1 +-fi +- + # Create the GRUB directory if it is not present. + test -d "$bootdir" || mkdir "$bootdir" || exit 1 + test -d "$grubdir" || mkdir "$grubdir" || exit 1 +@@ -226,22 +216,14 @@ + rm -f $device_map + fi + +-# Create the device map file if it is not present. ++# Make sure that there is no duplicated entry in the device map. + if test -f "$device_map"; then +- : +-else +- # Create a safe temporary file. +- test -n "$mklog" && log_file=`$mklog` +- +- $grub_mkdevicemap --device-map=$device_map $no_floppy || exit 1 +-fi +- +-# Make sure that there is no duplicated entry. +-tmp=`sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' $device_map \ +- | sort | uniq -d | sed -n 1p` +-if test -n "$tmp"; then +- echo "The drive $tmp is defined multiple times in the device map $device_map" 1>&2 +- exit 1 ++ tmp=`sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' $device_map \ ++ | sort | uniq -d | sed -n 1p` ++ if test -n "$tmp"; then ++ echo "The drive $tmp is defined multiple times in the device map $device_map" 1>&2 ++ exit 1 ++ fi + fi + + # Copy the GRUB images to the GRUB directory. +diff -Nur -x '*.orig' -x '*~' grub2/util/grub-mkconfig.in grub2.new/util/grub-mkconfig.in +--- grub2/util/grub-mkconfig.in 2010-03-22 16:23:13.000000000 +0000 ++++ grub2.new/util/grub-mkconfig.in 2010-03-22 16:23:57.000000000 +0000 +@@ -31,7 +31,6 @@ + grub_cfg="" + grub_mkconfig_dir=${sysconfdir}/grub.d + +-grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}` + grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` + + # Usage: usage +@@ -96,14 +95,6 @@ + fi + fi + +-set $grub_mkdevicemap dummy +-if test -f "$1"; then +- : +-else +- echo "$1: Not found." 1>&2 +- exit 1 +-fi +- + set $grub_probe dummy + if test -f "$1"; then + : +@@ -114,10 +105,6 @@ + + mkdir -p ${grub_prefix} + +-if test -e ${grub_prefix}/device.map ; then : ; else +- ${grub_mkdevicemap} +-fi +- + # Device containing our userland. Typically used for root= parameter. + GRUB_DEVICE="`${grub_probe} --target=device /`" + GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true |