initramfs
-
No need for network or wireless drivers inside initramfs because we won’t live boot over network (at least for now)
-
tinycorelinux is run entirely in the initramfs (no
switch_root
) -
kiss provides a minimal initramfs, and packages as .tar.xz then extracts them instead of changing root upon booting
-
tinyramfs does support hardware detection at boot as long as you include all modules necessary for booting. As of how to make this all work, there is the kiss-live project which uses tinyramfs to generate initramfs for live iso.
-
initramfs is newer compared to initrd
-
The file
/init
must exist in an initramfs -
All daemons started by the initramfs must be killed, as the kernel reserves PID 1 for the init system
-
pivot_root
is older thanswitch_root
and was used by the old initrd, while the latter is used by the newer initramfs -
Some init setups require proc, sys and dev to be mounted before starting up with
switch_root
in init, in this case is better to usemount --move
instead of cleaning up withumount
beforeswitch_root
, otherwise it is better overall to useumount
to boot in a clean state. -
/run
needs to exist for some applications likecryptsetup
, but for the ISO we do not need it -
/mnt/root
is the accepted mountpoint for the root filesystem -
We can make use of
findfs
fromutil-linux
to detect the labelglaucus
instead of using/dev/sr0
directly -
When using
find . -print0
the option-0
or--null
should be used withcpio
-
insmod
does not consider dependencies, unlikemodprobe
History
Resources
Implementations
- https://gitlab.alpinelinux.org/alpine/mkinitfs
- https://github.com/hanh-linux/gen-initramfs
- https://github.com/venomlinux/mkinitramfs
- https://github.com/sabotage-linux/sabotage/blob/master/KEEP/initramfs.init
- https://github.com/sabotage-linux/sabotage/blob/master/KEEP/initramfs.sh
- https://github.com/rdbo/sigma-linux/blob/master/profile/initfs