Previous INDEX Next
OpenBSD as backup hydrus server Thinkpad X1C - laggy touchpad after display lock screen

Replacing grub by systemd-boot on Arch Linux (efi boot)

The recent bump of Grub in Arch Linux caused booting problems for some (I stumbled over posts on r/archlinux). A workaround was published, i.e. re-installing grub and re-building the grub.cfg file. I had not yet upgraded, but after I did, I executed the suggested actions:

  # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
  # grub-mkconfig -o /boot/grub/grub.cfg

On reboot, no grub was presented; just a cursor displayed about a third of the way down the screen. After about 20s the system booted. I tried tinkering around in /etc/defaults/grub, but none of the changes I made improved the situation.

In a fit of pique, I decided to replace grub by systemd-boot.

To install, run this command:

  bootctl install

The status of efi booting can be checked by running the command:

  efibootmgr --verbose

There should be an entry for "Linux Boot Manager".

Next, edit /boot/efi/loader/loader.conf. Replace contents with

  default arch
  timeout 3

Then create a file /boot/efi/loader/entries/arch.conf with

  title Arch Linux
  linux /vmlinuz-linux
  initrd /initramfs-linux.img
  options root=UUID=<UUID of root partition>

This setup didn't work. bootctl status reported that the linux and initrd files could not be found. Turns out this is because the files should be located on the root of the efi partition (i.e. /boot/efi as I had originally set it up), but they are actually in /boot (that's where Arch puts them). Therefore changed the mount for the efi partion from /boot/efi to /boot. This removed the error and the machine could be successfully booted.

So, in the instructions above, replace /boot/efi by /boot.

After the successful boot, grub can be removed:

  sudo pacman -Rcnsu grub
  sudo rm -rf /boot/grub

Probably should also delete the now redundant efiboot entry, by somthing along the lines of:

  efibootmgr -B -b 0
<
Previous INDEX Next
OpenBSD as backup hydrus server Thinkpad X1C - laggy touchpad after display lock screen