Skip to content

Conversation

@ckyrouac
Copy link
Collaborator

@ckyrouac ckyrouac commented Nov 4, 2025

Allow mount points (separate filesystems) to exist during to-filesystem installations by detecting and skipping them in the empty rootdir check.

When cleaning directories during install, recursively clean the contents of mount point directories while preserving the mount point itself. This is necessary for cases where subdirectories like /var/log or /var/home are separate logical volumes.

Assisted-by: Claude Code

Fixes #1728


I need to test this more and add automated tests. Looking for feedback on possible side effects I'm not aware of.

@github-actions github-actions bot added area/install Issues related to `bootc install` area/ostree Issues related to ostree labels Nov 4, 2025
@bootc-bot bootc-bot bot requested a review from gursewak1997 November 4, 2025 19:51
Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

I think we could still land this with a test case or so?

Which I guess partially blocks on cleaning up the install test cases.

@cgwalters
Copy link
Collaborator

I'm not quite sure this is going to actively fix #1728 though. This case is more like "system-reinstall-bootc on a system where e.g. /foo is a mount point. Except to-existing-root already defaults to --wipe=alongside which should skip this logic anyways?

@ckyrouac ckyrouac force-pushed the var-mount branch 2 times, most recently from 2918c34 to 510589a Compare November 19, 2025 20:03
@ckyrouac ckyrouac marked this pull request as ready for review November 20, 2025 15:20
@bootc-bot bootc-bot bot requested a review from jmarrero November 20, 2025 15:20
When performing a to-filesystem installation, the target directory may
contain pre-existing mount points for directories like /var, /var/lib/containers,
etc. These are legitimate in hybrid/existing filesystem scenarios where certain
directories are on separate partitions.

This change enhances the empty rootdir check to:
- Recursively detect directories that contain only mount points
- Skip directories that are themselves mount points
- Allow installation to proceed when mount hierarchies exist (e.g., /var
  containing /var/lib which contains mounted /var/lib/containers)

Also adds integration test coverage for separate /var mount scenarios using LVM.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: ckyrouac <[email protected]>
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` area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate /var part required for ISO based installation but forbidden for 'bootc install to-filesystem'

2 participants