I installed EndeavourOS (based on arch linux) via live USB following the guide on my /dev/sda partition where I used to have Ubuntu, which worked fine. I also have a separate HDD, my /dev/sdb partition, with Windows 10 installed. Everytime I turn on my PC I get to the grub shell and I can't boot normally into neither of the OS.
This is the output from grub shell:
grub>ls
grub>(hd0) (hd1) ... (hd1,gpt2) (hd2,gpt2) (hd1,msdos1)...
The partition I need is (hd1,gpt2) so I do:
grub>set root (hd1,gpt2)
grub>linux /boot/vmlinuz-linux root=/dev/sda2
grub>initrd /boot/initramfs_linux.image
grub> boot
and it boots normally into EndeavourOS. Then I try to fix my grub installation:
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
$ sudo grub-install /dev/sda
And I then get this error:
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
I have tried specified the EFI partition following this answer:
$ sudo mount /dev/sda1 /mnt
$ sudo grub-install --efi-directory=/mnt/EFI
but I get:
Installing for x86_64-efi platform.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: error: disk `hostdisk//dev/sda1' not found.
I checked the /mnt/EFI directory:
$ls /mnt/EFI/
drwxr-xr-x 2 root root 4096 21 apr 2019 BOOT
drwxr-xr-x 3 root root 4096 24 mar 15.22 ubuntu
So I thought maybe the usb live installation didn't format correctly the partions... Is there a way to fix this rather then format everything and start from scratch? Thanks in advance.
EDIT: I tried as suggested to refer to /mnt as the efi directory:
$ sudo grub-install --efi-directory=/mnt
and got this error:
Installing for x86_64-efi platform.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
Now my /mnt/EFI folder looks like this:
$ ls /mnt/EFI
BOOT endeavouros ubuntu
$ ls /mnt/EFI/endeavouros
grubx64.efi
$ ls /mnt/EFI/ubuntu
BOOTX64.CSV fw grub.cfg grubx64.efi mmx64.efi shimx64.efi
should I maybe delete the ubuntu folder?
also I have a ton of results running efibootmgr:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,000C,001A,0012,0007,0009,0011,0013,0014,0015,0017,0018,0019,0001,0002,0003
Boot0000* ubuntu
Boot0001* UEFI:CD/DVD Drive
Boot0002* UEFI:Removable Device
Boot0003* UEFI:Network Device
Boot0007 UEFI OS
Boot0009 CD/DVD Drive
Boot000C* UEFI OS
Boot0011 UEFI OS
Boot0012* Unknown Device
Boot0013 ubuntu
Boot0014 ubuntu
Boot0015 UEFI OS
Boot0017 ubuntu
Boot0018 UEFI OS
Boot0019 ubuntu
Boot001A* UEFI OS
SOLVED: I followed the guide on the wiki, launching the live system in UEFI (otherwise it won't work).