Alpine 3.9.0 initramfs init changes

Alpine 3.9.0 ships a new version of the init script in it’s initramfs.

left: Alpine 3.9.0, right: Alpine 3.8.2

image

There are a number of interesting changes:

  • better and earlier networking support for the boot process, with an additional kernel parameter for cmdline.txt: BOOTIF, allowing you to specify the device interface you want to use for boot purposes
    • networking is started before the early console, which is probably very useful for debugging
  • soft realtime clock is supported now, which should fix the problem with no hardware realtime clock available on the Raspberry Pi
  • init as a new kernel parameter for cmdline.txt, allowing you to specify the init which will be run on switching into the newly setup system (default is /sbin/init )
  • modloop verification support is added

More about modloop verification

if [ -f /var/cache/misc/*modloop*.SIGN.RSA.*.pub ]; then

  mkdir -p “$sysroot”/var/cache/misc

  cp /var/cache/misc/*modloop*.SIGN.RSA.*.pub “$sysroot”/var/cache/misc

  pkgs=”$pkgs libressl”

fi

This adds a preexisting key to the newly built system which lives under $sysroot before the switch at the end of execution of this init script, and adds the package libressl.

This is the key which is shipped with the initramfs:

image

More about init

You can specify the init command which is supposed to be ultimately executed as a new kernel parameter:

image