BOOTC-CONT...-AND-ROOTFS(8)
β¨ BOOTC-CONT...-AND-ROOTFS(8) β¨
okay bestie, this one lives in the System Manager's Manual section, so you know it's the real deal π buckle up, we're splitting kernels from root filesystems and it's lowkey iconic.
π NAME π
bootc-container-split-kernel-and-rootfs β Split kernel and rootfs from a container image
fr fr that's the whole personality. it takes a container image and goes "okay, kernel stuff over here, rootfs stuff over there, we're not doing this messy anymore" π
π¦ SYNOPSIS π¦
bootc container split-kernel-and-rootfs
that's it. that's the whole vibe. no cap β¨
πΈ DESCRIPTION πΈ
Split kernel and rootfs from a container image
like. literally what it says on the tin, and honestly? we love a tool that doesn't make us guess π«Ά
π OPTIONS π
--rootfs=ROOTFSβ operate on the provided rootfs. the rootfs you hand it is the one it pokes at, bestie. Default:/(yes, your current root filesystem, main character energy)--output=OUTPUTβ the output directory for the extracted kernel files. this is where all the extracted goodies land, so pick somewhere cute π
π EXAMPLES π
π extract kernel files from the current root filesystem to /kernel
bootc container split-kernel-and-rootfs --output /kernel
so here's the tea β this extracts the kernel and initramfs from the current root filesystem (/) and places them in /kernel/<kernel-version>/ with filenames vmlinuz and initramfs.img. like, that's the naming scheme, that's the assignment, slay.
files that belong to the kernel binary are moved along with it under the same names, when present. currently that is only the FIPS HMAC file (.vmlinuz.hmac) shipped by Fedora and RHEL derivatives. iykyk π
other files in /usr/lib/modules/<kernel-version>/, such as config or System.map, stay in the rootfs. they do not come with. they are not invited. periodt π
π§ extract kernel files from a mounted container rootfs
bootc container split-kernel-and-rootfs --rootfs /mnt/container-rootfs --output /output/kernels
this one extracts kernel files from a container filesystem mounted at /mnt/container-rootfs and places them in the output directory. same energy, different source, we love the versatility β¨
β example output structure
after running the command, the output directory will contain:
/output/kernels/
βββ 6.5.0-15-generic/
βββ .vmlinuz.hmac (Fedora/RHEL, if present)
βββ vmlinuz
βββ initramfs.img
where 6.5.0-15-generic is the detected kernel version from the source rootfs. see how it just knows? obsessed ππ
π SEE ALSO π
bootc(8) β go read that one too bestie, it's the parent lore πΈ
π VERSION π
v1.17.1
ngl, remember: kernel binary files get moved, and everything else in/usr/lib/modules/<kernel-version>/chills in the rootfs. don't come for me ifconfigstays put, that's literally the documented behaviour π
okay that's the whole page, you ate that π this was BOOTC-CONT...-AND-ROOTFS(8) from the System Manager's Manual, version v1.17.1 β go forth and split those kernels, bestie, you've got this π«Άβ¨π
π¦ where this page comes from
- fedora 43: bootc 1.17.1-1.fc43 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
- fedora 44: bootc 1.17.1-1.fc44 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms