Skip to content

install: Fix bug in mount point check#1904

Merged
cgwalters merged 3 commits intobootc-dev:mainfrom
ckyrouac:mount-fix
Jan 14, 2026
Merged

install: Fix bug in mount point check#1904
cgwalters merged 3 commits intobootc-dev:mainfrom
ckyrouac:mount-fix

Conversation

@ckyrouac
Copy link
Collaborator

This fixes a regression from #1727 by removing the unnecessary mount point check prior to the recursive function call. Also adds some tracing statements and updates the integration test to validate the mount check works for this scenario:

/boot/efi mounted with contents in /boot/efi/EFI/firmware/foo

This fixes a regression from bootc-dev#1727
by removing the unnecessary mount point check prior to the recursive
function call. Also adds some tracing statements and updates the
integration test to validate the mount check works for this scenario:

/boot/efi mounted with contents in /boot/efi/EFI/firmware/foo

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@github-actions github-actions bot added the area/install Issues related to `bootc install` label Jan 13, 2026
@bootc-bot bootc-bot bot requested a review from cgwalters January 13, 2026 16:47
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly fixes a regression in the mount point check within require_dir_contains_only_mounts by removing a redundant and incorrect condition. The change is simple and effective. The addition of tracing statements is a good improvement for debugging. Furthermore, the integration test has been enhanced to validate the fix for the specific scenario of a mounted /boot/efi with content, and its robustness is improved with LVM cleanup steps and clearer variable names. The changes are well-justified and look solid.

@dustymabe
Copy link

This seemed to work for me with a mounted /boot/efi:

core@skalnik:~$ find /mnt/sysimage/
/mnt/sysimage/
/mnt/sysimage/boot
/mnt/sysimage/boot/efi
core@skalnik:~$ df -kh /mnt/sysimage/boot/efi
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1      1022M  4.0K 1022M   1% /var/mnt/sysimage/boot/efi

cgwalters
cgwalters previously approved these changes Jan 13, 2026
let sh = &xshell::Shell::new()?;
reset_root(sh, image)?;

// Clean up any leftover LVM state from previous failed runs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the future: This seems like it could have been a separate prep commit - then if there's a bug in this change and we need to revert it we wouldn't revert this cleanup.

@cgwalters cgwalters enabled auto-merge (rebase) January 13, 2026 17:57
@henrywang
Copy link
Collaborator

The failure comes from grub2 regression. #1905 (comment)

Add a `gating` matrix property to test-integration jobs.
Jobs with `gating: false` use `continue-on-error: true`, allowing
them to fail without blocking PR merges.

Mark fedora-44 as non-gating due to a grub2 regression in the base
image (https://bugzilla.redhat.com/show_bug.cgi?id=2429501).

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
It was using 12G, reduce it down to 1G to avoid the github runner
running out of space.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@cgwalters
Copy link
Collaborator

Oh wow it was disk space again? We should probably add something to our GHA runs by default that shows the free space at end or so.

@cgwalters cgwalters merged commit 87e20d6 into bootc-dev:main Jan 14, 2026
42 of 47 checks passed
cgwalters added a commit to cgwalters/bootc that referenced this pull request Jan 15, 2026
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904.
The test builds a container image with an embedded disk.yaml that creates
a partition layout WITHOUT a separate /boot partition - just root (/)
with /boot/efi as a separate mount point.

This partition layout triggers the bug from issue bootc-dev#1907 where bootc's
empty rootfs verification would fail with:
  "Found entry in boot: efi"

The issue was that when /boot is a directory on the root filesystem
(not a separate partition), but /boot/efi IS a mount point on a different
device, the old code incorrectly saw "efi" as a regular directory entry
rather than recognizing it was a mount point boundary.

Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this
test to fail with the expected error message.

Closes: bootc-dev#1907
cgwalters added a commit to cgwalters/bootc that referenced this pull request Jan 16, 2026
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904.
The test builds a container image with an embedded disk.yaml that creates
a partition layout WITHOUT a separate /boot partition - just root (/)
with /boot/efi as a separate mount point.

This partition layout triggers the bug from issue bootc-dev#1907 where bootc's
empty rootfs verification would fail with:
  "Found entry in boot: efi"

The issue was that when /boot is a directory on the root filesystem
(not a separate partition), but /boot/efi IS a mount point on a different
device, the old code incorrectly saw "efi" as a regular directory entry
rather than recognizing it was a mount point boundary.

Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this
test to fail with the expected error message.

This was already fixed by bootc-dev@ab65078
but we didn't realize at the time the scope.

Closes: bootc-dev#1907
Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Jan 16, 2026
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904.
The test builds a container image with an embedded disk.yaml that creates
a partition layout WITHOUT a separate /boot partition - just root (/)
with /boot/efi as a separate mount point.

This partition layout triggers the bug from issue bootc-dev#1907 where bootc's
empty rootfs verification would fail with:
  "Found entry in boot: efi"

The issue was that when /boot is a directory on the root filesystem
(not a separate partition), but /boot/efi IS a mount point on a different
device, the old code incorrectly saw "efi" as a regular directory entry
rather than recognizing it was a mount point boundary.

Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this
test to fail with the expected error message.

This was already fixed by bootc-dev@ab65078
but we didn't realize at the time the scope.

Closes: bootc-dev#1907
Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Jan 16, 2026
Add a TMT test that exercises the mount point check fix from PR bootc-dev#1904.
The test builds a container image with an embedded disk.yaml that creates
a partition layout WITHOUT a separate /boot partition - just root (/)
with /boot/efi as a separate mount point.

This partition layout triggers the bug from issue bootc-dev#1907 where bootc's
empty rootfs verification would fail with:
  "Found entry in boot: efi"

The issue was that when /boot is a directory on the root filesystem
(not a separate partition), but /boot/efi IS a mount point on a different
device, the old code incorrectly saw "efi" as a regular directory entry
rather than recognizing it was a mount point boundary.

Verified that temporarily reverting the fix from PR bootc-dev#1904 causes this
test to fail with the expected error message.

This was already fixed by bootc-dev@ab65078
but we didn't realize at the time the scope.

Closes: bootc-dev#1907
Signed-off-by: Colin Walters <walters@verbum.org>
jeckersb pushed a commit that referenced this pull request Jan 21, 2026
Add a TMT test that exercises the mount point check fix from PR #1904.
The test builds a container image with an embedded disk.yaml that creates
a partition layout WITHOUT a separate /boot partition - just root (/)
with /boot/efi as a separate mount point.

This partition layout triggers the bug from issue #1907 where bootc's
empty rootfs verification would fail with:
  "Found entry in boot: efi"

The issue was that when /boot is a directory on the root filesystem
(not a separate partition), but /boot/efi IS a mount point on a different
device, the old code incorrectly saw "efi" as a regular directory entry
rather than recognizing it was a mount point boundary.

Verified that temporarily reverting the fix from PR #1904 causes this
test to fail with the expected error message.

This was already fixed by ab65078
but we didn't realize at the time the scope.

Closes: #1907
Signed-off-by: Colin Walters <walters@verbum.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants