Bootloader Installation Error code 1

Getting the following error while installing EndeavourOS:

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

Install LOG: https://0x0.st/Xcfr.txt

1 Like

Provided you’re happy for the drive you’re installing to, to to be completely wiped in the process, it’s best to start with a clean slate. So the drive should essentially be empty (and not already contain a boot loader).

An easy way to do this is launch Partition Manager (in the Endeavour installation media), find the drive you’re wanting to install to, and give it a New Partition Table (select GPT). Then apply.

Don’t do this if there’s currently data on that drive you value!

Now, try installing Endeavour OS.

still getting the same error:

  1. I have chosen a fresh drive
  2. Selected grub as the preferred bootloader
  3. In partition manager created new partition table with GPT.
  4. Created swap partition
  5. Created boot partition
  6. Still got the same error


From the live session post the output of:

efibootmgr

Also, do you flag your ESP partition as boot (esp) in the installer?

Edit:

Another thing to try could be to create a new GPT partition table on the disk before you launch the installer. I assume you have Gparted or another partition manager on the live iso.
Go with automatic partitioning this time.

yes I flagged the ESP partition as boot

How about:

Here is the output:

Timeout: 1 seconds
BootOrder: 0012,0013,0014,0000
Boot0000* Windows Boot Manager  HD(1,GPT,f4d2b9e7-de11-4f31-aae8-9e6e8236e9b9,0x800,0x82000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0012* UEFI: SanDisk, Partition 1    PciRoot(0x0)/Pci(0x14,0x0)/USB(13,0)/HD(1,GPT,eb470074-6de4-4485-bb00-b49037ae90b8,0x800,0x729b780)0000424f
Boot0013* UEFI: PXE IPv4 Realtek PCIe GBE Family Controller     PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(fc34974b7abc,0)/IPv4(0.0.0.0,0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)0000424f
Boot0014* UEFI: PXE IPv6 Realtek PCIe GBE Family Controller     PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(fc34974b7abc,0)/IPv6([::],0,Static,[::],[::],64)0000424f
[liveuser@eos-2024.04.20 ~]$ 

1 Like

Again same error. I followed every mentioned steps

You could try a new install but this time with no bootlader.

When the installation is finished, reboot again into live usb.

Let’s see if we can install the bootloader afterwards by chrooting into the system.

ok i have rebooted using usb now how i can install the bootloader

1 Like

We would need some info to begin with:

sudo parted -l

Please indicate what disk have you installed the system on.

Disk /dev/sda: 61.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                 Flags
 1      1049kB  61.5GB  61.5GB  fat32        Main Data Partition  msftdata


Model: WDC PC SN520 SDAPNUW-256G-1002 (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name         Flags
 1      17.4kB  1074MB  1074MB  fat32        EFI          boot, esp
 2      1074MB  256GB   255GB   ext4         endeavouros


Model: SAMSUNG MZVLQ512HBLU-00B00 (nvme)
Disk /dev/nvme1n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  274MB  273MB   fat32        EFI system partition          boot, esp
 2      274MB   290MB  16.8MB               Microsoft reserved partition  msftres
 3      290MB   303GB  303GB   ntfs         Basic data partition          msftdata
 4      303GB   512GB  209GB   ext4         endeavouros

1 Like

Disk I am installing endevourous is: ```
nvme0n1

1 Like

Run

sudo mount /dev/nvme0n1p2 /mnt

and post:

ls -al /mnt/boot

total 245296
drwxr-xr-x  2 root root      4096 Jun 14 12:58 .
drwxr-xr-x 18 root root      4096 Jun 14 12:57 ..
-rw-------  1 root root 140555668 Jun 14 12:58 initramfs-linux-fallback.img
-rw-------  1 root root  97683995 Jun 14 12:58 initramfs-linux.img
-rw-r--r--  1 root root  12927488 Apr 17 20:50 vmlinuz-linux
1 Like

what next

Run:

sudo mkdir /mnt/boot/efi

sudo mount /dev/nvme0n1p1 /mnt/boot/efi

sudo arch-chroot /mnt

Inside chroot:

pacman -Syu to update the system.

pacman -S grub dracut eos-dracut

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

dracut-rebuild

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

If you get any error message at any stage, stop and post the whole of the output here.

If not, type exit followed by enter to quit chroot.

Reboot.

Running the following command getting following error:
command : grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EnOS
Output : 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

1 Like

It’s the same issue as with the installer.

For some reason, grub-install fails to write into your ESP. I don’t know why :thinking:

You could try the following but I am not sure if it will work:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EnOS --force --removable

command worked. Thanks

1 Like