Bootloader installation error efi

This is a repost of an earlier topic, but I’ve gathered more info this time and have made it a little easier to pinpoint the problem.

Basically, my issue is the bootloader won’t install. It’ll get to around 80% before an error pops up.

The bootloader could not be installed. The installation command <pre>grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Garuda --force</pre> returned error code 1.

Went on to Konsole to put in some commands I saw from other forums.

sudo mkdir /mnt
mkdir: cannot create directory '/mnt': File exists

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0  15.6M  1 loop /run/miso/sfs/livefs
loop1    7:1    0   440M  1 loop /run/miso/sfs/mhwdfs
loop2    7:2    0   1.2G  1 loop /run/miso/sfs/desktopfs
loop3    7:3    0 699.8M  1 loop /run/miso/sfs/rootfs
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0   100M  0 part /tmp/calamares-root-_nmk03o0/boot/efi
├─sda2   8:2    0    16M  0 part
├─sda3   8:3    0 365.5G  0 part
├─sda4   8:4    0   522M  0 part
└─sda5   8:5    0  99.6G  0 part /tmp/calamares-root-_nmk03o0/var/tmp
/tmp/calamares-root-_nmk03o0/var/log
/tmp/calamares-root-_nmk03o0/var/cache
/tmp/calamares-root-_nmk03o0/srv
/tmp/calamares-root-_nmk03o0/root
/tmp/calamares-root-_nmk03o0/home
/tmp/calamares-root-_nmk03o0
sdb      8:16   1  14.4G  0 disk
├─sdb1   8:17   1   2.5G  0 part /run/miso/bootmnt
└─sdb2   8:18   1     4M  0 part
sr0     11:0    1  1024M  0 rom
zram0  253:0    0   7.6G  0 disk [SWAP]

sudo mount /dev/sda5 /mnt

sudo garuda-chroot /mnt/@

sh-5.1# grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.1# mount /dev/sda5 /boot/efi
sh-5.1# grub-install --target=x86_64-efi --efi-directory/boot/efi --bootloader-id=Garuda --recheck
grub-install: unrecognized option '--efi-directory/boot/efi'
Try 'grub-install --help' or 'grub-install --usage' for more information.

Tried out these and obviously got some errors. Haven’t tried anything else, waiting to see if anyone has any suggestions. I’m using the recent KDE version of Garuda Dragonized. I’ve turned off fast boot and secure boot, and I’m on UEFI.

Appreciate any help!

inxi file:

System:
Host: garuda-dr460nized Kernel: 6.2.13-zen-1-zen arch: x86_64 bits: 64
Desktop: KDE Plasma v: 5.27.4 Distro: Garuda Linux
Machine:
Type: Laptop System: HP product: HP 250 G6 Notebook PC
v: Type1ProductConfigId serial: <superuser required>
Mobo: HP model: 832E v: 26.28 serial: <superuser required> UEFI: Insyde
v: F.32 date: 11/23/2017
Battery:
ID-1: BAT1 charge: 24.6 Wh (94.3%) condition: 26.1/31.1 Wh (84.1%)
CPU:
Info: dual core model: Intel Celeron N3350 bits: 64 type: MCP cache:
L2: 2 MiB
Speed (MHz): avg: 796 min/max: 800/2400 cores: 1: 796 2: 796
Graphics:
Device-1: Intel HD Graphics 500 driver: i915 v: kernel
Device-2: Quanta HP Webcam type: USB driver: uvcvideo
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1 driver: X:
loaded: modesetting dri: iris gpu: i915 resolution: 1366x768~60Hz
API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel HD Graphics 500 (APL
2)
Audio:
Device-1: Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster
driver: snd_hda_intel
API: ALSA v: k6.2.13-zen-1-zen status: kernel-api
Server-1: PipeWire v: 0.3.70 status: active
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
IF: eno1 state: down mac: 80:ce:62:10:c4:3a
Device-2: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi
IF: wlo1 state: up mac: 40:a3:cc:17:a0:a2
Bluetooth:
Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb
Report: bt-adapter ID: hci0 state: up address: 40:A3:CC:17:A0:A6
Drives:
Local Storage: total: 480.17 GiB used: 3.83 GiB (0.8%)
ID-1: /dev/sda vendor: Samsung model: SSD 870 EVO 500GB size: 465.76 GiB
ID-2: /dev/sdb type: USB vendor: Kingston model: DataTraveler 3.0
size: 14.41 GiB
Partition:
Message: No partition data found.
Swap:
ID-1: swap-1 type: zram size: 7.6 GiB used: 268.5 MiB (3.4%) dev: /dev/zram0
Sensors:
System Temperatures: cpu: 47.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 170 Uptime: 4h 12m Memory: 7.6 GiB used: 2.51 GiB (33.1%)
Shell: fish inxi: 3.3.26

