For bind mounting /etc we copy the contents of the EROFS' /etc to the
deployment's state directory
Mounting the EORFS requires help from the initramfs crate, so we also
turn it into a library crate.
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
install: create temporary directory for ESP bls mount
Plus additional review comments:
- Created constant for EFI/LINUX
- Switched from Task to Command
- Create efi_dir as Utf8PathBuf
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
The duplication between this and composefs-boot is high
and we need to squash it; an important step there
would probably be lowering the karg parsing.
Signed-off-by: Colin Walters <walters@verbum.org>
Instaed of writing all present menuentries, only write the menuentry for
switch/upgrade and the menuentry for the currently booted deployment.
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Instead of `/sysroot/state/os/fedora` use `/sysroot/state/os/default` as
the default state directory.
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
If two deployments have the same VMLinuz + Initrd then, we can use the
same binaries for both the deployments.
Before writing the BLS entries to disk we calculate the SHA256Sum
of VMLinuz + Initrd combo, then test if any other deployment has the
same SHA256Sum for the binaries. Store the hash in the origin file under
`boot -> hash` for future lookups.
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
We parse the grub menuentries, get the rollback deployment then perform
the rollback, which basically consists of writing a new .staged
menuentry file then atomically swapping the staged and the current
menuentry.
Rollback while there is a staged deployment is still to be handled.
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Returning a local reference to a `&str` is quite tricky with rust.
Update `title` and `chainloader`, the two dynamic fields in the grub
menuentry, to be `String` instead of `&str`
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Parse the Grub menuentry file, `boot/grub2/user.cfg` to get a list of
bootable UKIs and figure out if a rollback is currently queued.
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Creates a new dedicated crate for kernel command line parsing functionality,
moving it out of bootc-lib for better separation of concerns and modularity.
Changes:
- Create new bootc-kernel-cmdline crate under crates/kernel_cmdline/
- Move kernel_cmdline.rs from bootc-lib to the new crate as lib.rs
- Add bootc-kernel-cmdline dependency to bootc-lib
- Update imports in bootc-lib to use bootc_kernel_cmdline:: namespace
- Add missing Debug derive and documentation to fix lints
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>