INITRAMFS.CONF(5)
π INITRAMFS.CONF(5) π
β¨ NAME β¨
okay so this page is all about initramfs.conf, the config file for mkinitramfs π it's basically the settings menu for building your initramfs π§
πΈ DESCRIPTION πΈ
bestie, mkinitramfs can totally be customized through its config file, and it's giving main character energy π
every line in the file is one of three things: a config variable, a blank line, or a comment. variables get set with a statement that looks like name=[value] π«Ά
you can also split your settings into little snippets and drop them in individual files inside /etc/initramfs-tools/conf.d. these get read after the main config file, so you can override stuff without even touching the main file β¨ iconic behavior, no cap π₯
π GENERAL VARIABLES π
π MODULES
MODULESβ this decides which modules go in the initramfs image π¦listβ loads no extra modules at boot, other than the ones in/etc/initramfs-tools/modulesand/usr/share/initramfs-tools/modules.d/*(those are always included and loaded early in boot, fr fr)mostβ adds most file system drivers, plus allata,sata,scsiandusbdrivers πdepβ tries to guess which modules the running machine actually needs, and only adds those π§netbootβ adds the base and network modules but skips block devices π- the default is
mostπ
π«§ BUSYBOX
BUSYBOXβ includes busybox utilities for the boot scripts π§Έ if you set it ton,mkinitramfsbuilds an initramfs without busybox. > bestie be careful, lots of boot scripts need those busybox utilities π
ποΈ COMPRESS
COMPRESSβ picks the compression method for the initramfs image π if the kernel doesn't support it (CONFIG_RD) or the matching userspace utility isn't installed,mkinitramfsfalls back togzipπ
π¦ COMPRESSLEVEL
COMPRESSLEVELβ sets the compression level for the initramfs image πͺ the defaults are9forlz4,9forzstd, and the builtin defaults for everything else β¨
π UMASK
UMASKβ sets the umask value of the generated initramfs file π super useful so eventual keys don't get exposed π
π BOOT
BOOTβ lets you boot from an nfs drive as the root π the default is to boot from local media (hard drive, USB stick) πΎ set it tonfsfor an NFS root share π«Ά
π§© RUNSIZE
RUNSIZEβ the size of the/runtmpfs mount point π you can give it in bytes (suffixes work too) or as a percentage of your physical RAM π it gets used as the value of the size mount option to tmpfs. for the deep dive, checkhttps://www.kernel.org/doc/Documentation/filesystems/tmpfs.txtπ you can override it with the optionalinitramfs.runsize=bootarg π the default is10%π
π₯ VARIABLES FOR LOCAL BOOT π₯
π€ RESUME
RESUMEβ the device used for suspend-to-disk (hibernation), which the initramfs should try to resume from π if it's not defined or it's set toauto,mkinitramfsautomatically picks the largest available swap partition π«§ set it tononeto turn off resume from disk π«
ποΈ FSTYPE
FSTYPEβ the filesystem type(s) to support, separated by commas π if it's not defined or it's set toauto,mkinitramfsdetects the current root and/usrfilesystem types on its own π§
π VARIABLES FOR NFS BOOT π
π¦ DEVICE
DEVICEβ the default network interface to use, likeeth0π theiporBOOTIFbootargs can override this π
π VLAN
VLANβ sets up the VLAN tag id, e.g.VLAN=eth0.1:eth0π·οΈ thevlanbootarg can override this β¨
π ROOT
ROOTβ lets you hardcode the root bootarg when no root bootarg can be passed π«Ά a real root bootarg always beats this special setting π
π°οΈ NFSROOT
NFSROOTβ defaults toauto, which picks up the value from the DHCP server π otherwise you need to specify it asHOST:MOUNTπ‘
π FILES π
/etc/initramfs-tools/initramfs.confβ the main config file, where all the magic starts πͺ
π AUTHOR π
the initramfs-tools are written by Maximilian Attems <maks@debian.org>, Jeff Bailey <jbailey@raspberryginger.com> and numerous others π«Ά loosely based on mkinitrd.conf by Herbert Xu πΈ
π SEE ALSO π
initramfs-tools(7), mkinitramfs(8), update-initramfs(8) β¨
bestie that's the whole tea βπ initramfs-tools Β· 2018/07/18 Β· INITRAMFS.CONF(5) π¦ stay gorgeous, stay bootable π π
π¦ where this page comes from
- ubuntu noble: initramfs-tools-core 0.142ubuntu25
- ubuntu noble: initramfs-tools-core 0.142ubuntu25.8
- ubuntu questing: initramfs-tools-core 0.150ubuntu3
- ubuntu questing: initramfs-tools-core 0.150ubuntu3.1 Β· GPL-2.0-or-later
- ubuntu resolute: initramfs-tools-core 0.151ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: initramfs-tools-core 0.151ubuntu3 Β· GPL-2.0-or-later
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms