You are not logged in.

#1 2018-07-08 16:09:36

rottencandy
Member
From: Bangalore
Registered: 2018-07-08
Posts: 6

[Solved]Installation: Grub doesn't detect EFI partition (dual boot)

I had Windows 10 and Ubuntu installed in dual boot for quite some time. I decided to finally switch to Win10+Arch. Installed Arch by replacing the Ubuntu partition (I foolishly reformatted the Ubuntu partition without thinking about Grub installed in it, thinking that I would just reinstall it after setting up Arch).

Arch installed without any problems but when I ran

grub-install /dev/sda

got the

error: /boot/efi doesn't look like an EFI partition.

I mounted the EFI partition (/dev/sda1) in /mnt/boot. When I looked into it, I found that there was no directory named EFI within it.
I also tried

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

but get the same error.

Now I am left with a system with no bootloader and no way to access my Windows partition. I am still running Arch using the live USB.
Whenever I reboot, it goes to the grub rescue mode.

Please help. Is there any way I could install the bootloader properly?

Last edited by rottencandy (2018-07-09 06:33:48)


Spare me for I am a noob.

Offline

#2 2018-07-08 16:27:23

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

Welcome to the arch linux forums rottencandy.  Which parition is the ESP and what is its current contents?
Check blkid / parted -l to identify the ESP ensure it is mounted and does it have any contents?
Please also post the output of `blkid` and `parted -l`

Offline

#3 2018-07-08 16:36:34

Morganamilo
Package Maintainer (PM)
Registered: 2017-12-05
Posts: 77

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

Are you chrooted when running that command? /mnt/boot -> /boot

Offline

#4 2018-07-08 17:04:17

rottencandy
Member
From: Bangalore
Registered: 2018-07-08
Posts: 6

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

Morganamilo wrote:

Are you chrooted when running that command? /mnt/boot -> /boot

Yes. I am chrooted. I tried mounting the EFI in both /boot and /boot/efi, but same problem.


Spare me for I am a noob.

Offline

#5 2018-07-08 17:25:53

rottencandy
Member
From: Bangalore
Registered: 2018-07-08
Posts: 6

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

loqs wrote:

Welcome to the arch linux forums rottencandy.  Which parition is the ESP and what is its current contents?

Thank you for the prompt reply. The ESP is in /dev/sda1

loqs wrote:

Check blkid / parted -l to identify the ESP ensure it is mounted and does it have any contents?
Please also post the output of `blkid` and `parted -l`

blkid : blkid

parted -l: parted

ESP is in /dev/sda1
Windows in /dev/sda2
Arch in /dev/sda6

I'm so sorry for posting image links. I'm using a phone to type this as the display server isn't running properly and I currently don't have any other device ATM.


Spare me for I am a noob.

Offline

#6 2018-07-08 17:56:56

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

/dev/sda is MBR and does not contain an ESP could Windows have been installed in bios/MBR mode?

Offline

#7 2018-07-08 18:04:58

rottencandy
Member
From: Bangalore
Registered: 2018-07-08
Posts: 6

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

loqs wrote:

/dev/sda is MBR and does not contain an ESP could Windows have been installed in bios/MBR mode?

MBR? But I clearly remember installing Windows 10 using GPT.  Ubuntu was also running pretty fine all this time.

Also, I checked the mounted EFI partition. This is what it contains:

Boot bootmgr BOOTNXT BOOTSECT.BAK Recovery 'System Volume Information' '$WINRE_BACKUP_PARTITION.MARKER'

Spare me for I am a noob.

Offline

#8 2018-07-08 18:20:51

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

I can not explain it but the output from parted shows: Partition Table: msdos not GPT
also SDA1 appears to be NTFS not FAT and the esp flag is missing from the parted output and as you already noted the contents does not contain an EFI directory.

Offline

#9 2018-07-08 18:27:07

rottencandy
Member
From: Bangalore
Registered: 2018-07-08
Posts: 6

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

loqs wrote:

SDA1 appears to be NTFS not FAT and the esp flag is missing from the parted output and as you already noted the contents does not contain an EFI directory.

Okay. So does that mean I cannot install grub? Is it possible to boot into Windows then?


Spare me for I am a noob.

Offline

#10 2018-07-08 18:30:06

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

No you should be able to follow the instruction for installing grub on BIOS/MBR and if you install os-prober the Windows installation may be detected.
If somehow the install was just converted from GPT/MBR then booting the Windows installation may well fail.
Edit:
You could try booting the installation media in EFI mode and checking the output of `efibootmgr` to see if there are any entries for the ubuntu or Windows boot loaders.

Last edited by loqs (2018-07-08 19:00:26)

Offline

#11 2018-07-09 06:33:18

rottencandy
Member
From: Bangalore
Registered: 2018-07-08
Posts: 6

Re: [Solved]Installation: Grub doesn't detect EFI partition (dual boot)

loqs wrote:

No you should be able to follow the instruction for installing grub on BIOS/MBR and if you install os-prober the Windows installation may be detected.

Thank you for your help. Turns out my HDD was using MBR. So i had to install Grub using

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

Note: The os-prober was not detecting my Windows installation so i had to set up a custom menuentry in /etc/grub.d/40_custom file:

menuentry "Windows 10" --class windows --class os {
   insmod ntfs
   search --no-floppy --set=root --fs-uuid XXXXXXXXXXXXXXXX
   ntldr /bootmgr
}

and it worked properly.

Lesson learnt: Always check the Arch wiki before attempting to dual boot: https://wiki.archlinux.org/index.php/Du … th_Windows

Again. Thank you for your help. Marking thread as solved.


Spare me for I am a noob.

Offline

Board footer

Powered by FluxBB