Skip to content

grub_dpkg removes configs with backup EFI partitions in grub-efi/install_devices debconf key #7045

Description

@medicalwei

Bug report

When the system is set up with multiple EFI System Partitions (ESPs), for example, RAID setup, curtin sets up multiple partitions in grub-efi/install_devices.

However, grub_dpkg module changes grub-efi/install_devices to single device mounted in /boot/efi, which can then cause backup ESP partition(s) not to be upgraded when GRUB package is upgraded.

The type of the debconf field grub-efi/install_devices is also changed from multiselect to string.

Note that, the backup EFI partitions feature is Ubuntu specific, and does not exist in Debian. I am not sure whether we should note it but not to handle this issue, as simply disabling this module can avoid this problem.

Steps to reproduce the problem

  • Have a multiple disk system, install Ubuntu Server 24.04 LTS with multiple boot drives
  • After installation, run debconf-show grub-efi-amd64 (or equivalent), ensure in grub-efi/install_devices two partitions in /dev/disks/by-id are listed
  • Provision the system with cloud-init once, run debconf-show grub-efi-amd64 again

Expected:

  • The latter should return 2 partitions

Actual:

  • The latter returns single partition currently mounted in /boot/efi

Environment details

  • Cloud-init version: 26.1-0ubuntu1~24.04.1
  • Operating System Distribution: Ubuntu 24.04 LTS
  • Cloud provider, platform or installer type: NoCloud

cloud-init logs

cc_grub_dpkg.py[DEBUG]: considering these device symlinks: /dev/disk/by-label/boot,...,
  /dev/disk/by-id/nvme-Micron_7450_MTFDKBA480TFR_254954CD71E8-part1,
  /dev/disk/by-id/nvme-Micron_7450_MTFDKBA480TFR_254954CD71E8_1-part1,
  /dev/disk/by-id/nvme-eui.000000000000000100a0752554cd71e8-part1
cc_grub_dpkg.py[DEBUG]: filtered to these disk/by-id symlinks: <the three above>
cc_grub_dpkg.py[DEBUG]: selected /dev/disk/by-id/nvme-Micron_7450_MTFDKBA480TFR_254954CD71E8-part1
cc_grub_dpkg.py[DEBUG]: Setting grub debconf-set-selections with
  'grub-pc grub-efi/install_devices string /dev/disk/by-id/nvme-Micron_...CD71E8-part1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlynewAn issue that still needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions