Bootloader installation error

LOG: https://termbin.com/3j7g1
When I first tried to install EndeavourOS it installed correctly without any issues. I uninstalled it due to some reason. Also I deleted my linux OS’s from boot menu using these command (I don’t know if it will be helpful)

diskpart
list disk # select the primary disk
select disk 0 # disk 0 is
list partition # a list of partition is opened
select partition 1 #select the system partition
assign letter=x #disk is now mounted in your explorer verify with (windows+E)
exit #exit from diskpart
x: # this would select this newly mounted disk x:
dir # displays content
cd efi
dir #displays content
rd ubuntu /S #if Linux os is Ubuntu
y #to confirm delete

When I tried to install it today it gave me bootloader installation error.

2022-04-25 - 17:02:38 [2]: WARNING: [PYTHON JOB]: "Command 'grub-install --target=i386-pc --recheck --force /dev/sda' returned non-zero exit status 1." 
2022-04-25 - 17:02:38 [6]: [PYTHON JOB]: "stdout:Installing for i386-pc platform.\ngrub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.\ngrub-install: error: embedding is not possible, but this is required for cross-disk install."
ERROR: Installation failed: "Bootloader installation error" 
2022-04-25 - 17:02:38 [6]:     .. - message: "Bootloader installation error" 
2022-04-25 - 17:02:38 [6]:     .. - details: The bootloader could not be installed. The installation command <pre>grub-install --target=i386-pc --recheck --force /dev/sda</pre> returned error code 1.

Looks like you are doing a MBR/Legacy install on a disk with GUID Partition Table. I guess that is the reason for the failure.

Please post some info on your disk setup:

sudo parted -l

Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot, esp
2 106MB 123MB 16.8MB Microsoft reserved partition msftres
3 123MB 119GB 119GB ntfs Basic data partition msftdata
4 119GB 120GB 628MB ntfs hidden, diag

Model: ATA WDC WD5000AAKX-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17.4kB 16.8MB 16.8MB Microsoft reserved partition msftres
2 16.8MB 362GB 362GB ntfs Basic data partition msftdata
4 362GB 430GB 68.7GB ext4 root boot, esp
3 430GB 500GB 69.8GB ext4 root boot, esp

Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdc: 7807MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 7774MB 7773MB primary boot
2 7774MB 7807MB 33.6MB primary fat16 esp

so how do I do a gpt install?

Please indicate on what partition you want to install EnOS.

Disk /dev/sdb: 500GB

On 4 362GB 430GB 68.7GB ext4 root boot, esp
or
3 430GB 500GB 69.8GB ext4 root boot, esp

  1. Go into BIOS settings and disable CSM/Legacy boot.
  2. Boot up your EnOS installer (in UEFI mode)
  3. In the live session, launch Gparted and remove boot, esp flags from /dev/sdb3 and /dev/sdb4
  4. Launch the installer and choose manual installation.
  5. Choose /dev/sda1 as the location for the installation of the bootloader:
    mount point >> /boot/efi
    flags >> esp,boot
    :warning: Don’t Format!
  6. Choose /dev/sdb3 (or /dev/sdb4) for the installation of the system:
    mountpoint >> /
4 Likes

Thanks it worked ! I just had to create another fat32 partition with boot,bios-grub becuase /dev/sda1 was only 100mb. bios-grub because there was no esp flag in the installer and I forgot could have added esp through gparted.

1 Like

I forgot that there is no esp flag in the installer anymore. Only boot flag. Sorry about that!
Glad that you got it working and welcome to EnOS’ forum @arnish!

This is not what you think it is. It is meant for BIOS/Legacy installations on GPT, not for UEFI. It does nothing in your case.

It is because the boot flag is the esp flag as well. :joy:
In G(UID)PT schemes, the actual code (behind the pretty flag names) for esp is the same code with boot flag, meaning that if you set it to boot (for UEFI installations is obvious :wink: ) it is for the $ESP.

For info about bios_grub flag, read more at Archwiki :stuck_out_tongue:

2 Likes