amd64: always install grub-pc with shim-signed

shim-signed depends on grub-efi-amd64-signed, which in turn has
alternative depends on either `grub-efi-amd64 | grub-pc`. However to
support booting with either via shim&signed-grub and BIOS, the choice
must be made to install grub-pc, not grub-efi-amd64.

This makes images consistent with Ubuntu Deskop, Live Server, buildd
bootable images; all of which already do install grub-pc and
shim-signed.

Additionally, this will ensure that autoremove is run after installing
anything in the CPC build hooks. This is done to avoid shipping images
that include packages that are autoremovable. This will clean-up as
packages are installed and detect any breakage at build time.

LP: #1901906
ubuntu/xenial
Joshua Powers 4 years ago
parent 02ea8c9398
commit 370db20757
No known key found for this signature in database
GPG Key ID: 83FC0713DA660C25

@ -499,8 +499,7 @@ case $PROJECT in
add_package install grub-pc
;;
amd64)
add_package install grub-pc-bin
add_package install grub-efi-amd64-signed
add_package install grub-pc
add_package install shim-signed
;;
armhf)

@ -33,6 +33,7 @@ install_grub() {
chroot mountpoint apt-get -qqy update
chroot mountpoint apt-get -qqy install grub2
chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2
chroot mountpoint apt-get autoremove --purge --assume-yes
# set the kernel commandline to use hvc0
mkdir -p mountpoint/etc/default/grub.d

@ -86,12 +86,14 @@ install_grub() {
efi_target=arm64-efi
;;
amd64)
chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed
chroot mountpoint apt-get install -qqy grub-pc shim-signed
grub_modules="multiboot serial usb usb_keyboard"
efi_target=x86_64-efi
;;
esac
chroot mountpoint apt-get autoremove --purge --assume-yes
cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg
${IMAGE_STR}
# For Cloud Image compatability

@ -132,6 +132,7 @@ fi
if [ "$ARCH" = "s390x" ]; then
# Do ZIPL install bits
chroot mountpoint apt-get -qqy install s390-tools sysconfig-hardware
chroot mountpoint apt-get autoremove --purge --assume-yes
# Write out cloudy zipl.conf for future kernel updates
cat << EOF > mountpoint/etc/zipl.conf

@ -35,6 +35,7 @@ cp -a binary/boot/filesystem.dir/ $rootfs_dir
setup_mountpoint $rootfs_dir
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get -y -qq install ubuntu-wsl
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes
create_manifest $rootfs_dir livecd.ubuntu-cpc.wsl.rootfs.manifest
teardown_mountpoint $rootfs_dir

Loading…
Cancel
Save