• Grub UEFI Repair

    Good Morning,
    I was running Antergos flawlessly on my Lenovo X230. I had a problem with it and its motherboard got replaced.
    Now I can’t boot antergos. I don’t have any uefi entry for it on the bootloader.
    All options in the bios are correct.
    I assume it is only a problem of grub installation or uefi entries.
    Here are the files that I have on AntergosBoot partition:
    According to wiki and from my understanding

    I should do:

    sudo mount /dev/sda1 /boot

    and then

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

    what I get is

    grub-install: error: failed to get canonical path of `/boot/grub'.

    Any help?

  • Thanks for the help.
    I’ve done:

    sudo mkdir /mnt/arch
    sudo mkdir /mnt/arch/boot
    sudo mkdir /mnt/boot
    sudo mount /dev/sda1 /mnt/boot/
    sudo mount /dev/sda2 /mnt/arch/boot/
    sudo mount /dev/sda3 /mnt/arch
    arch-chroot /mnt/arch /bin/bash
    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub

    What I get is:

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

    Where is my error?

  • I need to know what do you have in sda1, sda2 and sda3… but if (and only if) sda1 is /boot, sda2 is / and sda3 is swap, you should do:

    sudo mount /dev/sda2 /mnt/
    sudo mount /dev/sda1 /mnt/boot
    sudo arch-chroot /mnt
    grub-mkconfig -o /boot/grub/grub.cfg
    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub

    But to be honest, a sudo fdisk -l /dev/sda would help to see how your harddisk is organised.

  • @karasu I had the disk organization in dropbox folder which I posted before.
    I ended up formating the HDD because I needed the pc to work.
    But I would like to know what was my mistake.

  • OK, Sorry I didn’t see it.

    So, you had this layout:
    sda1 EFI partition
    sda2 Boot partition
    sda3 Root partition
    sda4 Swap partition

    You should had mounted it this way:

    sudo mount /dev/sda3 /mnt
    sudo mount /dev/sda2 /mnt/boot
    sudo mount /dev/sda1 /mnt/boot/efi

    Then do the arch-chroot command and finally perform the grub-mkconfig and grub-install commands, but telling grub-install that your efi directory was /boot/efi

    There has been a lot of controversy if it’s wise or not to have an efi partition AND a boot partition, or on the other hand, the efi partition should be used directly as boot, too.

    We advocate for the first option, as this way different kernels of different OSes do not get mixed up.


  • Hi, I had a similar problem after upgrading my UEFI/BIOS, I couldn’t boot my Antergos.
    I couldn’t fixit with the instructions in https://wiki.archlinux.org/index.php/GRUB#UEFI_systems and I was ready to reinstall from the beginning with a copy (dd) of the root partition to restore after, but thanks to this topic i’m back again in my systems in a few minutes, so thanks a lot.
    This is a summary of what I did for completeness in case anyone else have this problem:

    Boot with the Antegos Live ISO

    Check the partition layout:

    parted /dev/sda print
    Number  Start   End    Size    File system     Name           Flags
     1      1049kB  211MB  210MB   fat32           UEFI_SYSTEM    boot
     2      211MB   479MB  268MB   ext4            ANTERGOS_BOOT
     3      479MB   267GB  266GB   ext4            ANTERGOS_ROOT
     4      267GB   275GB  8398MB  linux-swap(v1)  ANTERGOS_SWAP
    mount /dev/sda3 /mnt
    mount /dev/sda2 /mnt/boot
    mount /dev/sda1 /mnt/boot/efi
    arch-chroot /mnt
    pacman -S efibootmgr
    grub-mkconfig -o /boot/grub/grub.cfg
    os-prober # if windows installation present in another partition or disk
    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

    and back to normal.

    PD: If the UEFI’s grub entry keep disappearing each time you update your bios or disconnecting the hard disk:
    Use this command instead:

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

    Explanation here

  • @Marzal It worked like a charm! :)

    I had same problem after update W10. In my case I had boot in root partition (/) so I only applied:

    mount /dev/*sdaROOT* /mnt
    mount /dev/*sdaEFI* /mnt/boot/efi
    arch-chroot /mnt
    pacman -S efibootmgr
    grub-mkconfig -o /boot/grub/grub.cfg
    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
Posts 8Views 5577
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.