bootc-container-split-kernel-and-rootfs - Man Page

bootc-container-split-kernel-and-rootfs - Split kernel and rootfs from a container image

Synopsis

bootc container split-kernel-and-rootfs

Description

Split kernel and rootfs from a container image

Options

--rootfs=ROOTFS

Operate on the provided rootfs

Default: /

--output=OUTPUT

Output directory for the extracted kernel files

Examples

Extract kernel files from the current root filesystem to /kernel:

bootc container split-kernel-and-rootfs --output /kernel

This extracts the kernel and initramfs from the current root filesystem (/) and places them in /kernel/<kernel-version>/ with filenames vmlinuz and initramfs.img.

Extract kernel files from a mounted container rootfs:

bootc container split-kernel-and-rootfs --rootfs /mnt/container-rootfs --output /output/kernels

This extracts kernel files from a container filesystem mounted at /mnt/container-rootfs and places them in the output directory.

Example output structure:

After running the command, the output directory will contain:

/output/kernels/
└── 6.5.0-15-generic/
    ├── vmlinuz
    └── initramfs.img

where 6.5.0-15-generic is the detected kernel version from the source rootfs.

See Also

bootc(8)

Version

v1.16.7