bootc-dev / bootc-dev/bootc

Partitioning Support

Open
#926 19 comments 0 reactions 0 assignees View on GitHub
area/install
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

Hi,

I've discussed this with @cgwalters and on Matrix before, but I've been trying to leverage containers to create bootable images for ARM, and more generally, any platform that doesn't have a standardized boot setup.

I wrote a blog post for the larger context [here](https://mripard.github.io/2024/10/18/fedora-arm-bootable-containers.html).

As a prototype, I wrote [ocibootstrap](https://github.com/mripard/ocibootstrap), that now supports most ARM boards setup I came across, and actually support systems from five different vendors (ARM, Amlogic, NXP, Rockchip, TI).

The basic idea is that the container would hold everything the system needs to boot: kernel, bootloader, user-space, etc. plus some metadata that describes how the partitioning should work. `ocibootstrap` then uses those metadata to create a partition table and copies the container content into a disk image.

I believe it's something that should be useful for `bootc` too, and there's a lot of overlap anyway so it would at least make sense to share our effort.

In addition to defining partitions and their mount-points, the additional requirements I came across are:

* MBR Support
* Ability to set the payload, and with an offset (Amlogic)
* Ability to define partitions with a raw content, and at a given offset (Amlogic)
* GPT Support
* Ability to change the maximum number of partitions (Allwinner)
* Ability to define partitions with a raw content, and at a given offset (NXP, Rockchip)

`ocibootstrap` has a set of metadata and the code to deal with all this. It has a set of design goals that might or might not be compatible with `bootc` though:

- Fire-and-Forget thing: everything should be contained in the container, the tool itself should work by default, without any particular option.
- Cross-platform support: we need to be able to create an image for, say, an ARM platform from an x86 machine.

At the very least, I think it would be worthwhile to share our efforts on a common partitioning layout definition. Let me know what you think.

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.