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 if config stays 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