Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477314 - ~sys-boot/grub-2.00 - add patch for 30_os-prober for grub2-mkconfig to detect MS windows bootloader on EFI
Summary: ~sys-boot/grub-2.00 - add patch for 30_os-prober for grub2-mkconfig to detect...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL: http://bzr.savannah.gnu.org/lh/grub/t...
Whiteboard:
Keywords:
Depends on: 477312
Blocks:
  Show dependency tree
 
Reported: 2013-07-18 15:43 UTC by Ben Kohler
Modified: 2013-07-21 00:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
grub-2.00-os-prober-EFI-support.patch (grub-2.00-os-prober-EFI-support.patch,701 bytes, patch)
2013-07-18 15:43 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2013-07-18 15:43:35 UTC
Created attachment 353600 [details, diff]
grub-2.00-os-prober-EFI-support.patch

Currently grub2-mkconfig's 30_os-prober script cannot find the MS windows bootloader if it is installed on the EFI system partition.  I've attached a patch from debian which adds this support, it will depend on a bump to >=sys-boot/os-prober-1.58, but it should not affect backwards compatibility with older os-prober.
Comment 1 Mike Gilbert gentoo-dev 2013-07-18 20:09:28 UTC
I would rather see this applied upstream first.

http://www.gnu.org/software/grub/grub-development.html
Comment 2 Ben Kohler gentoo-dev 2013-07-18 20:27:19 UTC
http://lists.gnu.org/archive/html/grub-devel/2013-05/msg00108.html

I don't know where we go from here.
Comment 3 Ben Kohler gentoo-dev 2013-07-18 20:51:02 UTC
This is in current upstream bzr trunk but I have no idea how to pinpoint when the change happened.  They do not seem to have a web interface and I don't know my way around bzr from command-line.

# bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub
# grep "efi)" -B3 -A18 grub/util/grub.d/30_os-prober.in
}
EOF 
    ;;
    efi)

        EFIPATH=${DEVICE#*@}
        DEVICE=${DEVICE%@*}
        onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
      cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' {
EOF   
      save_default_entry | sed -e "s/^/\t/"
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"

      cat <<EOF
        chainloader ${EFIPATH}
}
EOF 
    ;;
    linux)
      if [ "x$BTRFS" = "xbtrfs" ]; then
         LINUXPROBED="`linux-boot-prober btrfs ${BTRFSuuid} ${BTRFSsubvol}  2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
#
Comment 4 Ben Kohler gentoo-dev 2013-07-18 20:53:28 UTC
Found it, sorry for all this noise:

------------------------------------------------------------
revno: 5022
committer: Andrey Borzenkov <arvidjaar@gmail.com>
branch nick: grub
timestamp: Fri 2013-05-31 20:29:03 +0400
message:
        * util/grub.d/30_os-prober.in: Add support for probing EFI
        System Partition (as of os-prober 1.58).
------------------------------------------------------------
Comment 5 Mike Gilbert gentoo-dev 2013-07-18 22:00:23 UTC
Thank you for finding that!
Comment 6 Mike Gilbert gentoo-dev 2013-07-21 00:38:02 UTC
+*grub-2.00-r4 (21 Jul 2013)
+
+  21 Jul 2013; Mike Gilbert <floppym@gentoo.org>
+  +files/grub-2.00-os-prober-efi-system.patch, +grub-2.00-r4.ebuild,
+  grub-9999.ebuild:
+  Add support for probing EFI system partition, bug 477314 by Ben Kohler.
+  Respect bashcompdir, bug 477392 by Alphat-PC.