• Is grub in wrong directory on EFI partition (new install)?


    Hi,

    This is my first post here and it seems after 4 days of troubleshooting I can’t seem to get grub to work with my Lenovo P500 after a fresh installs of Antergos. Note that I did have Ubuntu 16.04 and Windows 10 together on the laptop before I deleted the ubuntu partitions and then install Antergos to replace it.

    The first issue I fixed on my second attempt was to clean up the old grub using this link to delete it:

    http://linuxbsdos.com/2015/09/05/how-to-delete-grub-files-from-a-boot-efi-partition-in-windows-10/

    After this now the bios does not show the old Ubuntu and boots directly into Windows 10. The bios is set to legacy and boot legacy first. After another install of Antegos I still do not see grub/antergos in my bios like I did when I had Ubuntu. What I do see is Grub appears to not be in the EFI directory on the EFI partition. Instead the grub directory is in the root of the EFI partition.

    Any ideas what is going wrong here?

    Snippet from command line in diskpart Windows 10:

    Microsoft Windows [Version 10.0.16299.98]
    © 2017 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>diskpart

    Microsoft DiskPart version 10.0.16299.15

    Copyright © Microsoft Corporation.
    On computer: HANNA

    DISKPART> list disk

    Disk ### Status Size Free Dyn Gpt


    Disk 0 Online 698 GB 0 B *

    DISKPART> sel disk 0

    Disk 0 is now the selected disk.

    DISKPART> lis vol

    Volume ### Ltr Label Fs Type Size Status Info


    Volume 0 D DVD-ROM 0 B No Media
    Volume 1 C Windows NTFS Partition 104 GB Healthy Boot
    Volume 2 E Data NTFS Partition 514 GB Healthy
    Volume 3 Recovery NTFS Partition 450 MB Healthy Hidden
    Volume 4 Z FAT32 Partition 100 MB Healthy System

    DISKPART> sel vol 4

    Volume 4 is the selected volume.

    DISKPART> exit

    Leaving DiskPart…

    C:\WINDOWS\system32>z:

    Z:>dir
    Volume in drive Z has no label.
    Volume Serial Number is 340C-95C2

    Directory of Z:\

    10/25/2017 07:53 PM <DIR> EFI
    12/03/2017 04:57 AM <DIR> grub
    0 File(s) 0 bytes
    2 Dir(s) 62,071,808 bytes free

    Z:>cd EFI

    Z:\EFI>dir
    Volume in drive Z has no label.
    Volume Serial Number is 340C-95C2

    Directory of Z:\EFI

    02/04/2017 11:40 PM <DIR> .
    02/04/2017 11:40 PM <DIR> …
    02/04/2017 11:40 PM <DIR> Microsoft
    02/05/2017 12:07 AM <DIR> Boot
    0 File(s) 0 bytes
    4 Dir(s) 62,071,808 bytes free

    Z:\EFI>cd …

    Z:>cd grub

    Z:\grub>dir
    Volume in drive Z has no label.
    Volume Serial Number is 340C-95C2

    Directory of Z:\grub

    12/03/2017 04:57 AM <DIR> .
    12/03/2017 04:57 AM <DIR> …
    12/03/2017 05:04 AM <DIR> i386-pc
    12/03/2017 05:04 AM <DIR> locale
    12/03/2017 04:57 AM <DIR> themes
    12/03/2017 04:57 AM <DIR> fonts
    12/03/2017 04:57 AM 1,024 grubenv
    1 File(s) 1,024 bytes
    6 Dir(s) 62,071,808 bytes free

  • @kagetora13
    Welcome to Antergos!

    It seems that you have created a new EFI partition, but that is not necessary. You can use the original partition where Windows is and Ubuntu was.
    While installing Antergos, you just need to mount the original EFI partition to /boot/efi in Antergos. Do not format that partition, just mount it.
    See more in:
    https://antergos.com/wiki/install/how-to-dual-boot-antergos-windows-uefi-expanded-by-linuxhat/

  • Hi Manuel,

    Thank you for your feedback. When I did do the install I did follow the instructions at the provided link. The only difference is I was booting from a DVD image.

    This morning I went back to the z: drive were the EFI settings areand delete the ‘grub’ directory again. Hoping this will reset my setup to load Antegos correctly. Before I start again I have a couple questions:

    (1) When I go to manually partition my drive I do not have an option for the bootloader seen in the below image. Instead I only see the device drop down only.

    alt text

    Additionally after I deleted Ubuntu Grub from the EFI Drive (/dev/sda2) I have always created the mounting point “/boot/efi” to /dev/sda2 when running the last 3 installs.

    Current Hard Drive Configuration before I install again:

    [[email protected] /]# fdisk -l
    Disk /dev/loop0: 1.8 GiB, 1886822400 bytes, 3685200 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: B85947F8-3236-4DCD-9857-6DAD29E50982

    Device Start End Sectors Size Type
    /dev/sda1 2048 923647 921600 450M Windows recovery environment
    /dev/sda2 923648 1128447 204800 100M EFI System
    /dev/sda3 1128448 1161215 32768 16M Microsoft reserved
    /dev/sda4 1161216 220803071 219641856 104.8G Microsoft basic data
    /dev/sda5 386498456 1465149127 1078650672 514.3G Microsoft basic data
    /dev/sda6 370873456 386498455 15625000 7.5G Linux filesystem
    /dev/sda7 220803072 370873455 150070384 71.6G EFI System

    Partition table entries are not in disk order.
    [[email protected] /]#

  • @kagetora13
    Now you have two partitions labeled “EFI System”, why?

    I guess sda4 contains Windows 10 and sda5 is a data partition in ntfs?

    What did you plan to do with sda6 and sda7? If sda6 is for Antergos, it may be too small depending on what you are going to install there. And why is sda7 labeled as “EFI System”?

    How many disks do you have there? One in 256GB and the other is about 700GB?

  • Hi Manuel

    I have only 1 750 gb harddrive.

    sda6 is for the main Antergos install (77 GB)
    sda7 is for the swap (8gb)
    sda5 is my data drive for all my work files which i share between windows 10 and linux
    sda2 is the EFI partition I assume the Windows 10 install created.

    The sda7 partition I always delete and then re-create from the Antergos manual partition utility.

    Pretty much the goal here is to have Windows 10 and Antergos as the dual booted systems as Ubuntu has been deleted.

  • This is a photo of the install screen before i mount the EFI directory.
    0_1512318911224_12_3_2017 11_23 AM Office Lens.jpg

  • @kagetora13

    I guess @manuel is talking about this. And not even talking about 71GB for EFI…

    /dev/sda2 923648 1128447 204800 100M EFI System
    /dev/sda7 220803072 370873455 150070384 71.6G EFI System

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto . When you look at the screenshot of the partition creation utility in the previous post:

    (1) Why is there no option for the boot loader at the bottom of the screen?

    (2) Does this indicate somewhere that it is an EFI partition? Because I created the ext4 and swap partition from that utility.

    (3) If I only have Windows 10 and this new install of Antergos, what will happen if I do not not specify the /boot/efi mount during the install? So far I specify it every install and grub does not show on boot.

  • I dropped all the partitions again. This time I mounted the efi partition first and then created the ext4 and swap. Feels like a bug?

    This is what fdisk says from the live cd now:

    [[email protected] ~]$ fdisk -l
    Disk /dev/loop0: 1.8 GiB, 1886822400 bytes, 3685200 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: B85947F8-3236-4DCD-9857-6DAD29E50982

    Device Start End Sectors Size Type
    /dev/sda1 2048 923647 921600 450M Windows recovery environment
    /dev/sda2 923648 1128447 204800 100M EFI System
    /dev/sda3 1128448 1161215 32768 16M Microsoft reserved
    /dev/sda4 1161216 220803071 219641856 104.8G Microsoft basic data
    /dev/sda5 386498456 1465149127 1078650672 514.3G Microsoft basic data
    /dev/sda6 220803072 370217133 149414062 71.3G Linux filesystem
    /dev/sda7 370217134 386498455 16281322 7.8G Linux filesystem

    Partition 7 does not start on physical sector boundary.
    Partition table entries are not in disk order.
    [[email protected] ~]$

  • @kagetora13
    You probably have a UEFI system, not BIOS.
    In a UEFI system you need to boot the installer also as UEFI, not BIOS as you probably did in one of your pictures.
    Then you can mount /dev/sda2 as /boot/efi during install.

  • Hi Manuel,

    I will need guidance on my next steps. In the bios the system is set to legacy and not uefi so i can boot off my dvd rom. Secure boot is off. What else should i do to make the configuration right before i install?

  • Not fully see what is the problem here… but 2 things:

    • Bios is set to “legacy-boot” will install grub to the MBR of the disk (master boot record = little space in the beginning of the HD) this procedure will NOT need a EFI partition.

    • Bios is set to EFI, grub will be installed to the EFI partition and needs to be mounted to filesystem (/boot/efi)

    It is a known problem on some spare systems that Antergos installer detect system as EFI also when it is set to legacy.

    [updates once a week] = [90% less problems]
    http://gofccyourself.com
    my-blog#k
    how to add system logs
    i3 GNOME

  • @joekamprad Thanks for the feedback. One question I am trying to figure out is why the bootloader is missing in the partition creation tool. See the below examples.

    My system in the partition editor:

    0_1512328374174_missing bootloader on install.jpg

    Example of system showing the grub 2 install:

    0_1512328410958_bootloader listed.png

    What do I need to do to get the boot loader option like in the screen shot examples?

  • for legacy there is only grub so no option aviable… on EFI you can choose between grub or systemdboot

    [updates once a week] = [90% less problems]
    http://gofccyourself.com
    my-blog#k
    how to add system logs
    i3 GNOME

  • @kagetora13
    So you have mixed BIOS and UEFI problem because of the DVD.

    Easiest would be to “burn” the ISO file to a USB stick and install using it in UEFI mode. Do you have a USB stick? You could burn it in Windows using e.g. Etcher or Rufus (in DD mode).

  • @manuel said in Is grub in wrong directory on EFI partition (new install)?:

    So you have mixed BIOS and UEFI problem because of the DVD.

    I can confirm, we see this on the two pictures, one detects as efi the other as Bios/legacy…

    [updates once a week] = [90% less problems]
    http://gofccyourself.com
    my-blog#k
    how to add system logs
    i3 GNOME

  • @manuel . Thanks for the feedback. I’m using Rufus to burn it to a USB key now. I’ve switched the bios back from legacy to UEFI and will give this a try.

    Kind of puzzled at the moment that I did not have to do this all when I installed Ubuntu 16.04 which wrote correctly to the /dev/sda2 as /boot/efi. I will be glad if this works … won’t be using DVD’s after this experience.

  • @kagetora13
    I’d guess (but don’t really know) that while the USB is the way people nowadays install distros, development is not so much anymore concentrated on testing the DVD installer…

  • Looks like the install completed and now I have the fancy Antergos Grub. I will go back through the support document so I can add an entry to boot to Windows 10 (when i do work stuff).

    One other funny thing happened after I booted into Antegos, The laptop keyboard and mouse were un-responsive and good not even turn on the numlock. I was able to plugin a USB mouse and that worked.

    Any ideas what might have happened here as the built in keyboard and track point was working in the installer menu.

  • @kagetora13 said in Is grub in wrong directory on EFI partition (new install)?:

    I will go back through the support document so I can add an entry to boot to Windows 10 (when i do work stuff).

    If Windows is not in the Antergos boot menu, you can fix that with command

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    
efi9 partition23 directory3 grub80 Posts 21Views 274
Log in to reply