.ds Aq \(aq
.nh
.TH NAME
bootc-container-split-kernel-and-rootfs \- Split kernel and rootfs from a container image


.SH SYNOPSIS
bootc container split-kernel-and-rootfs


.SH DESCRIPTION
Split kernel and rootfs from a container image


.SH OPTIONS
.PP
\fB--rootfs\fP=\fIROOTFS\fP

.EX
Operate on the provided rootfs

Default: /
.EE

.PP
\fB--output\fP=\fIOUTPUT\fP

.EX
Output directory for the extracted kernel files
.EE


.SH EXAMPLES
\fBExtract kernel files from the current root filesystem to \fB/kernel\fR:\fP

.EX
bootc container split-kernel-and-rootfs --output /kernel
.EE

.PP
This extracts the kernel and initramfs from the current root filesystem (/) and places them in \fB/kernel/<kernel-version>/\fR with filenames \fBvmlinuz\fR and \fBinitramfs.img\fR\&.

.PP
\fBExtract kernel files from a mounted container rootfs:\fP

.EX
bootc container split-kernel-and-rootfs --rootfs /mnt/container-rootfs --output /output/kernels
.EE

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

.PP
\fBExample output structure:\fP

.PP
After running the command, the output directory will contain:

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

.PP
where \fB6.5.0-15-generic\fR is the detected kernel version from the source rootfs.


.SH SEE ALSO
\fBbootc\fP(8)


.SH VERSION
v1.16.4
