[Tutorial] Convert to systemd-boot

Other Linux distros will automatically appear if they also use systemd-boot. If the don’t you can easily add entries to chainload them.

It reads the Windows files from the EFI partition. That is where Windows puts them in the first place.

Changing partition boundaries and moving filsystems has a small chance failure regardless of which tool you use.

Unless you are extremely tight on space, I would recommend using 1GB. That way you don’t have to worry about it.

This is highly install dependent. The actual size ranges are much larger. I would each kernel/ucode/initrd set ranges from about 80MB per kernel to about 300MB per kernel.

@HMS_Endeavour There you have it. The master has spoken. :laughing:

It’s great that no os-prober is required, although the Arch Wiki article you’re referring to specifically mentions only Windows in this regard. The only question is how systemd-gpt-auto-generator can work without systemd-boot. (for me, the swap partition is active without being automatically mounted in the fstab file, so I think it’s because of systemd-gpt-auto-generator, but I use EFI grub, not systemd-boot)

Because that is dependent on systemd not systemd-boot.

Your grub install still uses systemd

1 Like

Actually, the article contains information on setting up Arch/Windows dual boot, so I assumed it is relevant.

On a second machine, yeah!
Somewhere in the this thread I saw @ricklinux had it set to 538M so I just followed that.

Then, among other things, this is also a limitation that you mentioned in your opening comment. For example, Ubuntu is quite conservative in this matter. I also asked on their forum whether systemd-boot is used in Ubuntu. The answer was that it could be used, but not implemented, this feature is for guinea pigs, i.e. Fedora and Arch.

How can you easily, based on a kind of template, insert the entries of other Linux distributions into the chainload?

Can I resize it easily? I have it at 538M

There are many tools for that. You can do it with Gparted from a Live USB.

1 Like

You can just look inside EFI and add a very simple entry like this:

title  Ubuntu
efi    /EFI/Ubuntu/ubuntu_x64.efi

Keep in mind, I don’t know what Ubuntu’s EFI file is actually named but it will be obvious if you look.

I have done it. It is a bit of work but it can be done.

It depends what it is next to. Usually it is pretty easy to do.

So systemd-gpt-auto-generator works as a systemd service. We talked about this before in other topics. I just confused this with systemd-boot, sorry.

You’re right about that, see @dalto’s answer to me below.

I was wondering why there is such a huge range in the size since mine is about 300MB for a single kernel and with grub it was below 100MB.

If I would use hostonly=“yes” (if that is the correct syntax) in a conf file in /etc/dracut.conf.d is the only downside that I would not be able to boot this drive in another machine?

Where is the bootctl update hook located, the service is disabled and it is not in /etc/pacman.d/hooks as the arch wiki suggests.

If Ubuntu (or some other distro) is installed on another disk and has its own ESP, should it be mounted under some directory via fstab for chainloading, as you have described above, to work?

1 Like

That is very large. It is usually bigger because it is detecting a lot of installed files or hardware. You can look inside it with lsinitrd to see what is using the space.

It already uses hostonly yes. You could set:

hostonly_mode=strict

I do this, but I wasn’t comfortable doing it in the last release until I tested it more.

No, they have to share an EFI partition. You could copy the EFI files over though.

2 Likes

Thanks! :wave:t5:

2 Likes

Thanks.
There is a small typo in the discovery wiki for dracut:

Customizing dracut

Dracut is configured via drop-in conf files in the /etc/dracut.conf/d
1 Like

It wasn’t easy at all. Gparted did not let me increase the ESP size, as it was next to the btrfs partition, which takes up the remaining space.

Since I am still setting this thing set up to become my daily driver, I will do another clean install, adding more to my knowledge as I go.

I tried the option hostonly_mode=strict but it didn’t change the size whatsoever after running sudo reinstall-kernels. I also can’t find that option in man dracut.conf, could it be deprecated?

There is no mention of the drop-in conf file in the output of reinstall-kernels:

EndeavourOS➜  ~  ᐅ  sudo reinstall-kernels
Installing kernel 6.1.1-arch1-1
dracut: Executing: /usr/bin/dracut --hostonly --no-hostonly-cmdline -f /efi/a463d5e357b443a18f592fa89825f7ee/6.1.1-arch1-1/initrd 6.1.1-arch1-1
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: dbus-daemon ***
dracut: *** Including module: dbus ***
dracut: *** Including module: i18n ***
dracut: *** Including module: bluetooth ***
dracut: Skipping udev rule: 69-btattach-bcm.rules
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: Skipping udev rule: 70-persistent-net.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    680
dracut: Linked:                   60 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 131 files
dracut: Saved:                    6.33 MiB
dracut: Duration:                 0.060976 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Using microcode found in '/boot/intel-ucode.img' ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/efi/a463d5e357b443a18f592fa89825f7ee/6.1.1-arch1-1/initrd' ***
dracut: dracut: using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/efi/a463d5e357b443a18f592fa89825f7ee/6.1.1-arch1-1/initrd' done ***
dracut: Executing: /usr/bin/dracut -f /efi/a463d5e357b443a18f592fa89825f7ee/6.1.1-arch1-1/initrd-fallback 6.1.1-arch1-1
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: bash ***
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: modsign ***
dracut: *** Including module: dbus-daemon ***
dracut: *** Including module: dbus ***
dracut: *** Including module: i18n ***
dracut: *** Including module: network-manager ***
dracut: *** Including module: network ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: crypt ***
dracut: *** Including module: dm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 60-persistent-storage-dm.rules
dracut: Skipping udev rule: 55-dm.rules
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: kernel-network-modules ***
dracut: *** Including module: lvm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 56-lvm.rules
dracut: Skipping udev rule: 60-persistent-storage-lvm.rules
dracut: *** Including module: mdraid ***
dracut: Skipping udev rule: 64-md-raid.rules
dracut: *** Including module: nvdimm ***
dracut: *** Including module: qemu ***
dracut: *** Including module: qemu-net ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: nbd ***
dracut: *** Including module: nfs ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    2474
dracut: Linked:                   9 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 457 files
dracut: Saved:                    1.4 MiB
dracut: Duration:                 0.036443 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing AuthenticAMD.bin ***
dracut: *** Using microcode found in '/boot/intel-ucode.img' ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/efi/a463d5e357b443a18f592fa89825f7ee/6.1.1-arch1-1/initrd-fallback' ***
dracut: dracut: using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/efi/a463d5e357b443a18f592fa89825f7ee/6.1.1-arch1-1/initrd-fallback' done ***

I took all your advice Dalto. The ESP is 1G, no linuxswap partition and the rest is btrfs for / . Zramd is my goto, so I will use that. Then I will be ready to install Btrfs Assistant, but as this is for grub-btrfs, how does that install work with systemd-boot?