MKINITFS-BOOTPARAMS(7)

πŸ“¦
version 3.14.1 Β· 3 versions
, in alpine 3.24

πŸ’… MKINITFS-BOOTPARAMS πŸ’…

okay bestie, so this is the alpine-bootparams page (section 7 of the manual, iykyk) β€” it's all about how you control the startup behavior using the kernel command line. buckle up πŸŽ€


✨ DESCRIPTION ✨

so in early boot, the preferred way to hand configuration data to the running system is via kernel options. you put these in your bootloader config, and they get supplied to the kernel and early userspace in early boot. the mechanism and the options the kernel itself actually interprets? those are documented over in bootparam(7), not here. not me overlapping my own docs πŸ™ˆ

the options documented here are read by the initramfs-init script that's part of the initramfs β€” peek at mkinitfs(1) to learn how to customize it. slay.

the options themselves πŸ‘‘

  • aoe=0.0,2.1,... β€” a comma separated list of ATA-over-Ethernet shelf.slot you need for boot. if you leave this empty, aoe gets enabled anyway, but boot will not pause for device discovery. zero patience energy.
  • aoe_iflist=eth0,... β€” this one is a mandatory parameter if you plan on using aoe at boot. it's a comma separated list of ethernet interfaces to use with the aoe module. no cap.
  • aoe_mtu=1500 β€” Maximum Transmission Unit (MTU) to use for aoe interfaces on networks that support jumbo packets. if you don't set it, the default (usually 1500) is used.
  • blacklist=MODULE{,MODULE} β€” this comma-separated list names kernel modules that modprobe will reject to load. blocked, blocked, you're blocked πŸ’€
  • chart β€” enables bootchartd for measuring system startup speed. very measure-your-glow-up of you.
  • cryptdiscards β€” enable the discard feature for encrypted Solid State Disks. ⚠️ this might have security implications, so like… be aware.
  • cryptdm=NAME β€” after the block device has been decrypted, make it available as /dev/mapper/NAME.
  • cryptheader=DEVICE β€” when the LUKS headers and the encrypted data live on different devices, this option specifies the device that has the LUKS headers.
  • cryptkey=KEYFILE β€” read the key to decrypt the encrypted partition from KEYFILE. it can be a device or a regular file. when KEYFILE starts with EXEC=, it specifies a command without arguments that gets executed and the stdout is used as the key. the key offset and size can be specified by appending :<offset>:<size> to KEYFILE.
  • cryptoffset=SECTORS β€” says the encrypted data begins the given number of sectors after the start of the block device.
  • cryptroot=DEVICE β€” attempt to decrypt DEVICE. manifesting a successful decrypt for you 🫢
  • dasd β€” enable DASD devices on S/390x architectures.
  • zfcp β€” enable zFCP SCSI devices on S/390x architectures.
  • debug_init β€” print debug information during boot.
  • init=PATH β€” path to the init program to execute instead of /sbin/init.
  • init_args=ARGUMENTS β€” extra command line arguments for /sbin/init.
  • ip=CLIENT-IP:SERVER-IP:GATEWAY-IP:NETMASK:HOSTNAME:DEVICE:AUTOCONF:DNS-IP:DNS-IP:NTP-IP β€” specify the network configuration. the format is equivalent to the linux kernel option with the same name. per default, the SERVER-IP, HOSTNAME and NTP-IP parameters are ignored by the initramfs. consult the kernel documentation on nfsroot for more info about the fields of this parameter.
  • modules=MODULE{,MODULE} β€” comma-separated list of kernel modules to load explicitly.
  • nbd=HOST:PORT{,...} β€” comma-separated list of nbd servers. connects to each server running nbd-server to use its exported block device.
  • overlaytmpfs β€” when booting from a read-only filesystem, you can throw this flag to have your changes written to an in-memory temporary overlayfs. the underlying filesystem will always be mounted read-only, and the overlay is always writable. iconic behaviour honestly.
  • overlaytmpfsflags=OPTIONS β€” optional comma-separated list of tmpfs(5) mount options for when overlaytmpfs is used. the default is mode=0755,rw, and you cannot override rw.
  • panic=TIMEOUT β€” disables the recovery/emergency shell when an error happens in initramfs, and triggers a kernel panic instead. dramatic much? 😭
  • quiet β€” generate less output.
  • resume=DEVICE β€” partition to resume from. this can be either a swap partition or a partition containing a swap file. if it's a partition containing a swap file, you must also use resume_offset.
  • resume_offset=OFFSET β€” if resume specifies a partition containing a swap file to resume from, you must also specify the offset of that file from the beginning of the partition with this flag.
  • root=(DEVICE | nfs:IP-ADDRESS:PATH) β€” device or NFS url for the root partition.
  • rootflags=OPTIONS β€” mount options for the device specified with root=.
  • rootfstype=FS_TYPE β€” file system type for the device specified with root=. allowed values are the same as the -t option for mount(1).
  • usrflags=OPTIONS β€” mount options for /usr, if it's in a different filesystem than root. the special value disable can be used to avoid /usr from being mounted from the initramfs. ⚠️ only use it if you know what you're doing. like, actually know.
  • s390x_net=qeth_l2,BUS-ID{,BUS-ID} β€” configure network devices for the S/390x architecture.
  • single β€” launch a root shell before switching to the root partition.
  • uevent_buf_size=BYTES β€” set the buffer size for kernel uevents.

