root@slackwarecn:~# mkinitrd --help
Usage: mkinitrd [OPTION]
mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip
archive) used to load kernel modules that are needed to mount the
root filesystem, or other modules that might be needed before the
root filesystem is available. Other binaries may be added to the
initrd, and the script is easy to modify. Be creative. :-)
.... many more lines deleted ....
root@slackwarecn:~# mount | grep sda
/dev/sda4 on / type ext4 (rw,relatime)
/dev/sda2 on /boot type ext2 (rw,relatime,errors=continue,user_xattr,acl)
/dev/sda5 on /home type ext4 (rw,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=936,iocharset=cp936,shortname=mixed,errors=remount-ro)
root@slackwarecn:~# mkinitrd -f ext4 -r /dev/sda4
root@slackwarecn:~# cat /etc/mkinitrd.conf.sample
# mkinitrd.conf.sample
# See "man mkinitrd.conf" for details on the syntax of this file
#
#SOURCE_TREE="/boot/initrd-tree"
#CLEAR_TREE="0"
#OUTPUT_IMAGE="/boot/initrd.gz"
#KERNEL_VERSION="$(uname -r)"
#KEYMAP="us"
#MODULE_LIST="ext4"
#LUKSDEV="/dev/sda2"
#LUKSTRIM="/dev/sda2" # verify support with 'hdparm -I $dev | grep TRIM'
#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
#ROOTDEV="/dev/sda1"
#ROOTFS="ext4"
#RESUMEDEV="/dev/sda2"
#RAID="0"
#LVM="0"
#UDEV="1"
#MODCONF="0"
#MICROCODE_ARCH="/boot/intel-ucode.cpio"
#WAIT="1"