Packages and Binaries:

initramfs-tools

This package builds a bootable initramfs for Linux kernel packages. The initramfs is loaded along with the kernel and is responsible for mounting the root filesystem and starting the main init system.

Installed size: 112 KB
How to install: sudo apt install initramfs-tools

  • initramfs-tools-core
  • linux-base
update-initramfs

Generate an initramfs image

root@kali:~# update-initramfs -h

Usage: update-initramfs {-c|-d|-u} [-k version] [-v] [-b directory]

Options:
 -k version	Specify kernel version or 'all'
 -c		Create a new initramfs
 -u		Update an existing initramfs
 -d		Remove an existing initramfs
 -b directory	Set alternate boot directory
 -v		Be verbose

See update-initramfs(8) for further details.


initramfs-tools-core

This package contains the mkinitramfs program that can be used to create a bootable initramfs for a Linux kernel. The initramfs should be loaded along with the kernel and is then responsible for mounting the root filesystem and starting the main init system.

Installed size: 211 KB
How to install: sudo apt install initramfs-tools-core

  • coreutils
  • cpio
  • klibc-utils
  • kmod
  • logsave | e2fsprogs
  • udev
lsinitramfs

List content of an initramfs image

root@kali:~# lsinitramfs -h

Usage: lsinitramfs [-l] initramfs-file...

Options:
  -l   Display long and more verbose listing of initramfs content

See lsinitramfs(8) for further details.


mkinitramfs

Low-level tool for generating an initramfs image

root@kali:~# mkinitramfs -h

Usage: mkinitramfs [option]... -o outfile [version]

Options:
  -c compress	Override COMPRESS setting in initramfs.conf.
  -d confdir	Specify an alternative configuration directory.
  -k		Keep temporary directory used to make the image.
  -o outfile	Write to outfile.
  -r root	Override ROOT setting in initramfs.conf.

See mkinitramfs(8) for further details.


unmkinitramfs

Extract content from an initramfs image

root@kali:~# unmkinitramfs -h

Usage: unmkinitramfs [-v] initramfs-file directory

Options:
  -v   Display verbose messages about extraction

See unmkinitramfs(8) for further details.


Updated on: 2021-Nov-26