so if no root= parameter is given, the initramfs will build a live system in memory from scratch. this is also called diskless mode. ✨

when booting in diskless mode, these options are also available:

  • alpine_repo=(URL | PATH) β€” if set, /etc/apk/repositories gets filled with this. may be a comma-separated list of URLs.
  • apkovl=(URL | [DEVICE[:FS_TYPE]:]PATH) β€” an HTTP, HTTPS or FTP URL to an apkovl.tar.gz file which will be retrieved and applied. can also be a filesystem path, optionally prepended with the device name with the /dev/ prefix.
  • autodetect_serial=(no | setconsole | setconsole=(REGEX|dmi.ATTRIBUTE=REGEX){,...}) β€” configure serial console detection and setup. if set to no, automatic detection and setup of serial consoles is disabled. if set to setconsole, the first detected serial console is set as the system console early during boot. if set to setconsole=(REGEX|dmi.ATTRIBUTE=REGEX){,...}, the same behavior applies, but setconsole is only invoked if any selector matches. a bare REGEX matches /sys/class/dmi/id/modalias. a dmi.ATTRIBUTE=REGEX selector matches /sys/class/dmi/id/ATTRIBUTE. for example, setconsole=[Aa]mazon,dmi.chassis_asset_tag=OracleCloud[.]com matches either an Amazon modalias or the Oracle Cloud chassis asset tag. ok that example ate πŸ”₯
  • ds=OPTIONS β€” data source for tiny-cloud. if OPTIONS starts with nocloud, tiny-cloud will be enabled.
  • nokeep_apk_new β€” set up a fresh system and ignore any apkovl.
  • pkgs=PACKAGE{,PACKAGE} β€” comma-separated list of packages to be installed.
  • ssh_key=(URL | SSH_KEY) β€” this setting installs openssh and places the public key given as the value in /root/.ssh/authorized_keys. if the value is an HTTP or FTP URL, it fetches the key(s) from there. secure AND convenient πŸ’…
  • splash β€” enable splash screen.
  • usbdelay=NUMBER β€” wait NUMBER seconds for USB devices to show up before searching for boot media.
  • wireguard=INTERFACE;IP_ADDRESS{,IP_ADDRESS,...}[;WG_CONFIG_FILE] β€” set up a wireguard interface named INTERFACE with the addresses IP_ADDRESS and use /etc/wireguard/initrd.conf or WG_CONFIG_FILE as a classic wg (not wg-quick) config.
  • zfs_force=NUMBER β€” enable force importing the root zpool on boot, even if it was previously mounted from a different system/OS.

πŸŽ€ FILES πŸŽ€

  • /usr/share/mkinitfs/initramfs-init β€” default script that will be run in the initramfs. the main character script fr.

🌸 AUTHOR 🌸

written by Natanael Copa <ncopa@alpinelinux.org>, Timo TerΓ€s <timo.teras@iki.fi> and others. legends only πŸ‘‘


πŸ’– REPORTING BUGS πŸ’–

Alpine Linux GitLab: <https://gitlab.alpinelinux.org/alpine/mkinitfs/-/issues>


🌈 SEE ALSO 🌈

nlplug-findfs(1), mkinitfs(1), bootparam(7)


and that's the whole vibe bestie β€” this was mkinitfs 3.14.1-r0, dated July 2018, signing off πŸ¦‹βœ¨ no cap, go boot something iconic πŸ’œ

πŸ“¦ where this page comes from