Merge lp:~cyphermox/livecd-rootfs/xenial-proposed into lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Merged at revision: 1408
Proposed branch: lp:~cyphermox/livecd-rootfs/xenial-proposed
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed
Diff against target: 37 lines (+9/-3)
1 file modified
live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary (+9/-3)
To merge this branch: bzr merge lp:~cyphermox/livecd-rootfs/xenial-proposed
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+329278@code.launchpad.net

Description of the change

Clean up grub modules that are listed unnecessarily.

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I'll create a separate MP for removing modules that can't be loaded due to Secure Boot.

1409. By Mathieu Trudel-Lapierre

Only set a default GRUB_PRELOAD_MODULES if not already defined; otherwise used the existing values.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary'
2--- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-05-12 19:20:22 +0000
3+++ live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-08-23 23:21:07 +0000
4@@ -61,15 +61,20 @@
5 efi_boot_dir="/boot/efi/EFI/BOOT"
6 chroot mountpoint mkdir -p "${efi_boot_dir}"
7
8+ # The modules below only make sense on non-Secure Boot UEFI systems.
9+ # Otherwise, with Secure Boot enabled GRUB will refuse to load them.
10+ # Any modules already in debian/build-efi-images do not need to be listed.
11+ # Furthermore, other modules such as terminal, video_* and efi_* are all
12+ # already available.
13 case $ARCH in
14 arm64)
15 chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin
16- grub_modules="part_gpt fat gzio ext2 normal chain boot configfile linux search_fs_uuid search_label terminal serial video video_fb efi_gop"
17+ grub_modules="serial"
18 efi_target=arm64-efi
19 ;;
20 amd64)
21 chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed
22- grub_modules="part_gpt fat ext2 normal chain boot configfile linux multiboot search_fs_uuid search_label terminal serial video video_fb video_bochs usb usb_keyboard efi_gop efi_uga"
23+ grub_modules="multiboot serial usb usb_keyboard"
24 efi_target=x86_64-efi
25 ;;
26 esac
27@@ -77,8 +82,9 @@
28 cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg
29 ${CLOUD_IMG_STR}
30 # For Cloud Image compatability
31-GRUB_PRELOAD_MODULES="${grub_modules}"
32+GRUB_PRELOAD_MODULES="${GRUB_PRELOAD_MODULES:-$grub_modules}"
33 EOF
34+
35 chroot mountpoint grub-install "${loop_device}" \
36 --boot-directory=/boot \
37 --efi-directory=/boot/efi \

Subscribers

People subscribed via source and target branches