bug-grub
[Top][All Lists]
Advanced

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

[bug #39498] grub-mkconfig_lib creates "search" lines incorrectly for mu


From: Evan Callicoat
Subject: [bug #39498] grub-mkconfig_lib creates "search" lines incorrectly for multi-device volumes
Date: Tue, 16 Jul 2013 20:50:49 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20130627 Firefox/22.0 conkeror/1.0pre

URL:
  <http://savannah.gnu.org/bugs/?39498>

                 Summary: grub-mkconfig_lib creates "search" lines incorrectly
for multi-device volumes
                 Project: GNU GRUB
            Submitted by: apsu
            Submitted on: Tue 16 Jul 2013 08:50:48 PM GMT
                Category: Configuration
                Severity: Major
                Priority: 5 - Normal
              Item Group: Software Error
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Evan Callicoat
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: Bazaar - trunk
         Reproducibility: Every Time
         Planned Release: None

    _______________________________________________________

Details:

When grub-mkconfig is called for a grub installation on a multi-device btrfs
volume, the function prepare_grub_to_access_device() is called from the
/usr/share/grub/grub-mkconfig_lib bash library, which has this block of code
in it:

if fs_uuid="`"${grub_probe}" --device "$@" --target=fs_uuid 2> /dev/null`" ;
then
hints="`"${grub_probe}" --device "$@" --target=hints_string 2> /dev/null`" ||
hints=
echo "if [ x\$feature_platform_search_hint = xy ]; then"
echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
echo "else"
echo " search --no-floppy --fs-uuid --set=root ${fs_uuid}"
echo "fi"
fi

The ${grub_probe} call with --target=hints_string will return multiple lines
of output when --device refers to more than one device, which is the case for
multi-device btrfs volumes (and probably others). Normally, the newlines would
be converted to space-separated fields via the default IFS, but because the
echo lines put double-quotes around ${hints}, the newline separators are
preserved, resulting in a completely broken "search" line output in grub.cfg.

It seems that the search and its hints isn't strictly necessary as I haven't
seen any configuration fail to boot without it, but this is a fairly simple
bug to fix so I figured I should follow up on it.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39498>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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