bootc-dev / bootc-dev/bootc

bootc install to-existing-root failed on aarch64 test

Open
#1,975 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

The failure comes from bootc commit 0a757685ee631ca9d53df6941af4fb71e4ac1bf3 or 0a757685ee631ca9d53df6941af4fb71e4ac1bf3, because commit 51dabaa5cb7b6313b8cd75a002862c64de3c7b85 passed.

efibootmgr needs write access to /sys/firmware/efi/efivars to modify EFI boot variables (like deleting boot entries with -B)
This PR is a simple fix, mount /sys as read-write.

```
podman run --rm --tls-verify=false --privileged --pid=host -v /:/target -v /dev:/dev -v /var/lib/containers:/var/lib/containers --security-opt label=type:unconfined_t localhost/bootc:tmt bootc install to-existing-root --target-transport containers-storage
Installing image: ostree-unverified-image:containers-storage:localhost/bootc:tmt
Digest: sha256:c8de8390f6dcf4a9f6477d29fef5c04ff2ab8faa32ebb61d942f16ea8c0cce34
----------------------------
WARNING: This operation will OVERWRITE THE BOOTED HOST ROOT FILESYSTEM and is NOT REVERSIBLE.
Waiting 20s to continue; interrupt (Control-C) to cancel.
----------------------------
Initializing ostree layout
layers already present: 0; layers needed: 73 (2.2 GB)
Deploying container image...done (33 seconds)
Bootloader: grub
Installing bootloader via bootupd
Executing: "efibootmgr" "-b" "0002" "-B"
Could not delete variable: Read-only file system
error: boot data installation failed: installing component EFI: Updating EFI firmware variables: Clearing EFI boot entries that match target Red Hat Enterprise Linux: Failed to run command: Command {
program: "efibootmgr",
args: [
"efibootmgr",
"-b",
"0002",
"-B",
],
create_pidfd: false,
}
error: Installing to filesystem: Installing bootloader: Failed to run command: Command {
program: "bwrap",
args: [
"bwrap",
"--bind",
"/target/ostree/deploy/default/deploy/96b094a8419f0fd81c0434730e7906d00a3571017a8755761aab66df4c7270ea.0",
"/",
"--proc",
"/proc",
"--dev",
"/dev",
"--ro-bind",
"/sys",
"/sys",
"--bind",
"/target/boot",
"/boot",
"--dev-bind",
"/dev/nvme0n1",
"/dev/nvme0n1",
"--dev-bind",
"/dev/nvme0n1p1",
"/dev/nvme0n1p1",
"--dev-bind",
"/dev/nvme0n1p2",
"/dev/nvme0n1p2",
"--dev-bind",
"/dev/nvme0n1p3",
"/dev/nvme0n1p3",
"--setenv",
"PATH",
"/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
"--",
"bootupctl",
"backend",
"install",
"--write-uuid",
"--update-firmware",
"--auto",
"--device",
"/dev/nvme0n1",
"/",
],
create_pidfd: false,
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.