From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VXtzz-0007dv-C0 for mharc-grub-devel@gnu.org; Sun, 20 Oct 2013 10:28:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXsAD-0001Zf-5m for grub-devel@gnu.org; Sun, 20 Oct 2013 08:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXsA7-0002uy-K6 for grub-devel@gnu.org; Sun, 20 Oct 2013 08:31:21 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:37882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXs9r-0002tr-NX; Sun, 20 Oct 2013 08:30:59 -0400 X-Authority-Analysis: v=2.0 cv=as0w+FlV c=1 sm=0 a=AxD31EDPJ9zkilLEVKP7ag==:17 a=0e3tnBqgHoYA:10 a=3KVzincvWKMA:10 a=f0jmrtGiMRwA:10 a=103jMkqsgCkA:10 a=8nJEP1OIZ-IA:10 a=BIJj-m-0AAAA:8 a=KGjhK52YXX0A:10 a=z1pzjfZcxKsA:10 a=vTr9H3xdAAAA:8 a=mnFSM7W8Cd-VzT-5QK8A:9 a=wPNLvfGTeEIA:10 a=DGUv9C6miAAA:10 a=AxD31EDPJ9zkilLEVKP7ag==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 174.106.200.117 Received: from [174.106.200.117] ([174.106.200.117:40735] helo=condor.lcl) by cdptpa-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id D7/76-27766-CFCC3625; Sun, 20 Oct 2013 12:30:53 +0000 Message-ID: <5263CCE3.4020806@czarc.net> Date: Sun, 20 Oct 2013 08:30:27 -0400 From: Gene Czarcinski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: "\"GRUB2 Bug\" ." Subject: BUG: root on BTRFS multi-volume Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 75.180.132.120 X-Mailman-Approved-At: Sun, 20 Oct 2013 10:28:54 -0400 Cc: Chris Murphy , grub-devel@gnu.org, Gene Czarcinski 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: Sun, 20 Oct 2013 12:31:26 -0000 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 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