Skip to content

rawhide tests "failing with error: Status: loading sysroot: Unexpected state: /run/ostree-booted found, but no /boot/loader directory" #1849

Closed

Description

@jmarrero
error: Status: loading sysroot: Unexpected state: /run/ostree-booted found, but no /boot/loader directory
Error: nu::shell::incompatible_path_access

  × Data cannot be accessed with a cell path
    ╭─[/var/ARTIFACTS/work-plan-01-readonlynp2u0i0j/tmt/plans/integration/plan-01-readonly/discover/default-0/tests/tmt/tests/booted/readonly/001-test-status.nu:17:25]
 16 │ # Detect composefs by checking if composefs field is present
 17 │ let is_composefs = ($st.status.booted.composefs? != null)

An full example: https://artifacts.dev.testing-farm.io/5011fe3d-91ea-4bb2-8f81-f4e670f7b41e/

openning this as we have seen these on: #1809 and now on #1601 which unified storage does not touch the bootloader.

This is only rawhide so something might have changed recently affecting how the boot/loader directory is created?

Activity

  1. cgwalters commented on Dec 12, 2025

    @cgwalters
    Member
  2. HuijingHei commented on Dec 16, 2025

    @HuijingHei
    Contributor

    Can reproduce locally on rawhide, but looks wired about the mount, maybe we do not handle correctly the mount on btrfs

    • Start Fedora-rawhide and check /etc/fstab before running bootc install
    [fedora@citest-1 ~]$ cat /etc/fstab 
    UUID=999de14f-18cf-40ba-99cc-c229a1225da0 / btrfs compress=zstd:1,defaults,subvol=root 0 1
    UUID=999de14f-18cf-40ba-99cc-c229a1225da0 /boot btrfs compress=zstd:1,subvol=boot 0 0
    UUID=999de14f-18cf-40ba-99cc-c229a1225da0 /home btrfs compress=zstd:1,subvol=home 0 0
    UUID=999de14f-18cf-40ba-99cc-c229a1225da0 /var btrfs compress=zstd:1,subvol=var 0 0
    UUID=4824-0C80 /boot/efi vfat defaults,umask=0077,shortname=winnt 0 0
    
    • Run bootc install
    podman run --rm --privileged -v /dev:/dev -v /var/lib/containers:/var/lib/containers -v /:/target \
    --pid=host --security-opt label=type:unconfined_t \
    quay.io/fedora/fedora-bootc:rawhide \
    env BOOTC_BOOTLOADER_DEBUG=1 RUST_LOG=trace bootc install to-existing-root --skip-fetch-check --acknowledge-destructive --root-ssh-authorized-keys /target/root/.ssh/id_rsa.pub --karg=console=ttyS0,115200n8
    ...
    DEBUG Root filesystem: /target
    DEBUG Target boot is a mountpoint, remounting rw
    TRACE exec: "findmnt" "-J" "-v" "--output=SOURCE,TARGET,MAJ:MIN,FSTYPE,OPTIONS,UUID" "--mountpoint" "/target"
    DEBUG Root mount: UUID=999de14f-18cf-40ba-99cc-c229a1225da0 ["rootflags=subvol=root"]
    DEBUG root_dev=35 boot_dev=47
    TRACE exec: "findmnt" "-J" "-v" "--output=SOURCE,TARGET,MAJ:MIN,FSTYPE,OPTIONS,UUID" "--mountpoint" "/target/boot"
    DEBUG boot UUID: Some("999de14f-18cf-40ba-99cc-c229a1225da0")
    DEBUG Finding parents for /dev/vda3
    TRACE exec: "lsblk" "--pairs" "--paths" "--inverse" "--output" "NAME,TYPE" "/dev/vda3"
    DEBUG Finding parents for /dev/vda
    TRACE exec: "lsblk" "--pairs" "--paths" "--inverse" "--output" "NAME,TYPE" "/dev/vda"
    DEBUG Backing device: /dev/vda
    TRACE exec: "sfdisk" "-J" "/dev/vda"
    DEBUG boot uuid=999de14f-18cf-40ba-99cc-c229a1225da0
    ...
    Installation complete!
    
    • After reboot, get failed rpm-ostree-fix-shadow-mode.service
    [systemd]
    Failed Units: 1
      rpm-ostree-fix-shadow-mode.service
    [root@fedora ~]# journalctl -u rpm-ostree-fix-shadow-mode.service
    Dec 16 02:03:54 fedora systemd[1]: Starting rpm-ostree-fix-shadow-mode.service - Update permissions for /etc/shadow...
    Dec 16 02:03:54 fedora rpm-ostree[820]: error: loading sysroot: Unexpected state: /run/ostree-booted found, but no /boot/loader directory
    Dec 16 02:03:54 fedora systemd[1]: rpm-ostree-fix-shadow-mode.service: Main process exited, code=exited, status=1/FAILURE
    Dec 16 02:03:54 fedora systemd[1]: rpm-ostree-fix-shadow-mode.service: Failed with result 'exit-code'.
    Dec 16 02:03:54 fedora systemd[1]: Failed to start rpm-ostree-fix-shadow-mode.service - Update permissions for /etc/shadow.
    
    • Check /boot directory looks wired as having home, root, var, they should be not there, it might be the mount issue
    [root@fedora ~]# ls -al /boot/
    total 24
    drwxr-xr-x   1 root root   76 Dec 15 14:33 .
    drwxr-xr-x. 13 root root 4096 Jan  1  1970 ..
    drwxr-xr-x.  1 root root  100 Dec 15 14:27 boot
    -rw-r--r--.  1 root root 2231 Dec 15 14:33 bootupd-state.json
    drwxr-xr-x.  1 root root   50 Dec 15 14:33 grub2
    drwxr-xr-x.  1 root root   12 Dec 15 14:17 home
    drwxr-xr-x.  1 root root  212 Dec 15 14:26 root
    drwxr-xr-x.  1 root root  170 Dec 15 06:03 var
    
    [root@fedora ~]# systemctl cat boot.mount
    ...
    SourcePath=/etc/fstab
    Before=local-fs.target
    After=blockdev@dev-disk-by\x2duuid-999de14f\x2d18cf\x2d40ba\x2d99cc\x2dc229a1225da0.target
    
    [Mount]
    What=/dev/disk/by-uuid/999de14f-18cf-40ba-99cc-c229a1225da0
    Where=/boot
    Options=ro
    
    [root@fedora ~]# cat /etc/fstab 
    UUID=999de14f-18cf-40ba-99cc-c229a1225da0 /boot auto ro 0 0
    
    • If I update this to and reboot, enter into grub shell
    [root@fedora ~]# cat /etc/fstab 
    UUID=999de14f-18cf-40ba-99cc-c229a1225da0 /boot btrfs subvol=boot 0 0
    
    • Under grub shell, the mount is not correct, failed as can not find the correct grub.cfg.
    grub> ls (hd0,gpt3)/
    boot/ grub2/ bootupd-state.json home/ var/ root/ 
    grub> configfile (hd0,gpt3)/boot/grub2/grub.cfg
    

    Find the workaround, before reboot, update the /etc/fstab to add subvol=boot:

    [root@citest-1 ~]# cat /ostree/deploy/default/deploy/4c51fe6c7dc2f432de0b8897e63fbe44c49cc04b45881524d1d23d67dedbac5d.0/etc/fstab 
    UUID=946207b6-e331-4c63-b643-891cc3c94b3d /boot btrfs subvol=boot 0 0
    
  3. HuijingHei commented on Dec 16, 2025

    @HuijingHei
    Contributor

    I will create a PR for the change to read boot entry from /etc/fstab on host, see #1856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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