All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gene Czarcinski <gene@czarc.net>
To: "\"GRUB2 Bug\" ." <bug-grub@gnu.org>
Cc: Chris Murphy <bugzilla@colorremedies.com>,
	grub-devel@gnu.org, Gene Czarcinski <gczarcinski@gmail.com>
Subject: BUG: root on BTRFS multi-volume
Date: Sun, 20 Oct 2013 08:30:27 -0400	[thread overview]
Message-ID: <5263CCE3.4020806@czarc.net> (raw)

grub2 has a problem handling the case where root ("/") resides on a 
BTRFS multi-volume storage.

The patch below corrects the problem.  This has been tested on both real 
and virtual hardware on Fedora 18, Fedora 19, and Fedora 20-Beta.

I submitted this last January but it appears to have fallen through the 
creacks.

Gene

-------------------------------------------------------------------------------------------------------------------------------------------------------

 From b9ed3e49354f5159d962c083b68cf06723a4aff5 Mon Sep 17 00:00:00 2001
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
Date: Mon, 14 Oct 2013 16:11:00 -0400
Subject: [PATCH] support for multi-device btrfs volume

The current code produces error messages if passed a device
list with multiple devices for a btrfs volume.  It worked OK
for single device btrfs volume.

This has been regression tested with root/boot on a regular
partition, single device VG logical volume, and single
device btrfs volume.

The name was change from device to devices to indicate that it
could be a device list plus the comments were added.
---
  util/grub-mkconfig_lib.in | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index b48e2af..d4d6ba0 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -270,10 +270,13 @@ gettext_printf () {
    printf "$(gettext "$gettext_printf_format")" "$@"
  }
  
+# $1 may be a list of devices separated by blanks.  grub_probe accepts
+# multiple arguments after --device but each device must be in a separate
+# argument.  Hence ${devices} rather than "${devices}".
  uses_abstraction () {
-  device="$1"
+  devices="$1"
  
-  abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`"
+  abstraction="`"${grub_probe}" --device ${devices} --target=abstraction`"
    for module in ${abstraction}; do
      if test "x${module}" = "x$2"; then
        return 0
-- 
1.8.3.1




                 reply	other threads:[~2013-10-20 14:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5263CCE3.4020806@czarc.net \
    --to=gene@czarc.net \
    --cc=bug-grub@gnu.org \
    --cc=bugzilla@colorremedies.com \
    --cc=gczarcinski@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.