Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
On Sat, 2013-04-27 at 15:01 +0100, Adam D. Barratt wrote: On Sat, 2013-04-27 at 15:37 +0200, Cyril Brulebois wrote: Steve McIntyre st...@einval.com (25/04/2013): 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 [...] We'd need a d-i wheezy rc3. Not sure there's room/time for that. Would [...] Release managers, what do you think? I am somewhat nervous about the timescales, but if we can get targetted fixes in and builds turned around quickly then I think it's probably worth it to reduce some of the support pain. What's the status there? Being another day nearer the published date doesn't make me any /less/ nervous, certainly... Regards, Adam -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1367160499.13168.84.ca...@jacala.jungle.funky-badger.org
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
Adam D. Barratt a...@adam-barratt.org.uk (28/04/2013): What's the status there? Being another day nearer the published date doesn't make me any /less/ nervous, certainly... As Steve told you on IRC, things got uploaded. While I have no ways of testing those things, the patches look good to me, please unblock/unblock-udeb/urgent grub2 os-prober. Mraw, KiBi. signature.asc Description: Digital signature
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
On Sun, 2013-04-28 at 22:36 +0200, Cyril Brulebois wrote: While I have no ways of testing those things, the patches look good to me, please unblock/unblock-udeb/urgent grub2 os-prober. All done. Regards, Adam -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1367181874.29152.12.ca...@jacala.jungle.funky-badger.org
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
On Sun, 2013-04-28 at 21:44 +0100, Adam D. Barratt wrote: On Sun, 2013-04-28 at 22:36 +0200, Cyril Brulebois wrote: While I have no ways of testing those things, the patches look good to me, please unblock/unblock-udeb/urgent grub2 os-prober. All done. As mentioned on IRC, grub2 has picked up a dependency on sid's lvm2, so will need a tpu upload to get in to wheezy. Regards, Adam -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1367187036.29152.19.ca...@jacala.jungle.funky-badger.org
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
Steve McIntyre st...@einval.com (25/04/2013): 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. We'd need a d-i wheezy rc3. Not sure there's room/time for that. Would be nice if we could grab that fix and one for grub-installer, but I'm not sure the latter is going to be ready in time. I guess we could deal with the “releasing d-i” in less than 2 days once components are in place (since we already know exactly what's getting updated, that we won't get any last-minute FTBFS to fix, that we have an easy announce to draft, and since I'll be personally much more available than during the past weeks). Release managers, what do you think? (On a side note, d-i wheezy rc2 is getting released right now. Struggling with cvs as usual, oh the fun.) Mraw, KiBi. signature.asc Description: Digital signature
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
On Sat, 2013-04-27 at 15:37 +0200, Cyril Brulebois wrote: Steve McIntyre st...@einval.com (25/04/2013): 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 [...] We'd need a d-i wheezy rc3. Not sure there's room/time for that. Would be nice if we could grab that fix and one for grub-installer, but I'm not sure the latter is going to be ready in time. I guess we could deal with the “releasing d-i” in less than 2 days once components are in place (since we already know exactly what's getting updated, that we won't get any last-minute FTBFS to fix, that we have an easy announce to draft, and since I'll be personally much more available than during the past weeks). Release managers, what do you think? I am somewhat nervous about the timescales, but if we can get targetted fixes in and builds turned around quickly then I think it's probably worth it to reduce some of the support pain. (On a side note, d-i wheezy rc2 is getting released right now. Struggling with cvs as usual, oh the fun.) \o/ (at RC2, not CVS). Regards, Adam -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1367071264.13168.56.ca...@jacala.jungle.funky-badger.org
Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
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? -- Steve McIntyre, Cambridge, UK.st...@einval.com You raise the blade, you make the change... You re-arrange me 'til I'm sane... diff -Nru os-prober-1.57/debian/changelog os-prober-1.58/debian/changelog --- os-prober-1.57/debian/changelog 2012-12-22 11:54:54.0 + +++ os-prober-1.58/debian/changelog 2013-04-25 15:30:14.0 +0100 @@ -1,3 +1,13 @@ +os-prober (1.58) unstable; urgency=low + + [ Steve McIntyre ] + * add UEFI support, patch from Andrey Borzenkov: ++ skip legacy MS loader detection on UEFI platform ++ add framework for searching EFI System Partition ++ add scripts that detect Microsoft bootloader and ELILO. + + -- Steve McIntyre 93...@debian.org Thu, 25 Apr 2013 00:55:53 +0100 + os-prober (1.57) unstable; urgency=low [ Christian Perrier ] diff -Nru os-prober-1.57/os-probes/mounted/x86/05efi os-prober-1.58/os-probes/mounted/x86/05efi --- os-prober-1.57/os-probes/mounted/x86/05efi 1970-01-01 01:00:00.0 +0100 +++ os-prober-1.58/os-probes/mounted/x86/05efi 2013-04-25 15:30:14.0 +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 + +# Weed out stuff that doesn't apply to us +case $type in + vfat) debug $1 is a FAT32 partition ;; + msdos) debug $1 is a FAT16 partition ;; + *) debug $1 is $type partition: exiting; exit 1 ;; +esac + +if type udevadm /dev/null 21; then + udevinfo () { + udevadm info $@ + } +fi + +if type udevinfo /dev/null 21; then + # Skip virtual devices + if udevinfo -q path -n $partition | grep -q /virtual/; then + debug $1 is virtual device: exiting + exit 1 + fi + + eval $(udevinfo -q property -n $partition | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=') + debug $partition partition scheme is $ID_PART_ENTRY_SCHEME + debug $partition partition type is $ID_PART_ENTRY_TYPE + + if [ -z $ID_PART_ENTRY_TYPE -o -z $ID_PART_ENTRY_SCHEME -o \ + \( $ID_PART_ENTRY_SCHEME != gpt -a $ID_PART_ENTRY_SCHEME != msdos \) -o \ + \( $ID_PART_ENTRY_SCHEME = gpt -a $ID_PART_ENTRY_TYPE != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \ + \( $ID_PART_ENTRY_SCHEME = msdos -a $ID_PART_ENTRY_TYPE != 0xef \) ]; then + debug $partition is not a ESP partition: exiting + exit 1 + fi +else + debug udevinfo and udevadm missing - cannot check partition type +fi + +efi=$(item_in_dir efi $mpoint) +if [ -z $efi ]; then + debug $mpoint does not have /EFI directory: exiting + exit 1 +fi + +ret=1 +for test in /usr/lib/os-probes/mounted/efi/*; do + debug running subtest $test + if [ -f $test ] [ -x $test ]; then + entry=$($test $mpoint/$efi) + if [ -n $entry ]; then + debug bootloader $entry found by subtest $test + ret=0 + result ${partition}@/$efi/${entry}:efi + fi + fi +done + +exit $ret diff -Nru os-prober-1.57/os-probes/mounted/x86/20microsoft os-prober-1.58/os-probes/mounted/x86/20microsoft --- os-prober-1.57/os-probes/mounted/x86/20microsoft 2012-04-06 02:01:39.0 +0100 +++ os-prober-1.58/os-probes/mounted/x86/20microsoft 2013-04-25 15:30:14.0 +0100 @@ -7,6 +7,12 @@ mpoint=$2 type=$3 +# This script looks for legacy BIOS bootloaders only. Skip if running UEFI +if [ -d /sys/firmware/efi ]; then + debug Skipping legacy bootloaders on UEFI system + exit 1 +fi + # Weed out stuff that doesn't apply to us case $type in ntfs|ntfs-3g) debug $1 is a NTFS partition ;; diff -Nru os-prober-1.57/os-probes/mounted/x86/efi/10elilo os-prober-1.58/os-probes/mounted/x86/efi/10elilo --- os-prober-1.57/os-probes/mounted/x86/efi/10elilo 1970-01-01 01:00:00.0 +0100 +++ os-prober-1.58/os-probes/mounted/x86/efi/10elilo 2013-04-25 15:30:14.0 +0100 @@ -0,0 +1,24 @@ +#!/bin/sh +# Detects ELILO bootloader on a EFI System Partition + +.
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.0 +0100 +++ os-prober-1.58/os-probes/mounted/x86/05efi 2013-04-25 15:30:14.0 +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. -- Ben Hutchings Klipstein's 4th Law of Prototyping and Production: A fail-safe circuit will destroy others. signature.asc Description: This is a digitally signed message part
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
severity 698914 serious thanks On Thu, Apr 25, 2013 at 08:06:51PM +0100, Ben Hutchings wrote: On Thu, 2013-04-25 at 15:40 +0100, Steve McIntyre wrote: ... 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. Agreed; changing severity accordingly. [...] --- os-prober-1.57/os-probes/mounted/x86/05efi 1970-01-01 01:00:00.0 +0100 +++ os-prober-1.58/os-probes/mounted/x86/05efi 2013-04-25 15:30:14.0 +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? We could add a call to 30_os-prober before the actual call to os-prober itself: modprobe efivars || true which is simple and easy to track; I'm not so confident about making more intrusive changes to grub config code than that, to be honest. Does that sound like a reasonable option to people? (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.) Ummm, yes. :-) -- Steve McIntyre, Cambridge, UK.st...@einval.com Welcome my son, welcome to the machine. -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130425231110.gl28...@einval.com
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
On Fri, Apr 26, 2013 at 12:11:10AM +0100, Steve McIntyre wrote: [...] 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? We could add a call to 30_os-prober before the actual call to os-prober itself: modprobe efivars || true [...] 'modprobe -q', please. I already see too many FATAL (not really) errors from modprobes that are intentionally ignored... Ben. -- Ben Hutchings We get into the habit of living before acquiring the habit of thinking. - Albert Camus -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130425233141.ge2...@decadent.org.uk
Re: Fixing #698914 for wheezy (grub booting Windows 8 via UEFI)
On Fri, Apr 26, 2013 at 12:31:41AM +0100, Ben Hutchings wrote: On Fri, Apr 26, 2013 at 12:11:10AM +0100, Steve McIntyre wrote: [...] 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? We could add a call to 30_os-prober before the actual call to os-prober itself: modprobe efivars || true [...] 'modprobe -q', please. I already see too many FATAL (not really) errors from modprobes that are intentionally ignored... I'm considering this script running on hurd or kfreebsd too... -- Steve McIntyre, Cambridge, UK.st...@einval.com ...In the UNIX world, people tend to interpret `non-technical user' as meaning someone who's only ever written one device driver. -- Daniel Pead -- To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130425233913.gm28...@einval.com