Magellan Linux

Contents of /trunk/grub/patches/grub-2.04-grub-mkconfig-fallback-to-blkid-instead-of-grub-probe-for-unknown-root-partition-types.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3533 - (show annotations) (download)
Tue Jul 7 12:52:51 2020 UTC (3 years, 10 months ago) by niro
File size: 876 byte(s)
-rediffed for grub-2.04
1 diff -Naur grub-2.04/util/grub-mkconfig.in grub-2.04-magellan/util/grub-mkconfig.in
2 --- grub-2.04/util/grub-mkconfig.in 2019-05-20 12:59:36.000000000 +0200
3 +++ grub-2.04-magellan/util/grub-mkconfig.in 2020-07-07 14:51:48.127358642 +0200
4 @@ -134,6 +134,14 @@
5 # Device containing our userland. Typically used for root= parameter.
6 GRUB_DEVICE="`${grub_probe} --target=device /`"
7 GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
8 +# workaround unknown partion types
9 +if [ x"${GRUB_DEVICE_UUID}" = x ]
10 +then
11 + if [ -x `type -P blkid` ]
12 + then
13 + GRUB_DEVICE_UUID="`blkid -s UUID -o value ${GRUB_DEVICE} 2> /dev/null`" || true
14 + fi
15 +fi
16 GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true
17
18 # Device containing our /boot partition. Usually the same as GRUB_DEVICE.