Skip to content

amd64 images build under a Debian 12 Docker image end up with no BIOS bootloader due to lsblk malfunctioning #348

@ArrayBolt3

Description

@ArrayBolt3

In chroot-script, a function is_grub_bios_compatible is used to determine whether or not the drive being installed to can have a grub BIOS bootloader installed to it or not. This works for GPT disks by running lsblk -pnlo NAME,PARTTYPE to find all partitions and partition types on the system, then searches the lsblk output for partitions on the device being installed to that have a partition UUID of 21686148-6449-6e6f-744e-656564454649. This works perfectly fine on physical and virtual machines, but it fails badly under Docker, since lsblk -pnlo NAME,PARTTYPE does this under Docker (at least when using an image based on the official Debian 12 image):

lsblk -pnlo NAME,PARTTYPE
/dev/loop1     
/dev/loop2     
/dev/loop3     
/dev/loop4     
/dev/loop5     
/dev/loop6     
/dev/loop7     
/dev/loop8     
/dev/loop9     
/dev/loop10    
/dev/loop11    
/dev/loop12    
/dev/loop13    
/dev/loop14    
/dev/zram0     
/dev/nvme0n1   
/dev/nvme1n1   
/dev/nvme0n1p1 
/dev/nvme0n1p2 
/dev/nvme0n1p3 
/dev/nvme0n1p4 
/dev/nvme1n1p1

All of the partition type UUIDs are missing, so is_grub_bios_compatible assumes the disk does NOT support a BIOS bootloader, and thus installs an EFI-only bootloader.

Will add reproduction steps later, this is sort of a hurried brain dump for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions