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
=== modified file 'debian/changelog'
--- debian/changelog 2013-09-18 20:26:24 +0000
+++ debian/changelog 2013-10-10 17:06:04 +0000
@@ -1,3 +1,10 @@
1grub2 (2.00-19ubuntu2) UNRELEASED; urgency=low
2
3 * debian/patches/ubuntu_efi_always_install_grub_cfg.patch: unconditionally
4 create grub.cfg on our EFI boot partition. Closes LP: #1236625.
5
6 -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 07 Oct 2013 16:55:32 -0700
7
1grub2 (2.00-19ubuntu1) saucy; urgency=low8grub2 (2.00-19ubuntu1) saucy; urgency=low
29
3 * Resynchronise with Debian. Remaining changes:10 * Resynchronise with Debian. Remaining changes:
411
=== modified file 'debian/patches/series'
--- debian/patches/series 2013-09-18 20:20:00 +0000
+++ debian/patches/series 2013-10-10 17:06:04 +0000
@@ -61,3 +61,4 @@
61ubuntu_vt_handoff.patch61ubuntu_vt_handoff.patch
62ubuntu_recovery_nomodeset.patch62ubuntu_recovery_nomodeset.patch
63ubuntu_probe_dmraid.patch63ubuntu_probe_dmraid.patch
64ubuntu_efi_always_install_grub_cfg.patch
6465
=== added file 'debian/patches/ubuntu_efi_always_install_grub_cfg.patch'
--- debian/patches/ubuntu_efi_always_install_grub_cfg.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/ubuntu_efi_always_install_grub_cfg.patch 2013-10-10 17:06:04 +0000
@@ -0,0 +1,58 @@
1Description: unconditionally create grub.cfg on our EFI boot partition
2 When grub is installed to the EFI partition with Secure Boot support, it
3 always needs some config to tell it the prefix to the /boot/grub disk,
4 because we aren't modifying the grub image at runtime to set the root.
5 So even though when using LVM we don't need to search for the root using
6 search.fs_uuid, we do need to use load.cfg to tell grub what that root
7 is.
8Author: Steve Langasek <steve.langasek@ubuntu.com>
9Bug-Ubuntu: https://bugs.launchpad.net/bugs/1236625
10Forwarded: no
11Last-Update: 2013-10-07
12
13Index: lp.1236625/util/grub-install.in
14===================================================================
15--- lp.1236625.orig/util/grub-install.in
16+++ lp.1236625/util/grub-install.in
17@@ -638,7 +638,15 @@
18 config_opt_file="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg"
19 fi
20
21-if [ "x${devabstraction_module}" = "x" ] ; then
22+if [ x"$grub_modinfo_platform" = xefi ]; then
23+ if [ $removable = yes ]; then
24+ efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
25+ else
26+ efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
27+ fi
28+fi
29+
30+if [ "x${devabstraction_module}" = "x" ] || ([ x"$grub_modinfo_platform" = xefi ] && [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]); then
31 if [ x"${install_device}" != x ]; then
32 if echo "${install_device}" | grep -qx "(.*)" ; then
33 install_drive="${install_device}"
34@@ -832,11 +840,6 @@
35 gettext "You will have to set \`SystemPartition' and \`OSLoader' manually." 1>&2
36 echo 1>&2
37 elif [ x"$grub_modinfo_platform" = xefi ]; then
38- if [ $removable = yes ]; then
39- efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
40- else
41- efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
42- fi
43 if [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]; then
44 shim_signed=/usr/lib/shim/shim.efi.signed
45 if [ -e "$shim_signed" ]; then
46@@ -848,10 +851,8 @@
47 else
48 cp "$efi_signed" "${efidir}/${efi_file}"
49 fi
50- if [ x"$config_opt_file" != x ]; then
51- cp "${config_opt_file}" "${efidir}/grub.cfg"
52- echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
53- fi
54+ cp "${config_opt_file}" "${efidir}/grub.cfg"
55+ echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
56 else
57 cp "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" "${efidir}/${efi_file}"
58 # For old macs. Suggested by Peter Jones.
059
=== modified file 'util/grub-install.in'
--- util/grub-install.in 2013-08-15 09:03:10 +0000
+++ util/grub-install.in 2013-10-10 17:06:04 +0000
@@ -638,7 +638,15 @@
638 config_opt_file="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg"638 config_opt_file="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg"
639fi639fi
640640
641if [ "x${devabstraction_module}" = "x" ] ; then641if [ x"$grub_modinfo_platform" = xefi ]; then
642 if [ $removable = yes ]; then
643 efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
644 else
645 efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
646 fi
647fi
648
649if [ "x${devabstraction_module}" = "x" ] || ([ x"$grub_modinfo_platform" = xefi ] && [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]); then
642 if [ x"${install_device}" != x ]; then650 if [ x"${install_device}" != x ]; then
643 if echo "${install_device}" | grep -qx "(.*)" ; then651 if echo "${install_device}" | grep -qx "(.*)" ; then
644 install_drive="${install_device}"652 install_drive="${install_device}"
@@ -832,11 +840,6 @@
832 gettext "You will have to set \`SystemPartition' and \`OSLoader' manually." 1>&2840 gettext "You will have to set \`SystemPartition' and \`OSLoader' manually." 1>&2
833 echo 1>&2841 echo 1>&2
834elif [ x"$grub_modinfo_platform" = xefi ]; then842elif [ x"$grub_modinfo_platform" = xefi ]; then
835 if [ $removable = yes ]; then
836 efi_signed="${source_dir}-signed/gcd$efi_suffix.efi.signed"
837 else
838 efi_signed="${source_dir}-signed/grub$efi_suffix.efi.signed"
839 fi
840 if [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]; then843 if [ "$uefi_secure_boot" = yes ] && [ -e "$efi_signed" ]; then
841 shim_signed=/usr/lib/shim/shim.efi.signed844 shim_signed=/usr/lib/shim/shim.efi.signed
842 if [ -e "$shim_signed" ]; then845 if [ -e "$shim_signed" ]; then
@@ -848,10 +851,8 @@
848 else851 else
849 cp "$efi_signed" "${efidir}/${efi_file}"852 cp "$efi_signed" "${efidir}/${efi_file}"
850 fi853 fi
851 if [ x"$config_opt_file" != x ]; then854 cp "${config_opt_file}" "${efidir}/grub.cfg"
852 cp "${config_opt_file}" "${efidir}/grub.cfg"855 echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
853 echo 'configfile $prefix/grub.cfg' >> "${efidir}/grub.cfg"
854 fi
855 else856 else
856 cp "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" "${efidir}/${efi_file}"857 cp "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" "${efidir}/${efi_file}"
857 # For old macs. Suggested by Peter Jones.858 # For old macs. Suggested by Peter Jones.

Subscribers

People subscribed via source and target branches