grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined
@ 2013-12-06 12:50 Colin Watson
  2013-12-06 13:12 ` Colin Watson
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Watson @ 2013-12-06 12:50 UTC (permalink / raw)
  To: grub-devel

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  <cjwatson@ubuntu.com>
+
+	* 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  <floppym@gentoo.org>
 
 	* 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-06 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 12:50 [PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined Colin Watson
2013-12-06 13:12 ` Colin Watson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).