cfs/boot: Handle separate /boot mount - #2440
Open
Johan-Liebert1 wants to merge 1 commit into
Open
Conversation
If /boot is mounted as XBOOTLDR partition then grub configs are stored there as we were unconditionally searching for grub configs in `/sysroot/boot`, which would fail every time. Fix this by checking if `/boot` is a mountpoint and then checking if we have grub configs in there. This is only an issue with Grub as GrubCC and SystemdBoot both do not store anything inside of `/sysroot/boot` and will (should) always have the ESP mounted at /boot Closes: bootc-dev#2399 Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Collaborator
Actually won't it be at |
Collaborator
Author
|
Oh, you're right, that's the case with both ESP and XBOOTLDR. So this needs to be updated for the other two bootloaders as well. I'll add that |
Collaborator
Author
|
So this isn't actually an issue for us since we manually search for the ESP and temp mount it to get a handle. Trying the following setup, everything works as intended [root@fedora boot]# findmnt /boot
TARGET SOURCE FSTYPE OPTIONS
/boot systemd-1 autofs rw,relatime,fd=89,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=9419
/boot /dev/vda2 ext4 ro,relatime,seclabel
[root@fedora boot]# findmnt /efi
TARGET SOURCE FSTYPE OPTIONS
/efi systemd-1 autofs rw,relatime,fd=94,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=9447
/efi /dev/vda1 vfat rw,nosuid,nodev,noexec,relatime,nosymfollow,fmask=0177,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro[root@fedora boot]# fdisk -l
Disk /dev/vda: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 78C1B509-AC00-4417-ADB9-8B2C1E481990
Device Start End Sectors Size Type
/dev/vda1 2048 2099199 2097152 1G EFI System
/dev/vda2 2099200 4196351 2097152 1G Linux extended boot
/dev/vda3 4196352 20969471 16773120 8G Linux root (x86-64)[root@fedora boot]# bootc status
[ 240.313722] EXT4-fs (vda3): re-mounted df0fd0e2-f9f1-4e2d-b90f-515d284dde04.
● Booted image: localhost/bootc-bls
Digest: sha256:026acb94e25c5b9a4c2f45a790377f8699434df90be3d033b6f1652cfaa524e3 (amd64)
Verity: 641f49373ed6d35f6b274d8e8216ba39e63aa4378d150f404a09ba54f200f46241b1a72639b966513912da3715c3258f9259c345168bfe1909d5ce98f2cbc718
Version: 44.20260908.0 (2026-09-09T03:29:24Z) |
Collaborator
Author
|
Also, currently, we just put everything in the ESP (for SystemdBoot and GrubCC) so I don't think this would be an issue for us. @cgwalters hope I'm not missing some use case here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If /boot is mounted as XBOOTLDR partition then grub configs are stored there as we were unconditionally searching for grub configs in
/sysroot/boot, which would fail every time. Fix this by checking if/bootis a mountpoint and then checking if we have grub configs in there.This is only an issue with Grub as GrubCC and SystemdBoot both do not store anything inside of
/sysroot/bootand will (should) always have the ESP mounted at /bootCloses: #2399