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

Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)

On Thu, 2013-04-25 at 15:40 +0100, Steve McIntyre wrote:
> Hi folks,
> I opened #698914 a while back, concerned about the lack of support in
> grub and os-prober for detecting Windows 8 on UEFI systems so that
> working boot entries would be added automatically at installation
> time. At the time, I did not consider the issue RC. However,
> discussion yesterday with Wolodja Wentland suggests that this is
> becoming a more common problem than I feared, and users are tripping
> over this and asking for support on #debian and elsewhere. I'm
> thinking that this bug should therefore be considered RC for the
> Wheezy r0 release at this point.
> He pointed me at an existing set of patches from the folks at
> openSUSE, which I've adapted very slightly and tested out:
>  * Using an existing installation
>  * Using a locally-built CD to test the os-prober udeb
> and all works fine, fixing the bug nicely. I would like to upload (and
> get unblocks for) new grub2 and os-prober packages - see debdiffs of
> changes attached. The changes are quite small and targeted, only
> affecting code paths for EFI systems.
> What do you think?

I agree that this is RC; we must not break Windows installations when
going to dual-boot and it is not safe to assume that UEFI systems have a
usable firmware boot menu.

> --- os-prober-1.57/os-probes/mounted/x86/05efi  1970-01-01 01:00:00.000000000 +0100
> +++ os-prober-1.58/os-probes/mounted/x86/05efi  2013-04-25 15:30:14.000000000 +0100
> @@ -0,0 +1,70 @@
> +#!/bin/sh
> +# Detects all Microsoft OSes on a collection of partitions.
> +
> +. /usr/share/os-prober/common.sh
> +
> +partition="$1"
> +mpoint="$2"
> +type="$3"
> +
> +# This file is for UEFI platform only
> +if [ ! -d /sys/firmware/efi ]; then
> +       debug "Not on UEFI platform"
> +       exit 1
> +fi

This directory only exists if efivars is loaded.  I assume that SUSE
configures it as built-in, and our kernel package has a patch to trigger
autoloading of efivars on systems with EFI.  But for the benefit of
people using custom kernel packages, can you check that update-grub will
modprobe efivars *before* running os-prober?  Alternately, could
update-grub explicitly tell os-prober to look for EFI boot loaders if
grub-efi is installed?

(Really, I think grub-efi ought to pull the boot entries from EFI
variables at boot time and append them to the menu.  But that's a rather
large chunk of work.)


Ben Hutchings
Klipstein's 4th Law of Prototyping and Production:
                                    A fail-safe circuit will destroy others.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: