You are not logged in.

#1 2020-09-01 07:51:15

Californian
Member
Registered: 2014-03-05
Posts: 33

systemd-boot partition configuration best practices

I've used arch for quite a long time, but usually get things booting and ignore the finer details of that area so I'm not super clear on how everything works.

I have an ESP from Windows because I'm dual-booting. I'm trying to use systemd-boot for the first time. My system is new (Dell laptop), using UEFI/GPT, fast and secure boot options are both off.

I'm not sure what mount point is preferable, or the order of operations.

I initially tried creating an /efi folder, mounting that, running bootctl install, and rebooting.

That didn't work, so I assumed I needed to create an entry (I was hoping this happened automagically like it does with grub; maybe it could but I'm missing something?). Specifically, I copied the example in /sys and modified to use the PARTUUID (not UUID) and ext4 for the rootfstype.

That still didn't work, so I tried mounting to /boot instead, though I already had files there (vmlinuz-linux and such). Now I assumed I needed to re-install linux and intel-ucode and rerun mkinitcpio -P (which all feels more manual than I expected, so I assume I'm going down the wrong path for a basic install). I tried doing so, but arch says the partition is out of space.

I could try resizing the partition, but I figured I'd post here in case I'm just barking up the wrong tree.

Let me know if any more information would be helpful, sorry I'm not clear on what context is useful here.

Offline

#2 2020-09-01 09:34:13

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: systemd-boot partition configuration best practices

Californian wrote:

I initially tried creating an /efi folder, mounting that, running bootctl install, and rebooting.

What's the output of the install?

# bootctl install
Californian wrote:

That didn't work

What does "didn't work" look like?

Californian wrote:

I needed to re-install linux and intel-ucode and rerun mkinitcpio -P [...] but arch says the partition is out of space.

What's the output of df with /efi mounted?

# df -h | fgrep efi

--
saint_abroad

Offline

#3 2020-09-01 11:40:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,371

Re: systemd-boot partition configuration best practices

systemd-boot cannot boot a kernel off of a ext4 drive. Yes changing the ESP mount point to /boot and reinstalling the kernel images is the correct course of action if systemd-boot is your goal.

That far for the baseline. So you either have to increase the size of your ESP to house the kernels or use GRUB or refind instead so you have something that can boot from ext4 file systems. Why do you want to use systemd-boot? You seem to have made good experiences with grub, and as you see you will have to do a few things to accommodate for systemd-boot and will gain a few ms of boot time at best and it will allow you to check the needed firmware time with analyze --blame. If you've been told it's "simpler" and more "modern" ignore these people. You can write similarly concise GRUB configurations with all the benefits and none of the drawbacks yourself.

FWIW I've recently ran into the desire to have more than two kernels installed at the same time and instead of messing with my partition table simply moved them to the ext4 root partition and switched from systemd-boot to grub.

@sabroad
OCD, but you can save yourself an unnecessary use of grep and a bit less processing time by just passing a path whose partition information you want to df -h

df -h /efi

Offline

Board footer

Powered by FluxBB