Merge lp:~mfisch/ubuntu/saucy/os-prober/upgrade-to-1.58 into lp:ubuntu/saucy/os-prober

Proposed by Matt Fischer on 2013-05-09
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~mfisch/ubuntu/saucy/os-prober/upgrade-to-1.58
Merge into: lp:ubuntu/saucy/os-prober
Diff against target: 197 lines (+151/-1)
6 files modified
debian/changelog (+22/-0)
debian/control (+1/-1)
os-probes/mounted/x86/05efi (+70/-0)
os-probes/mounted/x86/20microsoft (+6/-0)
os-probes/mounted/x86/efi/10elilo (+24/-0)
os-probes/mounted/x86/efi/20microsoft (+28/-0)
To merge this branch: bzr merge lp:~mfisch/ubuntu/saucy/os-prober/upgrade-to-1.58
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve on 2013-05-16
Ubuntu branches 2013-05-09 Pending
Review via email: mp+163083@code.launchpad.net

Description of the change

Merge to 1.58 the big change here is UEFI support. I note that we've been holding some patches for awhile now, I will see if we can get them upstream after this.

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

Thanks, I've rebased your merge on the current Debian version uploaded yesterday and uploaded that

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-02-05 11:25:43 +0000
3+++ debian/changelog 2013-05-09 03:56:27 +0000
4@@ -1,3 +1,25 @@
5+os-prober (1.58ubuntu1) saucy; urgency=low
6+
7+ * Resynchronise with Debian (LP: #1178072). Remaining changes:
8+ - Mount btrfs subvolume @ when present to access a btrfs formatted
9+ rootfs.
10+ - When called with WINOSDATA, return the list of Windows partitions
11+ containing the system instead of only listing these containing the
12+ bootrecord.
13+
14+ -- Matthew Fischer <matthew.fischer@canonical.com> Wed, 08 May 2013 21:42:12 -0600
15+
16+os-prober (1.58) unstable; urgency=low
17+
18+ [ Steve McIntyre ]
19+ * add UEFI support, patch from Andrey Borzenkov:
20+ + skip legacy MS loader detection on UEFI platform
21+ + add framework for searching EFI System Partition
22+ + add scripts that detect Microsoft bootloader and ELILO.
23+ * Add myself to uploaders.
24+
25+ -- Steve McIntyre <93sam@debian.org> Sun, 28 Apr 2013 16:01:50 +0100
26+
27 os-prober (1.57ubuntu1) raring; urgency=low
28
29 * Resynchronise with Debian (LP: #1038093). Remaining changes:
30
31=== modified file 'debian/control'
32--- debian/control 2012-09-18 00:05:11 +0000
33+++ debian/control 2013-05-09 03:56:27 +0000
34@@ -3,7 +3,7 @@
35 Priority: optional
36 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
37 XSBC-Original-Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
38-Uploaders: Colin Watson <cjwatson@debian.org>, Joey Hess <joeyh@debian.org>, Christian Perrier <bubulle@debian.org>
39+Uploaders: Colin Watson <cjwatson@debian.org>, Joey Hess <joeyh@debian.org>, Christian Perrier <bubulle@debian.org>, Steve McIntyre <93sam@debian.org>
40 Build-Depends: debhelper (>= 7.0.50)
41 Standards-Version: 3.9.3
42 XS-Vcs-Browser: http://git.debian.org/?p=d-i/os-prober.git
43
44=== added file 'os-probes/mounted/x86/05efi'
45--- os-probes/mounted/x86/05efi 1970-01-01 00:00:00 +0000
46+++ os-probes/mounted/x86/05efi 2013-05-09 03:56:27 +0000
47@@ -0,0 +1,70 @@
48+#!/bin/sh
49+# Detects all Microsoft OSes on a collection of partitions.
50+
51+. /usr/share/os-prober/common.sh
52+
53+partition="$1"
54+mpoint="$2"
55+type="$3"
56+
57+# This file is for UEFI platform only
58+if [ ! -d /sys/firmware/efi ]; then
59+ debug "Not on UEFI platform"
60+ exit 1
61+fi
62+
63+# Weed out stuff that doesn't apply to us
64+case "$type" in
65+ vfat) debug "$1 is a FAT32 partition" ;;
66+ msdos) debug "$1 is a FAT16 partition" ;;
67+ *) debug "$1 is $type partition: exiting"; exit 1 ;;
68+esac
69+
70+if type udevadm > /dev/null 2>&1; then
71+ udevinfo () {
72+ udevadm info "$@"
73+ }
74+fi
75+
76+if type udevinfo > /dev/null 2>&1; then
77+ # Skip virtual devices
78+ if udevinfo -q path -n $partition | grep -q /virtual/; then
79+ debug "$1 is virtual device: exiting"
80+ exit 1
81+ fi
82+
83+ eval "$(udevinfo -q property -n "$partition" | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=')"
84+ debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME"
85+ debug "$partition partition type is $ID_PART_ENTRY_TYPE"
86+
87+ if [ -z "$ID_PART_ENTRY_TYPE" -o -z "$ID_PART_ENTRY_SCHEME" -o \
88+ \( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != msdos \) -o \
89+ \( "$ID_PART_ENTRY_SCHEME" = gpt -a "$ID_PART_ENTRY_TYPE" != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \
90+ \( "$ID_PART_ENTRY_SCHEME" = msdos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then
91+ debug "$partition is not a ESP partition: exiting"
92+ exit 1
93+ fi
94+else
95+ debug "udevinfo and udevadm missing - cannot check partition type"
96+fi
97+
98+efi=$(item_in_dir efi "$mpoint")
99+if [ -z "$efi" ]; then
100+ debug "$mpoint does not have /EFI directory: exiting"
101+ exit 1
102+fi
103+
104+ret=1
105+for test in /usr/lib/os-probes/mounted/efi/*; do
106+ debug "running subtest $test"
107+ if [ -f "$test" ] && [ -x "$test" ]; then
108+ entry=$("$test" "$mpoint/$efi")
109+ if [ -n "$entry" ]; then
110+ debug "bootloader $entry found by subtest $test"
111+ ret=0
112+ result "${partition}@/$efi/${entry}:efi"
113+ fi
114+ fi
115+done
116+
117+exit $ret
118
119=== modified file 'os-probes/mounted/x86/20microsoft'
120--- os-probes/mounted/x86/20microsoft 2012-05-02 09:14:38 +0000
121+++ os-probes/mounted/x86/20microsoft 2013-05-09 03:56:27 +0000
122@@ -7,6 +7,12 @@
123 mpoint="$2"
124 type="$3"
125
126+# This script looks for legacy BIOS bootloaders only. Skip if running UEFI
127+if [ -d /sys/firmware/efi ]; then
128+ debug "Skipping legacy bootloaders on UEFI system"
129+ exit 1
130+fi
131+
132 # Weed out stuff that doesn't apply to us
133 case "$type" in
134 ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;;
135
136=== added directory 'os-probes/mounted/x86/efi'
137=== added file 'os-probes/mounted/x86/efi/10elilo'
138--- os-probes/mounted/x86/efi/10elilo 1970-01-01 00:00:00 +0000
139+++ os-probes/mounted/x86/efi/10elilo 2013-05-09 03:56:27 +0000
140@@ -0,0 +1,24 @@
141+#!/bin/sh
142+# Detects ELILO bootloader on a EFI System Partition
143+
144+. /usr/share/os-prober/common.sh
145+
146+efi="$1"
147+
148+found=
149+
150+elilo=`find $1 -name "elilo.efi"`
151+if [ -n "$elilo" ]; then
152+ bdir=`dirname $elilo`
153+ bdir=`basename $bdir`
154+ long="ELILO Boot Manager"
155+ short="ELILO"
156+ path=${bdir}/elilo.efi
157+ found=true
158+fi
159+
160+if [ -n "$found" ]; then
161+ label="$(count_next_label "$short")"
162+ result "${path}:${long}:${label}"
163+fi
164+exit 0
165
166=== added file 'os-probes/mounted/x86/efi/20microsoft'
167--- os-probes/mounted/x86/efi/20microsoft 1970-01-01 00:00:00 +0000
168+++ os-probes/mounted/x86/efi/20microsoft 2013-05-09 03:56:27 +0000
169@@ -0,0 +1,28 @@
170+#!/bin/sh
171+# Detects Microsoft bootloader on a EFI System Partition
172+
173+. /usr/share/os-prober/common.sh
174+
175+efi="$1"
176+
177+found=
178+for microsoft in $(item_in_dir microsoft "$efi"); do
179+ for boot in $(item_in_dir boot "$efi/$microsoft"); do
180+ bcd=$(item_in_dir bcd "$efi/$microsoft/$boot")
181+ bootmgfw=$(item_in_dir bootmgfw.efi "$efi/$microsoft/$boot")
182+ if [ -n "$bcd" -a -n "$bootmgfw" ]; then
183+ long="Windows Boot Manager"
184+ short=Windows
185+ path="$microsoft/$boot/$bootmgfw"
186+ found=true
187+ break
188+ fi
189+ done
190+done
191+
192+
193+if [ -n "$found" ]; then
194+ label="$(count_next_label "$short")"
195+ result "${path}:${long}:${label}"
196+fi
197+exit 0

Subscribers

People subscribed via source and target branches

to all changes: