1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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
|