Installation failed, "/boot/efi doesn't look like an EFI partition"

Hi everyone,
during the installation of EndeavourOS my laptop: Samsung NP355V5C, I got this error around the end of the installation:

"Boost.Python-Fehler in Job “bootloader”.

Command ‘grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS --force’ returned non-zero exit status 1.

Installing for x86_64-efi platform. grub-install: error: /boot/efi doesn’t look like an EFI partition.

Traceback:

File "/usr/lib/calamares/modules/bootloader/main.py", line 476, in run
    prepare_bootloader(fw_type)

  File "/usr/lib/calamares/modules/bootloader/main.py", line 448, in prepare_bootloader
    install_grub(efi_directory, fw_type)

  File "/usr/lib/calamares/modules/bootloader/main.py", line 310, in install_grub
    check_target_env_call([libcalamares.job.configuration["grubInstall"],

  File "<string>", line 5, in <module>

"

I know a very similar request has been sent and answered recently, but though the instruction seems to be easy, I get stuck when trying to actually do it.

When in the EOS live system, I have tried with GParted to cut off 512 MB (is that sufficient?) off the ext4 partition sda1 on which I want to install EOS, and format it to fat32. I can only select it as a primary or an extended partition in GParted (wouldn’t it have to be a logical partition? - as the number of primary partitions I can have is limited). And what mount point would I have to give to that new small partition then (as far as I understand, /boot/efi is for UEFI, not for BIOS)?

My laptop does have a BIOS, not UEFI. A BIOS with some special but useless Samsung features though. I had to switch off safe boot first before I was able to boot from my EOS pendrive. Next to my ext4 partititon sda1 :enos:, there are two ntfs partitions: sda2 for data and sda3 with Win🪟7 installed. I don’t see a separate Windows bootloader partition.

Here is my install log: http://ix.io/2Wdc.

My Ubuntu on this machine broke completely at a slightly inconvenient time, and I failed in repairing it. I would not like to miss a job interview via zoom in 16 hours. That’s why I want to install EOS, which is already working fine on my old laptop. That’s why I would be happy if above information is enough that someone could tell me how to put my partitions in a way that I can just install EOS tomorrow morning without breaking something.

(If I don’t overlook something, I think this is all info I need: size, “type” (primary?) and mount point of boot partition, and whether to create this with GParted or in the Calamares installer)

If the bootloader installation is trying to install as UEFI then you booted in UEFI mode.

This suggests an MBR partition table.

You mount the EFI partition under /boot/efi.

It sounds like your setup is a bit of a mess, so you might want to go through the BIOS/UEFI and disable any CSM or Compatiblity etc. boot options, and also look in the Arch wiki for your laptop model.

You should probably find an alternative option rather than pressuring random volunteers on a Web forum to fix your system?

1 Like

@maqni
The efi partition if you are doing this manually in gparted has to be fat32 and set as /boot/efi and flagged as /boot. So when you run the installer and you get to manual partition set up even though you have set it up with gparted i still edit each partition in the manual section to make sure that it is marked as /boot/efi and flagged as /boot in the screen below it. I do the same for the root partition. I just click on the partition and edit and make sure it’s set as /. You don’t have to reformat them if you’ve already done that in gparted. I just select do not format in the edit screen check box and set the other flags. I’ve never ever had an issue doing it this way.

Edit: I was assuming it was UEFI. If it’s not a UEFI Bios then you can’t install it in UEFI mode.

I agree with the others, if your disk has primary and logical partitions that means it has an MBR partition table. You should not do a UEFI install in this case. It would be better to do a legacy/BIOS install instead.

If you want to know for sure, sudo parted -l will show the partition table type.

    ..  mapping for "/dev/sda3" "/dev/sda3" 
     partlabel :   "" 
     partuuid :   "" 
     parttype :   "" 
     partattrs :   "0" 
     mountPoint: :   "/boot/efi" 
     fs: :   "ntfs" 
     fsName :   "ntfs" 
     uuid :   "XXX" 
    Running "env" ("mount", "-t", "ntfs", "/dev/sda3", "/tmp/calamares-root-_xemtbre/boot/efi") 

ESP must be fat32 not ntfs —> format as fat32 flag as boot mounted as /boot/efi size: around 300 to 512 MB

2 Likes

Thank you very much for all your replies and infos!

My sincere apologies to anyone in the EOS community whom I have made pressured by my post. My intention was not to say “Here’s my problem, fix it”, but I thought there would be an easy quick fix, such as “1. make a 200 MB boot partition (fat32) 2. click “OK” 3. done”.

So it’s more complicated than that, and it seems something is messed up in my partition table. To make sure that I understand correctly: CSM, MBR and msdos partition means we are dealing with BIOS; ESP and EFI means there is UEFI on the computer?

parted -l says:

Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type     File system     Flags
 1      1049kB  50.0GB 50.0GB  primary  ext4
 2      50.0GB   170GB  120GB  primary  ntfs
 3      170GB    512GB  342GB  primary  ntfs

And about the USB drive: Partiton Table: msdos, File system: fat16, Flags: esp. The bootloader displays it as “UEFI”, see this picture:
UEFI=USB_drive_with_EOS
I can only select and boot the USB drive if I have enabled so-called UEFI Boot Suppport in the BIOS (it is is BIOS and not UEFI, isn’t it?)

:

Yesterday, I had created the bootable USB with dd. Today I created it anew with gnome-multi-writer. All the points mentioned here are the same.

1 Like

This is an MBR partition table.

You shouldn’t use UEFI with this disk unless you put a GPT partition table on it first. Of course, this will destroy all the data on it.

It is probably better just to do a legacy/bios install.

1 Like

MBR and msdos indicate that you have an MBR-based partition table. In this situation you should legacy boot and not use UEFI.

The alternative is GPT. With a GPT partition table on the disk you can use UEFI/EFI.

ESP stands for EFI System Partition. This is the partition you are trying to create. However, it probably won’t work easily since your disk does not have a GPT partition table.

2 Likes

@maqni
I think you are misunderstanding the point. Windows is installed in MBR (Bios) mode. In order to install in UEFI mode you need GPT (GUID) partitioning which means either converting the disk that Windows is installed on to GPT or installing the Linux in MBR (Bios) mode.

Supposedly the drive can be converted to GPT if it only has 3 or fewer partitions on it first of all and it has to be done from the Windows command prompt. Supposedly it can be done without loss of data but i wouldn’t guarantee that and i wouldn’t trust that. If it doesn’t work you lose everything and have to reinstall also if you are wanting to have a dual boot and keep Windows. So i would not attempt that unless you have everything backed up as you may end up having to reinstall Windows. Things can and do go wrong so no matter what it says or what someone tells you always have Plan B in case Plan A doesn’t work.

Here is the information on converting the disk but if that is something you think you are going to do make backups of everything you want to keep first before attempting this. The only other option is a total reinstall of Windows done properly on a GPT partition or install Linux in Bios mode.

I have not done this conversion before myself so i have no information to say it works but, as i stated i would not be trying it without backing up everything you need that you don’t want to lose. I also want to make clear i am not suggesting you do this. It’s just information for you to see.

1 Like

@dalto and @ricklinux Thanks a lot for the info. I am starting to understand it better now. So I definitely want to keep my MBR partition table and legacy boot with BIOS and not take any unnecessary risk.
I don’t find out how to boot in legacy mode though. When I disable “UEFI Boot Support”, the USB drive can not be selected to boot. There is no “Launch CMS” option. But it boots well on my older laptop with BIOS.

Edit: So what I would try now is to copy the .iso image onto the USB drive again, but somehow with a programme that gives me the option to make it bootable in Bios mode? If so, which programme would do the job?

Have you tried turning off UEFI boot support and see if the usb boots in Bios mode.

Yes, I tried, but could not boot in BIOS mode.

If you need to boot to DOS using a USB device, enter the

BIOS Setup, select the Advanced menu and set the Fast

BIOS Mode item to Disabled

OK, I just checked: Fast BIOS Mode has been disabled already before.

Hmm? :thinking: Can’t say i tried but that’s what the manual say’s.

Edit: You’re not the only one with some weird issues as i have one system that will not boot and install MX LInux in UEFI mode no how yet i have everything else including EndeavourOS installed in UEFI on it.

The error occurred very late in the install. I don’t know exactly, but probably EOS is already completely installed on my /dev/sda1. Maybe there is some trick…
It seems that some other BIOSes have an option for selecting legacy boot priority. Mine doesn’t.

Until a few days ago, I had Ubuntu on this very same partition, and that booted. So it seems my laptop has an issue with EndeavourOS in a way that your computer had a problem with MX Linux.

I have installed EOS in a VM on this laptop last week. It worked very well, but I could not boot it or any other OS within VM. In the VM I simply added a bootable iso file to the virtual drive and booted the virtual OS from that. I thought that I did someting wrong with the VMs, but probably something in the laptop is to blame…

It’s weird that in the picture you have it say’s. Enabled means the system can boot Legacy or UEFI OS.
Disabled means that the system Boots Legacy OS only!

Edit: You did check that secure boot is off?

Yes, I think so. At least I have no secure boot option on. In the tab “Security” in BIOS, it only mentions passwords: “Supervisor Password Clear, User Password Clear, HDD Password Frozen, Password On Boot Enabled”.

I don’t know what “Password on Boot Enabled” means. I do not type any password on boot except the one when starting the OS (Window$ or Linux).
Otherwise no Secure Boot Option.

All the following options are available in my BIOS: System Time and Date, NX bit [Enabled], Fast BIOS Mode [Disabled], AHCI Mode Control [Auto], Battery Life Cycle Extension, USB S3 Wake-Up [Enabled], UMA Frame Buffer Size [Auto], Touch Pad Mouse [Enabled], UEFI Boot Support [Enabled right now, so that USB is bootable], Internal LAN [Enabled], PXE OPROM [Disabled]. I’ve tried around with most options. The USB can only boot as UEFI.

Edit: Some brainstorming ideas: 1. using EasyBCD in Windows to select sda1 a a bootable Linux partition. But I have tried it already and did not make it work. 2. I am just busy searching Arch Linux packages for something (no promising result so far). 3. Create the USB drive again a number of times with different apps and see if something changes.

If you had secure boot on, the ISO would never boot so that is probably not the issue.

How did you create this USB? You said above gnome multiwriter? I use popsicle on linux. I am not familiar with that one you said.