I'm trying to understand what is the difference of making Alpine installation medium as read-only type (LiveCD) and as a standard disk mode (where the OS state can be saved). I've seen the modloop option when the author of this article (https://wiki.alpinelinux.org/wiki/Create_UEFI_boot_USB) configured loader entries for UEFI boot mode:

Contents of loader/entries/alpine.conf
title    Alpine Linux
linux    /boot/vmlinuz-hardened
initrd   /boot/initramfs-hardened
options  modloop=/boot/modloop-hardened modules=loop,squashfs,sd-mod,usb-storage quiet

And the question is how options listed in this stanza modloop=/boot/modloop-hardened modules=loop,squashfs,sd-mod are related to each other and what do they mean?


The modloop= option specifies a SquashFS filesystem that gets mounted to /.modloop by the init file /etc/init.d/modloop and symlinked from /lib/modules (or possibly union-mounted with the overlay - see the modloop init script for details). It contains the full kernel module tree for the built kernel, not the more limited set included in the initramfs / initrd.

You might find these helpful to explore:

  • unsquashfs -l /boot/modloop-hardened (to explore what will get mounted to /.modloop)
  • gzip -dc /boot/initramfs-hardened | cpio -it (to explore the initramfs contents)