Bootloader-extras apparently not working


when I install the bootloader-extras bundle which includes the clr-init package it doesn’t look like the init is executed from the initrd. I have seen an init=/usr/bin/initra-desktop kernel command line parameter and it appears that the kernel directly skips to execute this from the rootfs.

If my observation is right, then, would it be possible to have bootloader-extras override the default kernel command line that is part of the kernel-native bundle and not run initra-desktop but the init form the initrd?
Or make initra-desktop part of the initrd? I am not entirely sure how this should work, so I can only guess what a solution might look like.

Ah nevermind, it does run, I just wasn’t seeing the full output. It just does not do what I expect it to do.

What do you want to do?

What is you use case?

I want to use systemd features that are only available when systemd detects that it is running from an initrd, like some of the volatile rootfs mount options that are supported by the fstab generator.

The clr-init package that is used by bootloader-extras supplies an initrd image that contains usr/lib/systemd/systemd-volatile-root but it is missing the .service file that is necessary to activate the feature. I’m already patching it for my own mix so I can make images with a pre-installed initrd that supports my use-case.

To be able to support volatile root mounts one needs to change the following things:

  1. Add systemd.volatile=... option to kernel command line

  2. Patch clr-init package to include /usr/lib/systemd/system/systemd-volatile-root.service

  3. Optionally patch linux kernel packages’ .spec file to include %{buildroot}${ModDir}/kernel/fs/overlayfs/overlay.ko into the cpio file/package to make systemd.volatile=overlay work

I’d love to see 2 and 3 upstream so I can drop the one-line patches from my repos.

@hgdahmen Is the system able to auto-update or do you update the system with volatile root?

I turned off auto updates and I am updating the system like this:
sudo su
mount /run/systemd/volatile-root /mnt
cd /mnt
mount -t proc /proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/
mount --rbind /run run/
mount --rbind /tmp tmp/
chroot /mnt /bin/bash
swupd update

However, I am using my own mix for this, so I’ve got less frequent updates.

@hgdahmen I see, thanks for the how-to!

An idea for a bundle could be something like ‘sudo swupd bundle-add grub2 /dev/sdb’ to convert from UEFI to Grub2 I don’t know if this could work into Bootloader-extras or not. But the idea behind it is that converting to Grub2 from UEFI will result in being able to run multiple boots with CLR included in that list.