You are not logged in.

#1 2021-05-23 20:27:46

liticovjesac
Member
From: Stockholm-Belgrade-Köln
Registered: 2008-07-16
Posts: 109

[Solved] Replacing grub with systemd-boot when esp is on /boot/efi

Hi,
I am getting tired of occasional boot failure to which I cannot find reason or fix so I was thinking about changing grub to systemd-boot. I would like yours suggestions about how to do it in a simplest and safest way.
For a moment uefi partition (512mb) is mounted on /boot/efi
According to archwiki for systemd-boot esp should be mounted directly in /boot
As I understand this means that /boot partition should be empty prior to mounting esp and prior installing kernel and bootloader packages. Is that correct?
Since I have linux img files there and some efi files on esp how should I do this?
Thanx.

Last edited by liticovjesac (2021-05-25 05:52:00)

Offline

#2 2021-05-23 22:26:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,028

Re: [Solved] Replacing grub with systemd-boot when esp is on /boot/efi

What's the nature of the boot error and why do you think systemd-boot would help you here? If you can consistently load the initramfs but something fails later in the boot you will change nothing by switching boot loaders.

If you really think you'd want to do this you can move the current kernel images/files that are in /boot to /boot/efi and then change the mount point in fstab.  It doesn't inherently matter whether boot is empty, but systemd-boot needs to be able to reach the vmlinuz and initramfs images and that is easiest done by copying them to the ESP and mounting said ESP to /boot so that they will be automatically updated on kernel version bumps.

But again the only boot error you have a slight chance of fixing by doing that if your root filesystem wasn't found occasionally but that kind of error would be very visible, you won't fix any issue that is unrelated to identifying the root partition by doing that switch.

Last edited by V1del (2021-05-23 22:28:40)

Offline

#3 2021-05-24 06:15:15

liticovjesac
Member
From: Stockholm-Belgrade-Köln
Registered: 2008-07-16
Posts: 109

Re: [Solved] Replacing grub with systemd-boot when esp is on /boot/efi

I don't know the nature of that randomly boot problem so I am just shooting in the dark. What I have found searching for an answer is 2 lines in GRUB wiki article which pretty much describe what happened during boot:

Boot freezes
If booting gets stuck without any error message after GRUB loading the kernel and the initial ramdisk, try removing the add_efi_memmap kernel parameter.

Do you know where that kernel parameter should be? I don't see it in /etc/default/grub.conf

Offline

#4 2021-05-24 10:33:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,028

Re: [Solved] Replacing grub with systemd-boot when esp is on /boot/efi

It's not added by default. Stuck where? "Loading initial ramdisk" or later when it loads systemd? Have you tried removing the quiet kernel parameter and adding debug instead so you get more log messages?  (you can temporarily edit a boot entry within GRUB by pressing e )  FWIW most of the time such a "random" boot error happens is due to graphical target getting reached too quick and xorg failing to start while it waits for the graphics device to initialize, in which case you should be able to reliably boot to a terminal with the systemd.unit=multi-user.target parameter and to fix the graphical startup you can enable early KMS: https://wiki.archlinux.org/title/Kernel … _KMS_start

Offline

#5 2021-05-25 05:50:34

liticovjesac
Member
From: Stockholm-Belgrade-Köln
Registered: 2008-07-16
Posts: 109

Re: [Solved] Replacing grub with systemd-boot when esp is on /boot/efi

I have all ready change to systemd-boot. Lets see how it works now and if freezing is repeating.

Before, as you said, it was hard to see where boot process stuck without detail output. I will try what you suggested it if it comes back. Only lines that i could see was Loading Linux linux ...  Loading initial ramdisk ...
Randomly, sometims lts, sometimes linux, sometimes both, but fallback (both) was always working.

Chaning bootloader was not so smooth in my case. It didnt work with first try. I had to chroot, even format EFI partition again...

Last edited by liticovjesac (2021-05-25 05:58:44)

Offline

Board footer

Powered by FluxBB