grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: [PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined
Date: Fri, 6 Dec 2013 12:50:48 +0000	[thread overview]
Message-ID: <20131206125048.GA7654@riva.ucam.org> (raw)

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


             reply	other threads:[~2013-12-06 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 12:50 Colin Watson [this message]
2013-12-06 13:12 ` [PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined Colin Watson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131206125048.GA7654@riva.ucam.org \
    --to=cjwatson@ubuntu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).