# \[Tutorial\] Convert to systemd-boot

**URL:** <https://forum.endeavouros.com/t/tutorial-convert-to-systemd-boot/13290>\
**Category:** General system\
**Created:** [April 3, 2021, 2:48pm UTC](https://forum.endeavouros.com/t/tutorial-convert-to-systemd-boot/13290 "2021-04-03T14:48:33Z")\
**Posts on this page:** 1\
**Showing post:** 138

<div class="post-metadata">

**Author:** ![limotux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/limotux/32/35347_2.png) [@limotux](https://forum.endeavouros.com/u/limotux)\
**Post date:** [August 27, 2022, 10:41am UTC](https://forum.endeavouros.com/t/tutorial-convert-to-systemd-boot/13290/138 "2022-08-27T10:41:27Z")

</div>

OK, just for the record I am following @Zesko advice to follow @dalto 's instructions (first post in this thread - **important to read** ) using

> [@Zesko](#):
>
> “ **kernel-install** ”

Now, updating and rebooting! (Done)

```auto
 du -sh /boot
127M /boot

```

I have a lot of space!  
Next we need to remove grub:

```auto
sudo pacman -Rc grub

```

```auto
sudo mkdir /efi

```

```auto
efidevice=$(findmnt /boot/efi -no SOURCE) # save the efi partition location

```

```auto
sudo umount /boot/efi

```

```auto
sudo mount ${efidevice} /efi

```

# To make the mount change permanent, edit `/etc/fstab` and change where it reads `/boot/efi` to `/efi`

```auto
<dump> <pass>
UUID=FDBB-97B1 /efi vfat defaults,noatime 0 2

```

```auto
[limo@lenovo ~]$ sudo bootctl install
Created "/efi/EFI/systemd".
Created "/efi/loader".
Created "/efi/loader/entries".
Created "/efi/EFI/Linux".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/efi/EFI/systemd/systemd-bootx64.efi".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/efi/EFI/BOOT/BOOTX64.EFI".
Random seed file /efi/loader/random-seed successfully written (32 bytes).
Successfully initialized system token in EFI variable with 32 bytes.
Created EFI boot entry "Linux Boot Manager".

```

```auto
# Edit the file `/efi/loader/loader.conf` and uncomment the "timeout" line.

```

```auto
timeout 3
#console-mode keep

```

> Technically speaking, you have now successfully installed systemd-boot. Congrats!

**\> kernel-install:**

```auto
yay -S kernel-install-mkinitcpio

```

**\> You can either save the below as a script**** (I wonder what should I name this script? Where to save it?)**  
Here is the text of the script which I called dalto.sh

```auto
#!/usr/bin/env bash

# Find the configured esp
esp=$(bootctl -p)

# Prepare the efi partition for kernel-install
machineid=$(cat /etc/machine-id)
if [[${machineid}]]; then
    mkdir ${esp}/${machineid}
else
    echo "Failed to get the machine ID"
fi

# Run kernel install for all the installed kernels
while read -r kernel; do
    kernelversion=$(basename "${kernel%/vmlinuz}")
    echo "Installing kernel ${kernelversion}"
    kernel-install add ${kernelversion} ${kernel}
done < <(find /usr/lib/modules -maxdepth 2 -type f -name vmlinuz)

```

Well I thought it can be just executed so I did:

```auto
[limo@lenovo MyScripts]$ sudo bash dalto.sh

```

and got lots of stuff With a few warnings about drivers and fonts… I get occasionally, and it ended up with:

```auto
=> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
/dev/stdin: line 22: grub-btrfs-overlayfs: command not found
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /efi/2ba377af56ef4fb0898b46fcc244bcb9/5.19.4-arch1-1/initrd-fallback
==> Image generation successful

```

Which I believe is OK as **“==\> Image generation successful”**  
Then

```auto
sudo rm -r /boot/efi /boot/grub /boot/initramfs* /boot/vmlinuz*

```

As @dalto said there

> Now you can reboot into your new system. As you install/remove kernels, the whole process should be automated.

Rebooting… hopefully I will be back soon… alive!

i am back… still alive and kicking! 🥳 🎉 🥳 🖖  
the greatest of the great distros, and the greatest fo the great community.  
Billions of thanks and appreciation to @dalto and @Zesko

---

_[View the full topic](https://forum.endeavouros.com/t/tutorial-convert-to-systemd-boot/13290)._
