From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vourw-000504-Ql for mharc-grub-devel@gnu.org; Fri, 06 Dec 2013 07:50:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vourt-0004zD-JD for grub-devel@gnu.org; Fri, 06 Dec 2013 07:50:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vours-0001x3-Ac for grub-devel@gnu.org; Fri, 06 Dec 2013 07:50:53 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:51322 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vours-0001wo-5R for grub-devel@gnu.org; Fri, 06 Dec 2013 07:50:52 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1Vourr-0007S2-2M for grub-devel@gnu.org; Fri, 06 Dec 2013 12:50:51 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Vourq-000232-8H for grub-devel@gnu.org; Fri, 06 Dec 2013 12:50:50 +0000 Date: Fri, 6 Dec 2013 12:50:48 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: [PATCH] Make grub-mkconfig fail if GRUB_FS cannot be determined Message-ID: <20131206125048.GA7654@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 12:50:54 -0000 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 + + * 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 * 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