diff --git a/grub2-pass-corret-root-for-nfsroot.patch b/grub2-pass-corret-root-for-nfsroot.patch index d6cbc07..4fbd050 100644 --- a/grub2-pass-corret-root-for-nfsroot.patch +++ b/grub2-pass-corret-root-for-nfsroot.patch @@ -13,6 +13,7 @@ grub2-probe not work in probing nfs mounted path. The fix is merely on the script level and not use grub2-probe for above reasons. v2: Filter out autofs and securityfs from /proc/self/mountinfo (bsc#1069094) +v3: Fix the wrong order of GRUB_FS/GRUB_DEVICE (bsc#1221904) --- util/grub-mkconfig.in | 37 ++++++++++++++++++++++++++++++------- @@ -20,7 +21,7 @@ v2: Filter out autofs and securityfs from /proc/self/mountinfo (bsc#1069094) --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in -@@ -131,26 +131,54 @@ +@@ -131,26 +131,55 @@ exit 1 fi @@ -65,16 +66,17 @@ v2: Filter out autofs and securityfs from /proc/self/mountinfo (bsc#1069094) + GRUB_DEVICE_PARTUUID="" + GRUB_FS="unknown" +else ++ # Device containing our userland. Typically used for root= parameter. ++ GRUB_DEVICE="`${grub_probe} --target=device /`" + # Filesystem for the device containing our userland. Used for stuff like + # choosing Hurd filesystem module. + GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`" -+ # 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 + GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true +fi -if [ x"$GRUB_FS" = xunknown ]; then ++# Strive to circumvent grub to enable unsupported filesystem, for eg, nfsroot +if [ x"$GRUB_FS" = x ] || [ x"$GRUB_FS" = xunknown ]; then GRUB_FS="$(stat -f -c %T / || echo unknown)" fi diff --git a/grub2.changes b/grub2.changes index 509fba4..3479005 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 25 02:20:38 UTC 2024 - Michael Chang + +- Correct the erroneous sequence in determining GRUB_FS and GRUB_DEVICE + (bsc#1221904) + * grub2-pass-corret-root-for-nfsroot.patch + ------------------------------------------------------------------- Fri Mar 22 06:01:13 UTC 2024 - Michael Chang