Merge lp:~vorlon/ubuntu/saucy/grub2/lp.1236625 into lp:~ubuntu-core-dev/ubuntu/saucy/grub2/saucy

Proposed by Steve Langasek
Status: Merged
Approved by: Colin Watson
Approved revision: 2358
Merged at revision: 2355
Proposed branch: lp:~vorlon/ubuntu/saucy/grub2/lp.1236625
Merge into: lp:~ubuntu-core-dev/ubuntu/saucy/grub2/saucy
Diff against target: 132 lines (+77/-10)
4 files modified
debian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu_efi_always_install_grub_cfg.patch (+58/-0)
util/grub-install.in (+11/-10)
To merge this branch: bzr merge lp:~vorlon/ubuntu/saucy/grub2/lp.1236625
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+189746@code.launchpad.net

This proposal supersedes a proposal from 2013-10-08.

Description of the change

This seems like the straightforward fix for bug #1236625, please let me know
if I've screwed it up somewhere :)

(Resubmit - grr, where does bzr lp-propose-merge get these ideas?)

To post a comment you must log in.
2356. By Steve Langasek

Rename patch, per Colin

2357. By Steve Langasek

rearrange the patch at Colin's request

2358. By Steve Langasek

Remove accidentally-included cruft from the patch

Revision history for this message
Colin Watson (cjwatson) :
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-09-18 20:26:24 +0000
3+++ debian/changelog 2013-10-10 17:06:04 +0000
4@@ -1,3 +1,10 @@
5+grub2 (2.00-19ubuntu2) UNRELEASED; urgency=low
6+
7+ * debian/patches/ubuntu_efi_always_install_grub_cfg.patch: unconditionally
8+ create grub.cfg on our EFI boot partition. Closes LP: #1236625.
9+
10+ -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 07 Oct 2013 16:55:32 -0700
11+
12 grub2 (2.00-19ubuntu1) saucy; urgency=low
13
14 * Resynchronise with Debian. Remaining changes:
15
16=== modified file 'debian/patches/series'
17--- debian/patches/series 2013-09-18 20:20:00 +0000
18+++ debian/patches/series 2013-10-10 17:06:04 +0000
19@@ -61,3 +61,4 @@
20 ubuntu_vt_handoff.patch
21 ubuntu_recovery_nomodeset.patch
22 ubuntu_probe_dmraid.patch
23+ubuntu_efi_always_install_grub_cfg.patch
24
25=== added file 'debian/patches/ubuntu_efi_always_install_grub_cfg.patch'
26--- debian/patches/ubuntu_efi_always_install_grub_cfg.patch 1970-01-01 00:00:00 +0000
27+++ debian/patches/ubuntu_efi_always_install_grub_cfg.patch 2013-10-10 17:06:04 +0000
28@@ -0,0 +1,58 @@
29+Description: unconditionally create grub.cfg on our EFI boot partition
30+ When grub is installed to the EFI partition with Secure Boot support, it
31+ always needs some config to tell it the prefix to the /boot/grub disk,
32+ because we aren't modifying the grub image at runtime to set the root.
33+ So even though when using LVM we don't need to search for the root using
34+ search.fs_uuid, we do need to use load.cfg to tell grub what that root
35+ is.
36+Author: Steve Langasek <steve.langasek@ubuntu.com>
37+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1236625
38+Forwarded: no
39+Last-Update: 2013-10-07
40+
41+Index: lp.1236625/util/grub-install.in
42+===================================================================
43+--- lp.1236625.orig/util/grub-install.in
44++++ lp.1236625/util/grub-install.in
45+@@ -638,7 +638,15 @@
46+ config_opt_file="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg"
47+ fi
48+
49+-if [ "x${devabstraction_module}" = "x" ] ; then
50++if [ x"$grub_modinfo_platform" = xefi ]; then
51++ if [ $removable = yes ]; then
52++ efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
53++ else
54++ efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
55++ fi
56++fi
57++
58++if [ "x${devabstraction_module}" = "x" ] || ([ x"$grub_modinfo_platform" = xefi ] && [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]); then
59+ if [ x"${install_device}" != x ]; then
60+ if echo "${install_device}" | grep -qx "(.*)" ; then
61+ install_drive="${install_device}"
62+@@ -832,11 +840,6 @@
63+ gettext "You will have to set \`SystemPartition' and \`OSLoader' manually." 1>&2
64+ echo 1>&2
65+ elif [ x"$grub_modinfo_platform" = xefi ]; then
66+- if [ $removable = yes ]; then
67+- efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
68+- else
69+- efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
70+- fi
71+ if [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]; then
72+ shim_signed=/usr/lib/shim/shim.efi.signed
73+ if [ -e "$shim_signed" ]; then
74+@@ -848,10 +851,8 @@
75+ else
76+ cp "$efi_signed" "${efidir}/${efi_file}"
77+ fi
78+- if [ x"$config_opt_file" != x ]; then
79+- cp "${config_opt_file}" "${efidir}/grub.cfg"
80+- echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
81+- fi
82++ cp "${config_opt_file}" "${efidir}/grub.cfg"
83++ echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
84+ else
85+ cp "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" "${efidir}/${efi_file}"
86+ # For old macs. Suggested by Peter Jones.
87
88=== modified file 'util/grub-install.in'
89--- util/grub-install.in 2013-08-15 09:03:10 +0000
90+++ util/grub-install.in 2013-10-10 17:06:04 +0000
91@@ -638,7 +638,15 @@
92 config_opt_file="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg"
93 fi
94
95-if [ "x${devabstraction_module}" = "x" ] ; then
96+if [ x"$grub_modinfo_platform" = xefi ]; then
97+ if [ $removable = yes ]; then
98+ efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
99+ else
100+ efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
101+ fi
102+fi
103+
104+if [ "x${devabstraction_module}" = "x" ] || ([ x"$grub_modinfo_platform" = xefi ] && [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]); then
105 if [ x"${install_device}" != x ]; then
106 if echo "${install_device}" | grep -qx "(.*)" ; then
107 install_drive="${install_device}"
108@@ -832,11 +840,6 @@
109 gettext "You will have to set \`SystemPartition' and \`OSLoader' manually." 1>&2
110 echo 1>&2
111 elif [ x"$grub_modinfo_platform" = xefi ]; then
112- if [ $removable = yes ]; then
113- efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
114- else
115- efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
116- fi
117 if [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]; then
118 shim_signed=/usr/lib/shim/shim.efi.signed
119 if [ -e "$shim_signed" ]; then
120@@ -848,10 +851,8 @@
121 else
122 cp "$efi_signed" "${efidir}/${efi_file}"
123 fi
124- if [ x"$config_opt_file" != x ]; then
125- cp "${config_opt_file}" "${efidir}/grub.cfg"
126- echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
127- fi
128+ cp "${config_opt_file}" "${efidir}/grub.cfg"
129+ echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
130 else
131 cp "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" "${efidir}/${efi_file}"
132 # For old macs. Suggested by Peter Jones.

Subscribers

People subscribed via source and target branches