You are not logged in.

#1 2015-12-29 20:25:38

Piexes
Member
Registered: 2015-12-29
Posts: 8

[Solved] Trouble installing GRUB, can't find EFI directory

Hi guys, first post on here.
I'm trying to install arch using a USB to boot, on a UEFI system using a MBR partition table. I've attempted it several times, but always end up starting by deleting my linux partitions and rebooting. My partitions look like this:

sda1 - partition i'm too afraid to touch that was already there
sda2 - main windows partition
sda3 - partition i'm too afraid to touch that was already there (x2)
sda4 - extended
---sda5 root 90G
---sda6 boot 512M
---sda7 home 104G

I think something goes wrong when I create my partitions. I don't use parted, because quite frankly it confuses me and I'm too afraid that I'll delete my windows data. Instead, I use cfdisk and I think I miss a few steps. sda6 is set as Bootable, and its type is EFI (Fat-12/16/32). Is that all? The filesystem is set as fat32 using mkfs.fat -F32 /dev/sdxY

When I run the # grub-install --recheck /dev/sda command it just says that it can't find the EFI directory. Isn't this /boot? I then did
grub-install --recheck --efi-directory=/boot /dev/sda
which results in
Installing for x86_64-efi platform.
grub-install: error: efibootmgr: not found.
and then nothing happens.

How do I install GRUB successfully in this situation? Sorry for any noobishness, and thanks in advance!

Last edited by Piexes (2015-12-29 21:49:01)

Offline

#2 2015-12-29 20:34:57

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Presuming that Windows is installed in UEFI mode, you will need to share the Windows-generated EFI system partition (sda3?) and mount that to /boot

Use `gdisk -l /dev/sda` to find the EFI system partition.

Post the output of that command if you're not 100% sure.

EDIT: Just out of curiosity, why are you using GRUB?

Most newbies seem to prefer it in spite of the fact that the Beginner's Guide has instructions for systemd-boot in UEFI systems.

You are following the Beginner's Guide, right?

EDIT2: Just to clarify: I think you have created a GNU/Linux partition type (8300) at /dev/sda6 and formatted in to FAT32 when you actually need a specific EFI system partition type (EF00) for GRUB to install successfully.

Last edited by Head_on_a_Stick (2015-12-29 20:39:07)

Offline

#3 2015-12-29 20:46:56

Piexes
Member
Registered: 2015-12-29
Posts: 8

Re: [Solved] Trouble installing GRUB, can't find EFI directory

I was following this section, but I guess I'll try to go and do the systemd one. I'll edit/post with an update.
The output of that command:
http://imgur.com/MXipX1K

Edit: I tried running bootctl install, and it spat out:
File system "/boot" is not on a GPT partition table
hmm
lsblk still shows me that sda6 is still mounted at mountpoint /mnt/boot
it's fat32 for sure
The wiki says that the boot partition needs gdisk type EF00. I doubt I did this.

Last edited by Piexes (2015-12-29 20:52:22)

Offline

#4 2015-12-29 20:50:40

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Piexes wrote:

The output of that command:
http://imgur.com/MXipX1K

Right, sorry, my mistake -- you are *not* using a UEFI system (or a GPT disk) so you should be following the non-UEFI instructions:
https://wiki.archlinux.org/index.php/Be … BIOS.2FMBR

Also, in this case, /boot should probably use a POSIX-compliant filesystem rather than FAT.

Last edited by Head_on_a_Stick (2015-12-29 20:54:12)

Offline

#5 2015-12-29 20:54:12

Piexes
Member
Registered: 2015-12-29
Posts: 8

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Ok, now I'm pretty confused. The wiki tells me to run ls /sys/firmware/efi/efivars and if it's populated I'm in UEFI mode. It's definitely populated, it spits out a ton of stuff.
Should I reinstall the .iso again on my flashdrive and delete the linux partitions for a completely fresh start?

Last edited by Piexes (2015-12-29 20:55:53)

Offline

#6 2015-12-29 20:57:18

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Piexes wrote:

It's definitely populated, it spits out a ton of stuff.

Yes you may be booted in UEFI mode but your Windows system appears to be installed in non-UEFI mode -- there is no EFI system partition present.

If you wish to be able to switch between the two without toggling "Legacy" mode, you must install Arch in non-UEFI mode also.

It may be that a UEFI-installed GRUB can actually boot a non-UEFI Windows system if you create the requisite EFISYS partition but I don't know and have of way of testing.

EDIT: You can attempt to force GRUB to install a non-UEFI loader with:

# grub-install --target=i386-pc --recheck /dev/sda

EDIT2: Can you check from Windows if it is booted in UEFI mode?

Last edited by Head_on_a_Stick (2015-12-29 21:33:31)

Offline

#7 2015-12-29 21:38:34

Piexes
Member
Registered: 2015-12-29
Posts: 8

Re: [Solved] Trouble installing GRUB, can't find EFI directory

I wiped the slate clean with arch, and did another run through following non-UEFI instructions, which left me without a /boot partition.
I tried doing the grub-install command, and I got met with the same error in the OP. I tried to force it using the command in your edit and I got:
Installing for i386-pc platform.
grub-install: warning: File system 'ext2' doesn't support embedding
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are unreliable and their use is discouraged.
grub-install: error: will not proceed with blocklists
How do I move on from this?

Edit: I can't boot into windows, I think from fucking with the bootloader too much. I was considering installing Mint just in order to restore a bootloader. But, on second thought, I might not be able to boot because I fucked with the boot order in the BiOS. I'd check, but I don't want to shut off right now because I'm at the place I want to be.

Last edited by Piexes (2015-12-29 21:45:54)

Offline

#8 2015-12-29 21:45:20

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Piexes wrote:
grub-install: warning: File system 'ext2' doesn't support embedding

Did you try to specify a partition number in the `grub-install` command?

A partition number should *not* be specified.

You need to post the *exact* command used (and any terminal output) rather than a vague description of the commands used.

Offline

#9 2015-12-29 21:47:21

Piexes
Member
Registered: 2015-12-29
Posts: 8

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Whoops! Yeah it's all fixed now. I fixed it using the command:
grub-install --target=i386-pc --recheck /dev/sda
I was specifying partitions before.

Thanks so much, I'd still be stuck without you! tongue

Offline

#10 2015-12-29 21:48:19

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [Solved] Trouble installing GRUB, can't find EFI directory

Excellent, glad you got it fixed.

Please add "[SOLVED]" to the thread title for the benefit of others.

Offline

Board footer

Powered by FluxBB