Skip to content

store: Support read-only /sysroot on a live ISO#2275

Open
cgwalters wants to merge 1 commit into
bootc-dev:mainfrom
cgwalters:handle-readonly-root
Open

store: Support read-only /sysroot on a live ISO#2275
cgwalters wants to merge 1 commit into
bootc-dev:mainfrom
cgwalters:handle-readonly-root

Conversation

@cgwalters

@cgwalters cgwalters commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

We want to support at least read-only operation when mounted from a physically read-only medium (like a squashfs/EROFS for /sysroot).

Check the backing block device status, and propagate its read-only state up.

Generated-by: AI

We want to support at least read-only operation when mounted from
a physically read-only medium (like a squashfs/EROFS for /sysroot).

Check the backing block device status, and propagate its read-only
state up.

Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the handle-readonly-root branch from fd89199 to ee4ddc2 Compare July 2, 2026 20:52
@github-actions github-actions Bot added the area/documentation Updates to the documentation label Jul 2, 2026
@bootc-bot bootc-bot Bot requested a review from henrywang July 2, 2026 20:52
pub(crate) fn require_writable(&self) -> Result<()> {
anyhow::ensure!(
!self.is_ro,
"Cannot perform this operation: /sysroot is on a read-only block device (e.g. a live ISO)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: This one just feels like the LLM taking things too literally

Suggested change
"Cannot perform this operation: /sysroot is on a read-only block device (e.g. a live ISO)"
"Cannot perform this operation: /sysroot is on a read-only block device"

}

// The mount is read-only but the device is writable: this is the normal
// ostree case where /sysroot is mounted read-only by default. Remount it

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here and a few places else: we shouldn't only be mentioning ostree as the composefs backend also does the same

let d = Dir::open_ambient_dir("/sysroot", cap_std::ambient_authority())
.context("Opening /sysroot")?;
let is_ro = sysroot_is_read_only(&d)?;
let physical_root = d.open_dir(".").context("Opening /sysroot")?;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to reopen sysroot here?

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

Labels

area/documentation Updates to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants