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
=== modified file 'live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary'
--- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-05-12 19:20:22 +0000
+++ live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-08-23 23:21:07 +0000
@@ -61,15 +61,20 @@
61 efi_boot_dir="/boot/efi/EFI/BOOT"61 efi_boot_dir="/boot/efi/EFI/BOOT"
62 chroot mountpoint mkdir -p "${efi_boot_dir}"62 chroot mountpoint mkdir -p "${efi_boot_dir}"
6363
64 # The modules below only make sense on non-Secure Boot UEFI systems.
65 # Otherwise, with Secure Boot enabled GRUB will refuse to load them.
66 # Any modules already in debian/build-efi-images do not need to be listed.
67 # Furthermore, other modules such as terminal, video_* and efi_* are all
68 # already available.
64 case $ARCH in69 case $ARCH in
65 arm64)70 arm64)
66 chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin71 chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin
67 grub_modules="part_gpt fat gzio ext2 normal chain boot configfile linux search_fs_uuid search_label terminal serial video video_fb efi_gop"72 grub_modules="serial"
68 efi_target=arm64-efi73 efi_target=arm64-efi
69 ;;74 ;;
70 amd64)75 amd64)
71 chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed76 chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed
72 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"77 grub_modules="multiboot serial usb usb_keyboard"
73 efi_target=x86_64-efi78 efi_target=x86_64-efi
74 ;;79 ;;
75 esac80 esac
@@ -77,8 +82,9 @@
77 cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg82 cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg
78${CLOUD_IMG_STR}83${CLOUD_IMG_STR}
79# For Cloud Image compatability84# For Cloud Image compatability
80GRUB_PRELOAD_MODULES="${grub_modules}"85GRUB_PRELOAD_MODULES="${GRUB_PRELOAD_MODULES:-$grub_modules}"
81EOF86EOF
87
82 chroot mountpoint grub-install "${loop_device}" \88 chroot mountpoint grub-install "${loop_device}" \
83 --boot-directory=/boot \89 --boot-directory=/boot \
84 --efi-directory=/boot/efi \90 --efi-directory=/boot/efi \

Subscribers

People subscribed via source and target branches