(I understand my processor is garbage. Only testing it on laptop and then going to install on PC.)

Check and see if your EFI variable space needs to be cleared before the installation, such as is described in this thread: UEFI Installation fails Bootloader install (Error 1) - #5 by jonathon - EndeavourOS installation - EndeavourOS

If that’s not the issue, I did notice a couple mistakes in your effort to manually install Grub here:

I don’t think /dev/sda5 is the partition you want to mount at /boot/efi, I think /dev/sda1 is, but to be sure you should check the filesystem type with lsblk -f. The EFI partition should be FAT32.

You are missing an “=” between “directory” and “/boot/efi”.

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Garuda --recheck

The results from the link you gave me:

sudo rm /sys/firmware/efi/efivars/dump-*
fish: No matches for wildcard '/sys/firmware/efi/efivars/dump-*'. See `help wildcards-globbing`.
sudo rm /sys/firmware/efi/efivars/dump-*
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

efibootmgr -v
Skipping unreadable variable "Boot0000": Input/output error
error trace:
efivarfs.c:275 efivarfs_get_variable(): read failed: Input/output error
lib.c:140 efi_get_variable(): ops->get_variable failed: Input/output error
No BootOrder is set; firmware will attempt recovery

Here’s the results from the lblsk -f:

sda
├─sda1
│    vfat   FAT32              C24E-2313                              69.2M    28% /tmp/calamares-root-_nmk03o0/boot/efi
├─sda2
│
├─sda3
│    ntfs                      84184FCD184FBD44
├─sda4
│    ntfs                      90600B88600B746E
└─sda5
btrfs                     9adee810-9cf7-430d-a348-6897b779f935   94.2G     4% /mnt/@/boot/efi
/mnt/@/boot/efi
/mnt/@
/mnt
/tmp/calamares-root-_nmk03o0/var/tmp
/tmp/calamares-root-_nmk03o0/var/log
/tmp/calamares-root-_nmk03o0/var/cache
/tmp/calamares-root-_nmk03o0/srv
/tmp/calamares-root-_nmk03o0/root
/tmp/calamares-root-_nmk03o0/home
/tmp/calamares-root-_nmk03o
0
sdb  iso966 Jolie GARUDA_DR460NIZED_RAPTOR
2023-05-01-21-27-23-00
├─sdb1
│    iso966 Jolie GARUDA_DR460NIZED_RAPTOR
│                              2023-05-01-21-27-23-00                     0   100% /run/miso/bootmnt
└─sdb2
vfat   FAT12 MISO_EFI     CC34-06DF
sr0
zram0
[SWAP]

Forgot to mention! I’ve got W10 installed on the side. I already partitioned the drive beforehand for Garuda, and I believe sda1 is the w10 installed. Also fixed the missing = sign, still the same results

Disable CSM in the BIOS settings if you have it. Make sure you are running in UEFI only mode.

This is not right, the EFI partition cannot be Btrfs. You need to mount /dev/sda1 at /boot/efi because that is the EFI partition.

What method are you choosing in the installer? “Install alongside” or something else?

They can share the EFI partition.

You could not have gotten the same result if you fixed the “=” because this was your error message last time:

I would not have expected it to work since you were pointing at the wrong partition, but you definitely should have had a different error message.

2 Likes

I don’t want to hijack this thread, and I understand the object is to get Garuda installed in this case.

What I cannot understand is this ruthless perception that MODERN Linux is just hunky-dory for antiquated or minimal resource computers. And the older the better?

Here’s the test: If I want any operating system to operate like the newest hardware running the latest software, I am living a fallacy.

I know, I know. I hope OP doesn’t waste this free Linux information.

What’s your best hardware? What OS do you run on it?

1 Like

Like I said, my laptop is pure on GARBAGE. But I’m only testing on it, and I’m happy I did because the first time around I had to format my laptop. Windows was completely gone.

Ive got a gtx 1650, i5-10400f, 16gb ram and 2 storage (240SSD and 1TB HDD) on my actual pc,
and I run w11 on it . And tons and tons of personal files I dont really wanna risk with my stupid ass that can mess up things easily

Used replace a partition since I had made a partition before installing linux alltogether.

Also, my bad. I can’t really find the reason why I thought it was the same result.

sh-5.1# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Garuda --recheck
grub-install: error: cannot find a device for /boot/efi (is /dev mounted?).

So I tried chrooting on sda1:

sudo mkdir /mnt
mkdir: cannot create directory '/mnt': File exists

sudo mount /dev/sda1/mnt

sudo garuda-chroot /mnt/@
ERROR: Can't create chroot on non-directory /mnt/@

You don’t want to chroot on sda1, you want to install Grub on sda1.

This failed because @ is not on the EFI partition.

Try following along with this guidance:

1 Like
4 Likes