Initramfs init: Difference between revisions
WhyNotHugo (talk | contribs) (Delete list of options. It's outdated and nobody's gonna keep this in sync. Check the man page instead.) |
WhyNotHugo (talk | contribs) m (<code>) |
||
Line 6: | Line 6: | ||
Under a running alpine machine, the following command can be used if for some reason the initramfs has not been created properly for a new kernel. | Under a running alpine machine, the following command can be used if for some reason the initramfs has not been created properly for a new kernel. | ||
{{cmd|mkinitfs -c /etc/mkinitfs/mkinitfs.conf -b / <kernelvers>}} | {{cmd|mkinitfs -c /etc/mkinitfs/mkinitfs.conf -b / <kernelvers>}} | ||
The script is located in {{path|/sbin/}} and is created with ash. It expects {{path|/lib/modules}} to be populated with the <kernelvers> listed. For variations on this command (e.g. for chroot) Search "mkinitfs". | The script is located in {{path|/sbin/}} and is created with ash. It expects {{path|/lib/modules}} to be populated with the <code><kernelvers></code> listed. For variations on this command (e.g. for chroot) Search "mkinitfs". | ||
== initramfs init cmdline options (work in progress) == | == initramfs init cmdline options (work in progress) == |
Revision as of 19:44, 8 January 2023
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
mkinitfs is a tool to create initramfs images. Initramfs images are small images which contain a small filesystem with everything required to boot Alpine. For example, when booting a setup with full disk encryption, the initramfs contains the binaries required to prompt for a password and mount the encrypted disk.
Usage
Under a running alpine machine, the following command can be used if for some reason the initramfs has not been created properly for a new kernel.
mkinitfs -c /etc/mkinitfs/mkinitfs.conf -b / <kernelvers>
The script is located in /sbin/ and is created with ash. It expects /lib/modules to be populated with the <kernelvers>
listed. For variations on this command (e.g. for chroot) Search "mkinitfs".
initramfs init cmdline options (work in progress)
In addition to the kernel boot parameters are a number of parameters that the init script understands. These are documented in the mkinitfs-bootparam(7)
man page.
Although you may specify your own init script when building an initramfs, these parameters allow for extensive control over the initial startup of an Alpine Linux system.