From 260d5f13214269fb5abb8a51d06ea5d214387140 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 3 Aug 2021 13:05:47 +0200 Subject: [PATCH] Use shim-signed on Ubuntu, shim is empty now Also fix the documentation to use the correct paths and versions. Change-Id: I7f004d40c1b8c617f9a456216df091e44d69693f (cherry picked from commit 294046befae669dacd159d9f26bcdd3bc8ff26c9) --- bindep.txt | 2 +- devstack/lib/ironic | 8 ++++++-- doc/source/install/configure-pxe.rst | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bindep.txt b/bindep.txt index f88618df9a..e2b8ae27e3 100644 --- a/bindep.txt +++ b/bindep.txt @@ -22,7 +22,7 @@ syslinux [platform:rpm platform:ubuntu-trusty platform:debian-wheezy default] syslinux-common [platform:ubuntu-xenial platform:debian-jessie default] socat [default] # Grub2 files for boot loadingusing PXE/GRUB2 -shim [platform:dpkg default] +shim-signed [platform:dpkg default] grub-efi-amd64-signed [platform:dpkg default] # these are needed to create and access VMs when testing with virtual hardware diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 0ab44d3105..c8376e8ff6 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -626,7 +626,7 @@ UEFI_NVRAM_PATH=$IRONIC_UEFI_FILES_DIR/OVMF_VARS.fd if [[ $IRONIC_HW_ARCH == "x86_64" ]]; then install_package shim if is_ubuntu; then - install_package grub-efi-amd64-signed + install_package grub-efi-amd64-signed shim-signed elif is_fedora; then install_package grub2-efi fi @@ -651,7 +651,11 @@ if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then fi if is_ubuntu && [[ -z $IRONIC_GRUB2_FILE ]]; then - IRONIC_GRUB2_SHIM_FILE=/usr/lib/shim/shimx64.efi + if [[ -f /usr/lib/shim/shimx64.efi.signed ]]; then + IRONIC_GRUB2_SHIM_FILE=/usr/lib/shim/shimx64.efi.signed + else + IRONIC_GRUB2_SHIM_FILE=/usr/lib/shim/shimx64.efi + fi IRONIC_GRUB2_FILE=/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed fi diff --git a/doc/source/install/configure-pxe.rst b/doc/source/install/configure-pxe.rst index 7a105a3df2..4549640058 100644 --- a/doc/source/install/configure-pxe.rst +++ b/doc/source/install/configure-pxe.rst @@ -123,7 +123,7 @@ the PXE UEFI environment. #. Install Grub2 and shim packages: - Ubuntu (16.04LTS and later):: + Ubuntu (18.04LTS and later):: sudo apt-get install grub-efi-amd64-signed shim-signed @@ -137,9 +137,9 @@ the PXE UEFI environment. #. Copy grub and shim boot loader images to ``/tftpboot`` directory: - Ubuntu (16.04LTS and later):: + Ubuntu (18.04LTS and later):: - sudo cp /usr/lib/shim/shim.efi.signed /tftpboot/bootx64.efi + sudo cp /usr/lib/shim/shimx64.efi.signed /tftpboot/bootx64.efi sudo cp /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed /tftpboot/grubx64.efi Fedora::