Installation failed: bootloader installation error

I switched to eos recently. The thing is I thought it would be ok to switch in my laptop too, but it doesn’t work as expected. I made sure I booted on uefi and turning off secure boot (I have a toshibba satellite L45-B4202WL specifically) and tried to install a bunch of distros but none of those worked and every single one would show up that grub can’t install. The weird thing is that I tried an ubuntu based distro and it worked, so I can’t catch the problem and I’ve trying solutions, but none of them work.
Here is a link Endeavouros showed when it failed last time:
Not really sure if there’s more info needed, I’ve never posted before.

edit: I don’t get why my post was flagged as spam. I named the distros I tried to install to give an overview of what I tried before and worked and what didn’t. You can get information from there I guess.

Hi @Snowmcr and welcome to EnOS’ community!

Are you installing alongside another operating system or using the whole disk?
Manual or automatic install?

Boot up your Live USB and post the output of the following commands:

test -d /sys/firmware/efi && echo UEFI || echo BIOS

efibootmgr -v

sudo parted -l
1 Like

I selected the option to erase the disk on calamares, with ext4 and swap with hibernate in the installation, automatic.

The commands showed this:

test -d /sys/firmware/efi && echo UEFI || echo BIOS

efibootmgr -v

BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0008,0005,0000,2003,2001,2002
Boot0001* UEFI: IP6 Realtek PCIe FE Family Controller	PciRoot(0x0)/Pci(0x1c,0x2)/Pci(0x0,0x0)/MAC(600292592b36,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0002* UEFI: IP4 Realtek PCIe FE Family Controller	PciRoot(0x0)/Pci(0x1c,0x2)/Pci(0x0,0x0)/MAC(600292592b36,0)/IPv4(,0,0)..BO
Boot0003* UEFI: Generic Flash Disk 8.07	PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/USB(3,0)/HD(1,MBR,0x49c1b403,0x35e500,0x32000)..BO
Boot2001* EFI USB Device	RC
Boot2003* EFI Network	RC
sudo parted -l

Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      2097kB  317MB  315MB   fat32                 boot, esp
 2      317MB   491GB  491GB   ext4            root
 3      491GB   500GB  8784MB  linux-swap(v1)        swap

Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size   Type     File system  Flags
 2      1808MB  1913MB  105MB  primary  fat16        esp

Thanks for your reply and the outputs!

So then if you are installing EnOS on whole of the disk, you could try creating a new partition table prior to launching the installer.

In the live session:

  • Launch Gparted > Device > new partition table: GPT > apply
  • Launch the Welcome app and update the mirrors
  • Launch the installer and choose automatic install

Hopefully these steps will get the system installed properly. If not please post the URL for the new install log for the forum members to review.

I did those things, but it showed an error again about the bootloader.
It says
Bootloader installation error

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

The link the installer gave me this time is:

1 Like

Could you show the contents of the fat32 partition? Is that partition large enough?

1 Like

Stil weird it cannot find a efi partition…

First it says:

2022-06-05 - 03:44:18 [2]: void PartitionCoreModule::scanForEfiSystemPartitions()
    WARNING: system is EFI but no EFI system partitions found.

but right after:

2022-06-05 - 03:44:18 [6]: void PartitionCoreModule::scanForEfiSystemPartitions()
    system is EFI and new EFI system partition has been found.

:thinking: :question:

At the end:

2022-06-05 - 04:01:06 [6]: [PYTHON JOB]: "stdout:Installing for x86_64-efi platform.\nCould not prepare Boot variable: Input/output error\ngrub-install: error: efibootmgr failed to register the boot entry: Input/output error."

1 Like

It seems you have a special UEFI implementation.
Try the alternative (removable) method.

I’m sorry, how do I do that? do I have to look at the partition after the automatic install fails?

Just to make sure, if I try to install grub as you say after the installation fails, there’s nothing left for calamares to install? You mean I have to wait for it to fail and then install grub manually?

When you do an automatic install, the installer creates a ca. 300 MB FAT32 ESP (Efi System Partition) mounted at /boot/efi.

With bootloader installation failing, that directory shouldn’t actually contain anything.

Many ways to do it, but I’m mostly interested in knowing if there are leftovers from other systems that take so much space that EndeavourOS cannot write efi files into /boot/efi.

To check it, you could run commands like

sudo mount /dev/sda1 /mnt  # assuming /dev/sda1 is the fat32 partition
du -hd 1 /mnt
df -hT

OP has already done installs with “erase disk” and also created a new partition table. So any possible existing ESP should have been nuked a couple of times :slightly_smiling_face:

1 Like

error: efibootmgr failed to register the boot entry:

is’nt this inside the firmware? i mean the nvram ? could be this issue where you need “–no-nvram” on grub install process ???

1 Like

To go all in:

--force --no-nvram --removable

perhaps :wink:

PS. seems that sometimes only --removable could work as mentioned above by @petsam

…force is used already … but yea possible to add this to the configs before starting installer also… because i think in the install process grub is not at the last stage so you will not have a full setup system if it fails in bootloader stage.

1 Like

Right, that could be problematic somehow.

But if it is

then, it would be best to do so.

OK, thanks!
Looks like I was too lazy to read some posts above… :wink: Sorry about that.

1 Like

Actually I really was reading without my glasses, let’s stick to this excuse. :wink: