Skip to content

composefs: add a systemd.mount-extra kernel argument to the BLS boot entry#2121

Merged
cgwalters merged 1 commit intobootc-dev:mainfrom
henrywang:fix-composefs-boot-fstab
Apr 3, 2026
Merged

composefs: add a systemd.mount-extra kernel argument to the BLS boot entry#2121
cgwalters merged 1 commit intobootc-dev:mainfrom
henrywang:fix-composefs-boot-fstab

Conversation

@henrywang
Copy link
Copy Markdown
Collaborator

@henrywang henrywang commented Apr 3, 2026

The composefs install path was not ensuring /boot gets mounted after reboot on systems with a separate /boot partition (e.g. to-existing-root installs). This broke bootc status and bootc upgrade.

Instead of writing to /etc/fstab (which conflicts with transient etc per #1388), add a systemd.mount-extra kernel argument to the BLS boot entry. This tells systemd to mount the boot partition without requiring any /etc state.

Closes: #2120
Assisted-by: Claude Code (Opus 4.6)

@github-actions github-actions bot added the area/install Issues related to `bootc install` label Apr 3, 2026
@bootc-bot bootc-bot bot requested a review from jmarrero April 3, 2026 03:52
Copy link
Copy Markdown
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 ensures that the /boot partition is correctly mounted after reboot in the composefs path by writing the appropriate entry to /etc/fstab in the deployment's state directory. To support this, the boot field in RootSetup was made crate-visible. Feedback suggests using the existing directory handle for relative path operations instead of absolute paths and utilizing labeled atomic writes to ensure correct SELinux context for the new fstab file.

@cgwalters
Copy link
Copy Markdown
Collaborator

What's the OS version? I really want to get away from the /etc/fstab usage for this, see also #1388

For to-existing-root...I would prefer that we take the approach of using a karg instead per that issue.

The composefs install path was not ensuring /boot gets mounted after
reboot on systems with a separate /boot partition (e.g. to-existing-root
installs). This broke `bootc status` and `bootc upgrade`.

Instead of writing to /etc/fstab (which conflicts with transient etc
per bootc-dev#1388), add a systemd.mount-extra kernel argument to the BLS boot
entry. This tells systemd to mount the boot partition without requiring
any /etc state.

Closes: bootc-dev#2120
Assisted-by: Claude Code (Opus 4.6)
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
@henrywang henrywang force-pushed the fix-composefs-boot-fstab branch from 37e4c0d to 8e579ad Compare April 3, 2026 14:37
@henrywang henrywang changed the title composefs: Write /boot fstab entry during install composefs: add a systemd.mount-extra kernel argument to the BLS boot entry Apr 3, 2026
@cgwalters cgwalters enabled auto-merge (rebase) April 3, 2026 15:47
@henrywang
Copy link
Copy Markdown
Collaborator Author

What's the OS version?

It's Fedora 43

@cgwalters cgwalters merged commit 8d51fbe into bootc-dev:main Apr 3, 2026
93 of 103 checks passed
@henrywang henrywang deleted the fix-composefs-boot-fstab branch April 4, 2026 02:19
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.

composefs: /boot not mounted after to-existing-root install (missing fstab entry)

2 participants