bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: root on BTRFS multi-volume


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: BUG: root on BTRFS multi-volume
Date: Sun, 20 Oct 2013 15:42:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

Obviously you didn't check if this is already corrected in trunk.
On 20.10.2013 14:30, Gene Czarcinski wrote:
> 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 <address@hidden>
> 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


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]