Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

cbm seg fault in legacy bios mode when /root is encrypted #230

@mdhorn

Description

@mdhorn

Describe the bug
When Clear Linux OS is booted in BIOS mode, and run the installer is run with encryption enabled, cbm segfaults:

[DEBUG] cbm (../src/cli/cli.c:L142): No such file: /tmp/install-202773570//etc/kernel/update_efi_vars
[INFO] cbm (../src/bootman/bootman.c:L744): Current running kernel: 5.5.9-918.native
[DEBUG] cbm (../src/lib/probe.c:L261): Root device exists on device-mapper configuration
[DEBUG] cbm (../src/bootman/bootman.c:L140): shim-systemd caps: 0x26, wanted: 0x0c
[DEBUG] cbm (../src/bootloaders/grub2.c:L563): grub2 not found at /tmp/install-202773570/usr/sbin/grub-mkconfig

[DEBUG] cbm (../src/bootman/bootman.c:L140): grub2 caps: 0x00, wanted: 0x0c
[DEBUG] cbm (../src/bootman/bootman.c:L140): syslinux caps: 0x2c, wanted: 0x0c
[DEBUG] cbm (../src/bootman/bootman.c:L157): Legacy boot now selected (syslinux)
[ERROR] cbm (../src/bootloaders/syslinux-common.c:L288): No boot partition found, you need to mark the boot partition with "legacy_.
[FATAL] cbm (../src/bootman/bootman.c:L163): Cannot initialise bootloader syslinux
Segmentation fault (core dumped)

To Reproduce
Steps to reproduce the behavior:

  1. Download my start vm under BIOS script
wget https://gist.githubusercontent.com/mdhorn/8de01006d3303ef2a45d432da2c72e92/raw/04ac62baf7743f9979dba012b52d9d5d916318b6/start_qemu_bios.sh
chmod +x start_qemu_bios.sh
  1. Download the latest Clear Linux OS server installer ISO
    https://clearlinux.org/downloads

  2. Launch the ISO with an 8GB installation virtual disk
    ./start_qemu_bios.sh clear-32690-live-server.iso 8G

  3. Login as root; set a password

  4. Run the installer
    clr-installer

  5. Complete the installation, selecting the Safe Installer w/ encryption

  6. Install fails at clear-boot-manager

  7. See the /root/clr-installer.log

Expected behavior
The installation completes without error, cbm do not seg fault.

Environment (please complete the following information):

  • Clear Linux OS Version: 32600
  • clr-boot-manager Version: 3.2.7

** Block Devices:**

  • List of Block Devices: [lsblk -a --json]
lsblk -a --json 
{
   "blockdevices": [
      {"name":"loop0", "maj:min":"7:0", "rm":false, "size":"711.7M", "ro":true, "type":"loop", "mountpoint":null},
      {"name":"loop1", "maj:min":"7:1", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"loop2", "maj:min":"7:2", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"loop3", "maj:min":"7:3", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"loop4", "maj:min":"7:4", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"loop5", "maj:min":"7:5", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"loop6", "maj:min":"7:6", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"loop7", "maj:min":"7:7", "rm":false, "size":null, "ro":false, "type":"loop", "mountpoint":null},
      {"name":"sr0", "maj:min":"11:0", "rm":true, "size":"1024M", "ro":false, "type":"rom", "mountpoint":null},
      {"name":"vda", "maj:min":"253:0", "rm":false, "size":"909M", "ro":false, "type":"disk", "mountpoint":null,
         "children": [
            {"name":"vda1", "maj:min":"253:1", "rm":false, "size":"909M", "ro":false, "type":"part", "mountpoint":null},
            {"name":"vda2", "maj:min":"253:2", "rm":false, "size":"100M", "ro":false, "type":"part", "mountpoint":null}
         ]
      },
      {"name":"vdb", "maj:min":"253:16", "rm":false, "size":"8G", "ro":false, "type":"disk", "mountpoint":null,
         "children": [
            {"name":"vdb1", "maj:min":"253:17", "rm":false, "size":"142M", "ro":false, "type":"part", "mountpoint":"/tmp/install-702,
            {"name":"vdb2", "maj:min":"253:18", "rm":false, "size":"244M", "ro":false, "type":"part", "mountpoint":null},
            {"name":"vdb3", "maj:min":"253:19", "rm":false, "size":"7.6G", "ro":false, "type":"part", "mountpoint":null}
         ]
      }
   ]
}
df
Filesystem       1K-blocks  Used Available Use% Mounted on
none                524288  4752    519536   1% /
devtmpfs           1973240     0   1973240   0% /dev
tmpfs              2008916     0   2008916   0% /dev/shm
tmpfs              2008916   336   2008580   1% /run
tmpfs              2008916     0   2008916   0% /sys/fs/cgroup
tmpfs              2008916     0   2008916   0% /tmp
clr_debug_fuse      524288  4752    519536   1% /usr/src/debug
clr_debug_fuse      524288  4752    519536   1% /usr/lib/debug
tmpfs               401780     0    401780   0% /run/user/0
/dev/mapper/root   7798224 35124   7347256   1% /tmp/install-702644904
/dev/vdb1           143155     1    143155   1% /tmp/install-702644904/boot

Additional context
The problem only seems to occur if the root file system is encrypted. I'm guess it has to do with the device for the root file systems being mapped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions