[Bug 2076329] [NEW] 24.04 grub-pc fails on dpkg-reconfigure

Vladyslav Riabyk 2076329 at bugs.launchpad.net
Thu Aug 8 11:02:00 UTC 2024


Public bug reported:

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.

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "curtin-fails-on-grub.log"
   https://bugs.launchpad.net/bugs/2076329/+attachment/5803757/+files/curtin-fails-on-grub.log

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/2076329

Title:
  24.04 grub-pc fails on dpkg-reconfigure

Status in grub2 package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2076329/+subscriptions




More information about the foundations-bugs mailing list