INITRAMFS.CONF(5)

πŸ“¦
version 0.151ubuntu3 Β· 3 versions
, in ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ 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/modules and /usr/share/initramfs-tools/modules.d/* (those are always included and loaded early in boot, fr fr)
    • most β€” adds most file system drivers, plus all ata, sata, scsi and usb drivers πŸ’–
    • 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 to n, mkinitramfs builds 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, mkinitramfs falls back to gzip 😭

πŸ“¦ COMPRESSLEVEL

  • COMPRESSLEVEL β€” sets the compression level for the initramfs image πŸ’ͺ the defaults are 9 for lz4, 9 for zstd, 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 to nfs for an NFS root share 🫢

🧩 RUNSIZE

  • RUNSIZE β€” the size of the /run tmpfs 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, check https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt πŸ“– you can override it with the optional initramfs.runsize= bootarg πŸš€ the default is 10% πŸ’…

πŸ”₯ 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 to auto, mkinitramfs automatically picks the largest available swap partition 🫧 set it to none to 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 to auto, mkinitramfs detects the current root and /usr filesystem types on its own 🧚

🌍 VARIABLES FOR NFS BOOT 🌍

πŸ¦‹ DEVICE

  • DEVICE β€” the default network interface to use, like eth0 πŸ”Œ the ip or BOOTIF bootargs can override this πŸ’–

πŸŽ€ VLAN

  • VLAN β€” sets up the VLAN tag id, e.g. VLAN=eth0.1:eth0 🏷️ the vlan bootarg 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 to auto, which picks up the value from the DHCP server 🌈 otherwise you need to specify it as HOST: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 πŸ’…πŸŒˆ