Deleted EndeavourOS from GRUB

Hello,
Unintentionally I deleted EndeavourOS from the boot options in GRUB, now I can only boot into Windows. I would like to add it back, but I encounter many issues, and can’t get it to work.
I’m using an USB to boot into a live environment. And I’m trying to follow this guide :
Repair a non-booting GRUB
But I’m having issues, to go in Arch-chroot, more precisely to mount my partitions :
I’m using this guide :
Arch-chroot for EFI/UEFI systems
My root partition is using BTRFS,
image

So I have to follow the required steps. But there isn’t anything in /etc/fstab :
image
I can’t find the mountpoint for the BTRFS device, and cannot follow the guide.
If I try to to do something else, many errors are occurring.

Hope somebody can help me !

Thanks

Mount your BTRFS partition:

sudo su
mount -t  btrfs /dev/sda2 /mnt 

Post the output of:

Go into /mnt and navigate to /etc/fstab of your installed system. Post its output. Copy/paste as text and format by clicking on </>.

Also post efibootmgr -v from the live session.

Welcome to the forum @Noe :partying_face::tada::balloon:

1 Like

I’m getting that :

[root@EndeavourOS etc]# cat fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=29AB-629E                            /boot/efi      vfat    umask=0077 0 2
UUID=bd0c66d1-52b7-4fbe-bc77-c104799b930c /              btrfs   subvol=/@,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=bd0c66d1-52b7-4fbe-bc77-c104799b930c /home          btrfs   subvol=/@home,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=bd0c66d1-52b7-4fbe-bc77-c104799b930c /var/cache     btrfs   subvol=/@cache,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=bd0c66d1-52b7-4fbe-bc77-c104799b930c /var/log       btrfs   subvol=/@log,defaults,noatime,autodefrag,compress=zstd,discard=async,ssd 0 0
UUID=00899281-603c-44f8-be42-549f25feae42 swap           swap    defaults,noatime 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

and from efibootmgr -v :

[root@EndeavourOS etc]# efibootmgr -v
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0006,0005,0004,0000
Boot0000* Windows Boot Manager	HD(1,GPT,44613f2d-6407-43d8-9c72-98d1fb1c3c34,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d................
Boot0004* endeavouros-4379	HD(1,GPT,163fd63b-ad73-804b-a657-31d0eea73f66,0x1000,0x96000)/File(\EFI\ENDEAVOUROS-4379\GRUBX64.EFI)
Boot0005* UEFI OS	HD(1,GPT,163fd63b-ad73-804b-a657-31d0eea73f66,0x1000,0x96000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0006* UEFI: General USB Flash Disk 1.00, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(3,0)/HD(1,GPT,32849c92-1720-45cf-9761-df97ca78dc73,0x800,0x3ba2fdf)..BO

1 Like

You seem to have an EFI boot entry for your EnOS.
Have you tried already to go into UEFI settings and change the boot order for it to be the first option?
If so, didn’t it boot up?

It’s booting into GRUB, so I can’t go into my installation of EndeavourOS

Alright, let’s try the chroot! From the Live USB:

1. sudo su 

2. mount -o subvol=@ /dev/sda2 /mnt 

3. mount -o subvol=@log /dev/sda2 /mnt/var/log

4. mount -o subvol=@cache /dev/sda2 /mnt/var/cache

5. mount /dev/sda1 /mnt/boot/efi

6. arch-chroot /mnt 

7. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EnOS

8. grub-mkconfig -o /boot/grub/grub.cfg

9. exit

If you get any error messages at any one of the steps above, please post back in here.

If all is well, check with efibootmgr -v and see if the new EnOS boot entry is first in the boot order.

Reboot.

3 Likes

Do I need to unmount /mnt first, since I’m getting an error

Yes, do that.

It seems to be working, no errors. Will reboot

1 Like

Did you check:

efibootmgr -v

?

Yes, it is working fine now.
I just have one problem every entry is doubled in GRUB now :
PXL_20220114_192938Tempest-V1.3.xml

How can I fix that ?

Every time I boot I also get “error : sparse file not allowed.” But is booting fine after

I’m afraid I’ve never come across this one.

Also from within your EnOS system, please post again

efibootmgr -v

so that we could remove superfluous boot entries.

Also maybe run again

sudo grub-mkconfig -o /boot/grub/grub.cfg

so perhaps it will fix the duplicate entries in the Grub boot menu. Please post the entire terminal output as well.

efibootmgr -v gives :

[noe@noe-PC ~]$ efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0005,0000
Boot0000* Windows Boot Manager  HD(1,GPT,44613f2d-6407-43d8-9c72-98d1fb1c3c34,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d................
Boot0001* EndeavourOS   HD(1,GPT,163fd63b-ad73-804b-a657-31d0eea73f66,0x1000,0x96000)/File(\EFI\ENDEAVOUROS\GRUBX64.EFI)
Boot0005* UEFI OS       HD(1,GPT,163fd63b-ad73-804b-a657-31d0eea73f66,0x1000,0x96000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

and sudo grub-mkconfig -o /boot/grub/grub.cfg gives :

Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
1 Like

efibootmgr -v looks good!

I am a bit baffled why you get duplicates here:

Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img

An also duplicates for Windows :thinking:

What says

ls -al /boot

?

I’m getting this with ls -al /boot :

[noe@noe-PC ~]$ ls -al /boot
total 58432
drwxr-xr-x 1 root root      164 13 janv. 22:20 .
drwxr-xr-x 1 root root      122  9 janv. 19:00 ..
drwx------ 4 root root     4096  1 janv.  1970 efi
drwxr-xr-x 1 root root      106 14 janv. 19:49 grub
-rw------- 1 root root 35600138 13 janv. 22:20 initramfs-linux-fallback.img
-rw------- 1 root root  8919470 13 janv. 22:20 initramfs-linux.img
-rw-r--r-- 1 root root  4769792  8 juin   2021 intel-ucode.img
-rw-r--r-- 1 root root 10531136 13 janv. 22:20 vmlinuz-linux
1 Like

Looks as it should!

I am running out of ideas now here :slightly_frowning_face:
Hopefully someone will come along and look at this with fresh eyes and better mind.

1 Like

Thank you anyway for the great help. Solved the major issue !

1 Like

There is a “nuclear” option to rebuild the whole Grub environment from scratch.
It helps in certain cases but I can’t be 100% sure that it would in yours.
Perhaps better to wait and see if someone will have a less “invasive” solution.

Here it is anyway, but you would need to study it and understand what it does before implementing it. It’s not complicated:

I will try it later when I have time. Thanks again !

1 Like