grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined


From: Colin Watson
Subject: [PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined
Date: Fri, 6 Dec 2013 12:50:48 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Commit c0f90770b89e05730919e7d97cc9abeb84232777 caused grub-mkconfig
to carry on anyway if "grub-probe --target=fs /" fails.  However,
this was in 2007 when GRUB's filesystem support was much less
complete.  Nowadays this can be expected to only fail in bad
situations, and will almost certainly lead to the generated grub.cfg
being useless, so it makes no sense for grub-mkconfig to succeed.

Fixes the last part of Debian bug #707831.
---
 ChangeLog             | 6 ++++++
 util/grub-mkconfig.in | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c680ba1..ae0ef4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-06  Colin Watson  <address@hidden>
+
+       * util/grub-mkconfig.in: Fail if GRUB_FS cannot be determined.
+       Nowadays this indicates a rather bad failure and almost certainly an
+       unusable grub.cfg; it makes no sense for grub-mkconfig to succeed.
+
 2013-12-05  Mike Gilbert  <address@hidden>
 
        * INSTALL: Raise minimum python version to 2.6.
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 016ee82..a160c83 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -137,7 +137,7 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device 
${GRUB_DEVICE_BOOT} --target=fs_u
 
 # 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`"
+GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs`"
 
 if test -f ${sysconfdir}/default/grub ; then
   . ${sysconfdir}/default/grub
-- 
1.8.4.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]