You are not logged in.

#1 2023-11-18 08:55:33

proJM
Member
Registered: 2023-11-18
Posts: 14

[SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Hello,
today I removed grub to replace with systemd-boot by following this thread: https://bbs.archlinux.org/viewtopic.php?id=223909
After rebooting I wait for 1 and a half minutes then systemd-boot says
"Timed out waiting for device /dev/nvme0n1p1" (see image: https://pasteboard.co/RWhBnbPZTA2u.png)
Then I get a bunch of dependency failures.
After that I get put in emergency mode where systemd-boot tries to start initrd.target then asks me to press enter, tries to start it again and repeats.
I have pressed enter for a while and it seems that it doesn't end.

Using a usb with linux mint (and later with endevour OS) I can open any folder but the boot folder looks to be empty. Adding the files back doesn't fix it nor help.
I belive that on step 3 of the thread I put the wrong PARTUUID.

Is my system bricked or is there some way to recover?

Thanks!

Last edited by proJM (2023-11-23 07:52:34)

Offline

#2 2023-11-18 10:06:42

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

To recover, and restore grub:
Boot your system with an arch installation image, and then chroot and reinstall grub, kernel and initramfs image..
https://wiki.archlinux.org/title/Chroot

On Systemd-boot:
Don't follow any random thread here, but stick only to the wiki:
https://wiki.archlinux.org/title/Systemd-boot

Offline

#3 2023-11-19 03:44:17

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Thanks for the info. I wasn't sure about the thread at first but no one said anything was wrong so I followed it. Next time I will not follow random threads for something as important as the bootloader.
I will try your advice soon, if it works I will mark as solved.
Thanks again for the help.

Offline

#4 2023-11-19 05:52:05

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Grub does look to be installed now but I don't have a menu for it. All I get is the grub cli.
See the image:
https://pasteboard.co/4mW93BzYkh8V.jpg

Offline

#5 2023-11-19 09:56:03

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

When installing grub,
https://wiki.archlinux.org/title/GRUB
you must decide if your have an "UEFI systems" or "BIOS systems".
Which one did you use ? Did you also follow the chapter 4. Configuration ?

Inspect the /boot folder is there a kernel, initramfs, grub ?
In case of "UEFI systems": where is your EFI system partion, and whats it's content ?

Offline

#6 2023-11-19 10:05:41

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

I did UEFI systems and I have followed chaper 4.
The files listed in /boot are:
EFI amd-ucode.img grub initramfs-custom.img initramfs-linux-fallback.img initramfs-linux.img loader vmlinuz-linux

I have two partions. nvme0n1p1 which is 511M. I would think this is my boot partion because of the size and name.
nvme0n1p2 is 465.3G which would be my system.

Offline

#7 2023-11-19 10:20:01

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

please post

sudo blkid
efibootmgr --verbose 

and please post inside chroot (with everything mounete bofore):

lsblk --fs
ls -la /boot
ls -la /boot/EFI
cat /boot/grub/grub.cfg

Offline

#8 2023-11-19 10:22:42

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

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Post

mount
lsblk -f
efibootmgr -uv
cat /boot/grub/grub.cfg

from a chroot with your partitions properly mounted.
https://wiki.archlinux.org/title/List_o … n_services

What's your end goal now, do xou want systemd-boot or to restore GRUB?

Offline

#9 2023-11-19 10:51:04

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

I think I would like to restore grub, I will do the commands tomorrow as it is too late for me to now. Thanks for all the help.

Offline

#10 2023-11-20 06:40:50

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

ua4000 wrote:

please post

sudo blkid
efibootmgr --verbose 

and please post inside chroot (with everything mounete bofore):

lsblk --fs
ls -la /boot
ls -la /boot/EFI
cat /boot/grub/grub.cfg

Please see the following images:
https://pasteboard.co/WzRPRSE3yD1W.jpg
https://pasteboard.co/cYLaY7lX7xVN.jpg

Sorry the last command doesn't show it all. I'm not sure how to make the text size smaller as it is different to kitty.
Hope it has the info you need.
It should be noted that for some reason all my files are under /@/

Offline

#11 2023-11-20 06:44:47

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

V1del wrote:

Post

mount
lsblk -f
efibootmgr -uv
cat /boot/grub/grub.cfg

from a chroot with your partitions properly mounted.
https://wiki.archlinux.org/title/List_o … n_services

What's your end goal now, do xou want systemd-boot or to restore GRUB?

Please see the following images:
https://pasteboard.co/k1VaOk0XXeK4.jpg
https://pasteboard.co/cYLaY7lX7xVN.jpg

Sorry the last command doesn't show it all. I'm not sure how to make the text size smaller as it is different to kitty.
Hope it has the info you need.
It should be noted that for some reason all my files are under /@/

Offline

#12 2023-11-20 08:27:58

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

At this point would it be easier to reinstall arch? If we are close to fixing grub then I will still go ahead but if we are not close at all I can just reinstall.

Offline

#13 2023-11-20 15:45:45

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

proJM wrote:

It should be noted that for some reason all my files are under /@/

not all files but your boot partition ??? This looks strange. Mount your 1st partition to /boot, and then follow the steps from the wiki to install grub with all steps.

before chroot, like this:

mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot

then proceed with chroot and grub, kernel, initramfs reinstallation.

Offline

#14 2023-11-20 20:51:15

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Will do.

Offline

#15 2023-11-22 09:02:16

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Sorry, I was unable to follow your recomendations yesterday as I was quite busy. I will today if I have time.

Last edited by proJM (2023-11-22 10:44:06)

Offline

#16 2023-11-22 10:14:55

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

ua4000 wrote:
proJM wrote:

It should be noted that for some reason all my files are under /@/

not all files but your boot partition ??? This looks strange. Mount your 1st partition to /boot, and then follow the steps from the wiki to install grub with all steps.

before chroot, like this:

mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot

then proceed with chroot and grub, kernel, initramfs reinstallation.

When I said files I mean all the core linux files. Eg. /boot/ /bin/ /mnt/. They are all there with my files and packages

Offline

#17 2023-11-22 10:32:10

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

I can now bood into arch linux! I get to the login screen but there is no DE for some reason. If I try to login to my account it says my password is wrong though. I can't log into root either.

My guess is that the install it is booting into is root /
which has no users. All of my files and packages are inside of /@/
I'm not sure how to install linux 6.6.2 into /@/ instead of / beacuse I get and error if I arch-chroot into /mnt/@
This error tells me I don't have enough disk space. Any idea?

Last edited by proJM (2023-11-22 10:41:48)

Offline

#18 2023-11-22 18:30:54

ua4000
Member
Registered: 2015-10-14
Posts: 558

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

Looks like you are using @ as BTRFS subvolume - any reason  ... ?
you should investigate here, do you have a double install, one to / and one to @ ?

To consider the subvolume properly:

mount /dev/nvme0n1p2 /mnt  -o subvol=/@    
mount /dev/nvme0n1p1 /mnt/boot
arch-chroot /mnt

then proceed with  grub, kernel, initramfs re-installation.

Offline

#19 2023-11-22 21:20:31

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

I does look like I have a double install. I can see the linux directorys in both / and /@/. The thing is though is that /@/ has alll my packages while / doesn't. /@/ is from /dev/nvme0n1p2. Shouldn't all my boot config go into /@/boot/ not /boot/

Offline

#20 2023-11-23 07:51:54

proJM
Member
Registered: 2023-11-18
Posts: 14

Re: [SOLVED] systemd-boot doesn't boot/gets stuck after removing grub

IT WORKS! Thank you so much! I will mark as solved now.

Offline

Board footer

Powered by FluxBB