Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-133325

bootloader update failed on EFI env without BIOS part

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • CentOS Stream 9
    • rust-bootupd
    • None
    • None
    • None
    • rhel-coreos
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Start c9s qcow2  image scos-9.0.20251105-0-qemu.x86_64.qcow2 using specified ignition config with mirror disk but remove bios part, upgrade to latest version. Run `bootupctl update` failed.

      See upstream issue https://github.com/coreos/fedora-coreos-tracker/issues/2072

      [root@tutorial core]# bootupctl update
      Running as unit: bootupd.service
      Installing for i386-pc platform.
      /usr/sbin/grub2-install: warning: ../grub-core/partmap/gpt.c:194:this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
      /usr/sbin/grub2-install: error: embedding is not possible, but this is required for RAID and LVM install.
      error: Failed to update BIOS: Failed to run "/usr/sbin/grub2-install" "--target" "i386-pc" "--boot-directory" "/boot" "--modules" "mdraid1x part_gpt" "/dev/vda"

       

      What is the impact of this issue to you?

      Can not upgrade the bootloader.

      Please provide the package NVR for which the bug is seen:

      bootupd-0.2.31-1.el9.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      • Prepare mirror.ign that removed the bios part

       

      $ cat mirror.ign 
      {
        "ignition": {
          "version": "3.5.0"
        },
        "storage": {
          "disks": [
            {
              "device": "/dev/vda",
              "partitions": [
                {
                  "label": "esp-1",
                  "sizeMiB": 127,
                  "typeGuid": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
                },
                {
                  "label": "boot-1",
                  "sizeMiB": 384
                },
                {
                  "label": "root-1"
                }
              ],
              "wipeTable": true
            },
            {
              "device": "/dev/vdb",
              "partitions": [
                {
                  "label": "esp-2",
                  "sizeMiB": 127,
                  "typeGuid": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
                },
                {
                  "label": "boot-2",
                  "sizeMiB": 384
                },
                {
                  "label": "root-2"
                }
              ],
              "wipeTable": true
            }
          ],
          "files": [
            {
              "path": "/etc/hostname",
              "contents": {
                "compression": "",
                "source": "data:,tutorial%0A"
              },
              "mode": 420
            },
            {
              "path": "/etc/profile.d/systemd-pager.sh",
              "contents": {
                "compression": "",
                "source": "data:,%23%20Tell%20systemd%20to%20not%20use%20a%20pager%20when%20printing%20information%0Aexport%20SYSTEMD_PAGER%3Dcat%0A"
              },
              "mode": 420
            }
          ],
          "filesystems": [
            {
              "device": "/dev/disk/by-partlabel/esp-1",
              "format": "vfat",
              "label": "esp-1",
              "wipeFilesystem": true
            },
            {
              "device": "/dev/disk/by-partlabel/esp-2",
              "format": "vfat",
              "label": "esp-2",
              "wipeFilesystem": true
            },
            {
              "device": "/dev/md/md-boot",
              "format": "ext4",
              "label": "boot",
              "wipeFilesystem": true
            },
            {
              "device": "/dev/md/md-root",
              "format": "xfs",
              "label": "root",
              "wipeFilesystem": true
            }
          ],
          "raid": [
            {
              "devices": [
                "/dev/disk/by-partlabel/boot-1",
                "/dev/disk/by-partlabel/boot-2"
              ],
              "level": "raid1",
              "name": "md-boot",
              "options": [
                "--metadata=1.0"
              ]
            },
            {
              "devices": [
                "/dev/disk/by-partlabel/root-1",
                "/dev/disk/by-partlabel/root-2"
              ],
              "level": "raid1",
              "name": "md-root"
            }
          ]
        },
        "systemd": {
          "units": [
            {
              "dropins": [
                {
                  "contents": "[Service]\n# Override Execstart in main unit\nExecStart=\n# Add new Execstart with `-` prefix to ignore failure`\nExecStart=-/usr/sbin/agetty --autologin core --noclear %I $TERM\n",
                  "name": "autologin-core.conf"
                }
              ],
              "name": "serial-getty@ttyS0.service"
            }
          ]
        }
      }

      This is the butane config, after you run `butane -p mirror.bu -o mirror.ign`, then manually remove the bios part in mirror.ign, by default it will include bios part that we do not want.
      $ cat mirror.bu 

      variant: fcos
      version: 1.6.0
      boot_device:
        layout: x86_64
        mirror:
          devices:
            - /dev/vda
            - /dev/vdb
      systemd:
        units:
          - name: serial-getty@ttyS0.service
            dropins:
            - name: autologin-core.conf
              contents: |
                [Service]
                # Override Execstart in main unit
                ExecStart=
                # Add new Execstart with `-` prefix to ignore failure`
                ExecStart=-/usr/sbin/agetty --autologin core --noclear %I $TERM
          - name: zincati.service
            enabled: false
      storage:
        files:
          - path: /etc/hostname
            mode: 0644
            contents:
              inline: |
                tutorial
          - path: /etc/profile.d/systemd-pager.sh
            mode: 0644
            contents:
              inline: |
                # Tell systemd to not use a pager when printing information
                export SYSTEMD_PAGER=cat

       

      • Start VM with config mirror.ign and uefi
      [coreos-assembler]$ cosa run --qemu-image /srv/data/scos-9.0.20251105-0-qemu.x86_64.qcow2 --add-disk 16G -i /srv/data/ign/mirror.ign --qemu-firmware uefi -m 4096
      Last login: Thu Dec  4 02:57:24 2025
      [core@tutorial ~]$ sudo su
      [root@tutorial core]# bootupctl status
      Running as unit: bootupd.service
      Component BIOS
        Installed: grub2-tools-1:2.06-116.el9.x86_64
        Update: At latest version
      Component EFI
        Installed: grub2-efi-x64-1:2.06-116.el9.x86_64,shim-x64-15.8-2.el9.x86_64
        Update: At latest version
      No components are adoptable.
      CoreOS aleph version: 9.0.20251105-0
      Boot method: EFI
      [root@tutorial core]# lsblk
      NAME      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
      loop0       7:0    0   5.7M  1 loop  
      vda       252:0    0    16G  0 disk  
      ├─vda1    252:1    0   127M  0 part  
      ├─vda2    252:2    0   384M  0 part  
      │ └─md127   9:127  0 383.9M  0 raid1 /boot
      └─vda3    252:3    0  15.5G  0 part  
        └─md126   9:126  0  15.5G  0 raid1 /var
                                           /sysroot/ostree/deploy/scos/var
                                           /sysroot
                                           /etc
      vdb       252:16   0    16G  0 disk  
      ├─vdb1    252:17   0   127M  0 part  
      ├─vdb2    252:18   0   384M  0 part  
      │ └─md127   9:127  0 383.9M  0 raid1 /boot
      └─vdb3    252:19   0  15.5G  0 part  
        └─md126   9:126  0  15.5G  0 raid1 /var
                                           /sysroot/ostree/deploy/scos/var
                                           /sysroot
                                           /etc
      

       

      • # Prepare the /etc/ostree/auth.json and upgrade to newer version
      [root@tutorial core]# rpm-ostree rebase ostree-unverified-registry:quay.io/openshift-release-dev/ocp-v4.0-art-dev:9.0.20251203-0-coreos

       

      • Reboot and run `bootupctl update`
      [root@tutorial core]# reboot
      
      [root@tutorial core]# bootupctl status
      Running as unit: bootupd.service
      Component BIOS
        Installed: grub2-tools-1:2.06-116.el9.x86_64
        Update: Available: grub2-tools-1:2.06-118.el9.x86_64
      Component EFI
        Installed: grub2-efi-x64-1:2.06-116.el9.x86_64,shim-x64-15.8-2.el9.x86_64
        Update: Available: grub2-efi-x64-1:2.06-118.el9.x86_64,shim-x64-15.8-2.el9.x86_64
      No components are adoptable.
      CoreOS aleph version: 9.0.20251105-0
      Boot method: EFI
      
      [root@tutorial core]# bootupctl update
      Running as unit: bootupd.service
      Installing for i386-pc platform.
      /usr/sbin/grub2-install: warning: ../grub-core/partmap/gpt.c:194:this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
      /usr/sbin/grub2-install: error: embedding is not possible, but this is required for RAID and LVM install.
      error: Failed to update BIOS: Failed to run "/usr/sbin/grub2-install" "--target" "i386-pc" "--boot-directory" "/boot" "--modules" "mdraid1x part_gpt" "/dev/vda"
      

       

      Expected results

      bootupctl update should skip BIOS part and run successfully.

      Actual results

      bootupctl update failed

              coreos-bot CoreOS Bot
              hhei@redhat.com Huijing Hei
              CoreOS Bot CoreOS Bot
              CoreOS QE Bot CoreOS QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: