You are not logged in.

#1 2018-07-24 06:40:09

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 216

Switching to UEFI (systemd-boot) from Grub

Hi all.

I am trying to switch to a pure Efi boot from Grub2. I have an intel nuc nuc6cayh which has UEFI options.

I thought this would be enough: https://bbs.archlinux.org/viewtopic.php?id=223909

However "bootctl install" complains that /boot doesn't exist or that it isn't a FAT system despite using gdisk, making a 550MB partition and formatting it to FAT32 with the ESP and boot flags. (It forces the boot flag in Gparted)

I am using a non Arch live CD because I needed to repartition for the ESP while keeping my root directory intact. I don't know if that matters.

I tried using the --path option to no avail.

Lastly the disk has a protective MBR from the previous Grub installation which I suspect is causing all the problems, I'm not sure how to get rid of it in Gparted or gdisk. If I boot it shows a Grub > prompt despite Grub not even being installed anymore.

Thanks for your help.

Last edited by felixculpa (2018-07-25 03:44:02)

Offline

#2 2018-07-24 10:38:39

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 4,561
Website

Re: Switching to UEFI (systemd-boot) from Grub

What's your partition layout and mountpoint and what is your systemd-boot configuration?

Offline

#3 2018-07-24 21:14:12

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 216

Re: Switching to UEFI (systemd-boot) from Grub

Partion is just split into 2. sda1 is FAT32 set to 551MB because it seems the protected MBR takes a MB and the wiki said to make it at least 550MB for the ESP. sda2 is the root partition  set up at / I believe.

I am typing this out on a phone. I won't be able to check the mountpoints, etc until I get home. I'm assuming they will need to be setup through fstab? If so maybe that's what the problem is as I haven't set up the new ESP partition in fstab yet.

Keep in mind I plan on eventually doing a dual boot with windows.

I haven't really set up systemd-boot yet, I thought that's what the steps such as "bootctl install" were for, which don't work while in a chroot using the live CD I had in. It gives messages like: "system not booted with EFI." Last time I tried at least... This seemed to be the case even if I disabled Legacy Boot and had UEFI enabled instead.

Last edited by felixculpa (2018-07-24 21:17:22)

Offline

#4 2018-07-25 03:41:27

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 216

Re: Switching to UEFI (systemd-boot) from Grub

I used a live Archlinux usb and after mounting and chrooting in I ran "bootctl --path=/boot install" and it ran smoothly. I followed the instructions given by the post I previously referred to. The mount points were sda1 (the ESP) on /boot and sda2 on /.

However I guess I'm still missing something as when I boot it tells me there is no bootable disc found.

I edited my fstab to include the following:
/dev/sda1 /boot/EFI vfat defaults 0 2

But I'm not sure if that's correct either.

When I boot the system it only shows the Built in EFI shell for bootable devices.

Offline

#5 2018-08-02 12:41:32

alter2000
Member
From: Albania
Registered: 2017-11-30
Posts: 1
Website

Re: Switching to UEFI (systemd-boot) from Grub

Are you running on UEFI mode? The MBR part tells me the hard drive has an msdos table, not gpt. systemd-boot doesn't work with legacy BIOS.

If so, you'll have to reinstall to get Arch on UEFI AFAIK.

Offline

#6 2018-08-02 14:08:16

Condor
Member
Registered: 2017-12-01
Posts: 27

Re: Switching to UEFI (systemd-boot) from Grub

alter2000 wrote:

If so, you'll have to reinstall to get Arch on UEFI AFAIK.

Nonsense. gdisk is able to (and will) convert a MSDOS-style MBR to GPT. No reinstall needed.

Offline

#7 2018-08-02 14:15:03

Condor
Member
Registered: 2017-12-01
Posts: 27

Re: Switching to UEFI (systemd-boot) from Grub

felixculpa wrote:

However "bootctl install" complains that /boot doesn't exist or that it isn't a FAT system despite using gdisk, making a 550MB partition and formatting it to FAT32 with the ESP and boot flags. (It forces the boot flag in Gparted)

I'm not aware how gparted calls it, but the EFI system partition does not have an ESP “flag” as such. The partition's type code needs to be set to EFI System partition (code ef00). You can do this with gdisk.


Also, did you copy over the Kernel and initramfs images to the newly created boot partition? These steps are missing from the post you've linked.

Offline

#8 2018-08-02 17:06:44

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: Switching to UEFI (systemd-boot) from Grub

It doesn't sound like you are getting booted in UEFI mode. Is that enabled in your "BIOS"? Make sure you're not booting in legacy mode. Check for the efivars as shown in the install guide. I'd also recommend switching to an Arch install disk for the arch-chroot now that you used the other distro for your partition changes.


Simple and Open

Offline

#9 2018-08-03 06:24:13

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 216

Re: Switching to UEFI (systemd-boot) from Grub

I never managed to fix this on the old hard drive, I have some suspicions on how to fix it. I think I may have the boot files in the wrong locations for example, I also had some quotations in one of the config files that didn't belong there.

However I bought and installed a new SSHD and did a fresh install following the wiki instructions, I used gdisk and made a 512MB partition with the type ef00 and FAT32 file system, and one more ext4 partition with the rest of the space left over. Legacy boot was disabled and am now getting a 6 second cold boot, from systemd-boot to desktop. It works perfectly on the new hard drive.

I will eventually figure out how to fix/transition the old hard drive, but for now this works for my needs.

This doesn't count as "fixed" or "solved" but I guess you can consider this thread "closed."

Last edited by felixculpa (2018-08-03 06:24:39)

Offline

#10 2018-08-05 08:27:36

linux-mate
Member
Registered: 2018-06-28
Posts: 33

Re: Switching to UEFI (systemd-boot) from Grub

May i ask why do you want to switch to UEFI? I also wanted to switch just for the sake of faster boot speeds, but then i searched benchmarks and realized that my boot speed is already prety fast. 13 seconds from power button press to the desktop smile Yes on UEFI this could be 10 seconds but all the hassle for only 3 seconds. Also i have only 1 partition / and that's it.

Offline

#11 2018-08-05 20:28:11

felixculpa
Member
From: Alberta, Canada
Registered: 2012-06-12
Posts: 216

Re: Switching to UEFI (systemd-boot) from Grub

linux-mate wrote:

May i ask why do you want to switch to UEFI? I also wanted to switch just for the sake of faster boot speeds, but then i searched benchmarks and realized that my boot speed is already prety fast. 13 seconds from power button press to the desktop smile Yes on UEFI this could be 10 seconds but all the hassle for only 3 seconds. Also i have only 1 partition / and that's it.

The hassle isn't bad at all if it's from a fresh install, and it's probably not that bad transitioning once you figure it out... Part of the reason for the switch was for performance but also aesthetics, systemd-boot just looks cleaner than Grub, plus configuration is "simpler" than Grub. I like that it's an inbuilt native thing rather than yet another package I have to install as well. It's the same list of reasons for why I use systemd-networkd and iwd for networking.

Offline

Board footer

Powered by FluxBB