24.04 grub-pc fails on dpkg-reconfigure

Bug #2076329 reported by Vladyslav Riabyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello!

I am trying to provision a baremetall node using ubuntu24.04 and use curtin to configure it. I have a well tested configuration file which was used with curtin-21.3 and ubuntu20.04. However it doesn't work when I try it on ubuntu24.04. It fails on dpkg-reconfigure grub-pc step. There is software raid 1 configured and lvm root volume on it, here is curtin configuration file:

```
storage:
  version: 1
  config:
     - id: system_disk0
       type: disk
       ptable: msdos
       model: KXG60ZNV256G TOSHIBA
       serial: 31RY10AQYRU1
       grub_device: 1
       wipe: superblock
     - id: system_disk0_part_1
       type: partition
       offset: 4194304B
       size: 256056320000B
       device: system_disk0
       flag: bios_grub
       wipe: superblock
     - id: system_disk1
       type: disk
       ptable: msdos
       model: KXG60ZNV256G TOSHIBA
       serial: 31RY10AVYRU1
       grub_device: 1
       wipe: superblock
     - id: system_disk1_part_1
       type: partition
       offset: 4194304B
       size: 256056320000B
       device: system_disk1
       flag: bios_grub
       wipe: superblock
     - id: mddevice
       name: md0
       type: raid
       raidlevel: 1
       devices:
         - system_disk0_part_1
         - system_disk1_part_1
     - id: lvm_volume_group
       type: lvm_volgroup
       name: system
       devices:
       - mddevice
     - id: lvm_logical_volume_root
       type: lvm_partition
       name: lv_root
       volgroup: lvm_volume_group
     - id: lvm_root_format
       type: format
       fstype: ext4
       volume: lvm_logical_volume_root
     - id: lvm_root_mount
       type: mount
       path: /
       device: lvm_root_format
```

So it configures successfully raid and lvm volumes. But then fails on dpkg-reconfigure grub-pc (see attached log file).

The problem can be reproduced manually, so I can mount, chroot and then run:
```
$ debconf-show grub-pc
  grub-pc/mixed_legacy_and_grub2: true
  grub-pc/install_devices_failed: false
  grub-pc/install_devices_disks_changed:
  grub2/kfreebsd_cmdline_default: quiet splash
  grub2/update_nvram: true
  grub-pc/timeout: 0
  grub2/linux_cmdline:
* grub-efi/cloud_style_installation: true
  grub2/linux_cmdline_default: quiet splash
  grub-efi/install_devices_failed: false
  grub-pc/kopt_extracted: false
  grub2/unsigned_kernels_title:
  grub-pc/disk_description:
  grub2/unsigned_kernels:
  grub-efi/install_devices_empty: false
  grub-pc/chainload_from_menu.lst: true
  grub2/no_efi_extra_removable: false
* grub-pc/install_devices: /dev/disk/by-id/nvme-eui.00000000000000018ce38e01000a4355, /dev/disk/by-id/nvme-eui.00000000000000018ce38e01000a435b
  grub-pc/postrm_purge_boot_grub: false
  grub-efi/install_devices:
  grub-pc/partition_description:
  grub2/kfreebsd_cmdline:
* install_devices:
  grub-pc/install_devices_failed_upgrade: true
  grub-efi/install_devices_disks_changed:
  grub-pc/hidden_timeout: true
* grub-pc/install_devices_empty: false
  grub-efi/partition_description:
* grub-pc/cloud_style_installation: true
  grub2/enable_os_prober: false

$ dpkg-reconfigure grub-pc
Installing for i386-pc platform.
File descriptor 3 (pipe:[263483]) leaked on vgs invocation. Parent PID 55120: grub-install
File descriptor 3 (pipe:[263483]) leaked on vgs invocation. Parent PID 55120: grub-install
File descriptor 3 (pipe:[263483]) leaked on vgs invocation. Parent PID 55120: grub-install
File descriptor 3 (pipe:[263483]) leaked on vgs invocation. Parent PID 55120: grub-install

File descriptor 3 (pipe:[263483]) leaked on vgs invocation. Parent PID 55120: grub-install
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
```

install_devices looks correct and symlinks point to real nvme6n1 and nvme7n1 devices (not partitions). If I set `cloud_style_installation: false` - dpkg-reconfigure passes without errors, but it seems then grub doesn't trigger installation actually.

Revision history for this message
Vladyslav Riabyk (vriabyk) wrote :
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Bug reporting is about finding & fixing problems thus preventing future users from hitting the same bug.

I suspect a Support site would be more appropriate, eg. https://answers.launchpad.net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org, or for more support options please look at https://discourse.ubuntu.com/t/community-support/709

Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 2076329

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.