You are not logged in.

#1 2024-05-08 09:27:09

Paraflina
Member
Registered: 2024-05-07
Posts: 3

[SOLVED] I can't switch from grub to systemd-boot

I wiped windows from my Thinkpad e14 gen 3 last week, and I'm still trying to configure it for the best experience, and it's taking that long for me to understand how everything works and put it on practice with the almost no free time that i have.
I have it running perfectly on grub, but i wanted to switch to systemd-boot, not only for faster boot times, but also to learn how to do it, but I'm having an issue with the installation
The page on the arch wiki for systemd-boot tells me to execute:

$ bootctl install

But when I do it, what I get is:

Couldn't find EFI system partition. It is recommended to mount it to /boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.

An yes, I've tried specifying the partition, with $ sudo bootctl install --esp-path=/boot/efi
but what I get is:

File system "/dev/nvme0n1p1" has wrong type for an EFI System Partition (ESP).

So i tried running lsblk -f and sudo fdisk -l to see whats wrong
what i get is:

$ lsblk -f
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                           
|-nvme0n1p1 vfat   FAT32       02EE-2F47                             510.8M     0% /boot/efi
|-nvme0n1p2 swap   1           0c83c81b-5728-45c6-943f-471e4eec5d72                [SWAP]
`-nvme0n1p3 ext4   1.0         7b62685b-7ae3-4a6f-8ff3-d67ca2539b42  121.8G    42% /

$ sudo fdisk -l
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                           
|-nvme0n1p1 vfat   FAT32       02EE-2F47                             510.8M     0% /boot/efi
|-nvme0n1p2 swap   1           0c83c81b-5728-45c6-943f-471e4eec5d72                [SWAP]
`-nvme0n1p3 ext4   1.0         7b62685b-7ae3-4a6f-8ff3-d67ca2539b42  121.8G    42% /

Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SSSTC CL4-4D256-Q79                     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 586EE929-3A1D-4B02-ACE8-5BDF49A99BFC

Device           Start       End   Sectors  Size Type
/dev/nvme0n1p1    2048   1050623   1048576  512M Linux filesystem
/dev/nvme0n1p2 1050624   9439231   8388608    4G Linux filesystem
/dev/nvme0n1p3 9439232 500117503 490678272  234G Linux filesystem

Is anything wrong? it seems right to me. My boot partition IS EFI, so why is it giving me that error message?

Btw, sorry if i did anything wrong, which i probabaly did, it's my first post here, i hope everything was clear and understandable

Last edited by Paraflina (2024-05-09 13:53:49)


Still learning, please be patient :')

Offline

#2 2024-05-08 09:46:57

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 64

Re: [SOLVED] I can't switch from grub to systemd-boot

It looks like the type for your boot partition is "Linux Filesystem" and not type "EFI System".

Also, you can just mount /boot, not /boot/efi

I've also had that same message appear because I chose the option in fdisk to set it to "EFI (FAT-12/16/32)" which is MBR as opposed to the GPT "EFI System".
You can use gdisk and set it to EF00 as well.

Last edited by Nikolai5 (2024-05-08 09:47:27)


Ryzen 7 1800X | AMD 7800XT | KDE Plasma
I can't wait to play my favourite game, wine64-preloader.

Offline

#3 2024-05-08 17:12:46

Paraflina
Member
Registered: 2024-05-07
Posts: 3

Re: [SOLVED] I can't switch from grub to systemd-boot

Well... I fucked up.

I really tried using gdisk, but the informations weren't clear enough, and even trying to do exactly how it shows on the wiki page of gptfdisk, I just couldn't convert my mbr partition to gpt it just didn't work, still appearing as linux filesystem.
What I tried to do then: use gnome disk utility! It really converted the partition to gpt, and it even appeared on gptfdisk as ef00, everything seemed to have worked, so i thought: hmm I'll try a restart just to make sure it worked...
I did this without installing systemctlboot, and probably grub was wiped when using gnome disk utility. Now my computer doesn't boot.
That's a literal "instructions unclear, now my computer doesn't boot" moment LMFAO

Ok, so what I'll try doing now is installing systemctlboot via my arch installation drive, I really hope it works.


Still learning, please be patient :')

Offline

#4 2024-05-08 19:23:32

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 64

Re: [SOLVED] I can't switch from grub to systemd-boot

You should be able to sort it out via the live boot medium, just mount the partitions to /mnt and /mnt/boot and then set up systemd-boot following the instructions on the wiki. Which just boils down to running the install command and then setting up the loader.conf and then creating an entry that references the UUID of your Linux partition.


Ryzen 7 1800X | AMD 7800XT | KDE Plasma
I can't wait to play my favourite game, wine64-preloader.

Offline

#5 2024-05-09 11:03:16

Paraflina
Member
Registered: 2024-05-07
Posts: 3

Re: [SOLVED] I can't switch from grub to systemd-boot

I fixed it.

So, what I did: I formated my grub (/boot/efi) partition and rebooted my laptop, which I shouldn't have done, because I uninstalled the bootloader, so it became unable to boot.

What I did to fix it: i got my live arch drive and booted the arch installation tool from it. Then I mounted my drives (First /root, then /boot/efi, then the swap partition. Apparently the order matters, I read it somewhere), Then i ran gdisk to format my /boot/efi partition to ef00, umounted it and mounted it only as /boot. Then I ran 'arch-chroot /mnt' and 'bootctl install' to install the systemd bootloader i wanted to install in the first place, but I faced a really dumb problem that took me 4 hours to fix: when i went to configure systemd-boot, the linux and initrd were missing, when I ran 'bootctl list' it showed "no such file or directory" on these two. It turned out to just be some linux files missing on the /boot partition, of couse, because i formated it. The solution was just to run pacman -S linux on chroot and when i ran exit, umount -a and reboot, it booted right away into my arch desktop, and I'm so glad i fixed it, I really didn't want to reinstall arch and lose my entire desktop customization. So thank you so much, Nicolai5, YOU REALLY REALLY HELPED ME A LOT!! Thanks. If it wasn't by you, I'd never know where to start searching (about the efi stuff)

So, for anyone that's with a similar problem and is reading this, what you should do is: delete your /boot/efi partition and *DON'T REBOOT OR TURN OFF YOUR COMPUTER*, you just deleted your bootloader. Then create a new ef00 (efi filesystem) partition with gdisk (gptfdisk on arch wiki) on the same place you deleted your old one, then run 'bootctl install' and also run 'sudo pacman -S linux' to install the linux files on the bootloader partition. Then just proceed with systemd-boot configuration ( https://wiki.archlinux.org/title/system … figuration ) as the wiki says it should work just fine. If you reboot your computer after all of that and it doesn't boot, first: sorry. Second: try doing what I did when it happened to me.

Last edited by Paraflina (2024-05-09 11:48:51)


Still learning, please be patient :')

Offline

Board footer

Powered by FluxBB