You are not logged in.

#1 2018-07-14 15:10:02

Hydroid
Member
Registered: 2018-07-14
Posts: 4

[SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

Hello there!

I'm asking your help in a UEFI related problem.

I have a disk with an LVM partition and with a seperate FAT32 one used as ESP. The latter one was recently resized and moved because I've altered the partition layout and decided to rebuld my efi partition. I've mounted in /etc/fstab the latter one as /boot and installed grub with grub-install (see below). It has created a boot entry in efibootmgr. I've generated a grub.cfg. I've also set my machine to only allow UEFI booting and have turned off legacy booting.

For some reason my computer cannot boot this entry, it just skips it and I land in UEFI/BIOS settings. In the boot menu the entry shows up but it does exactly the same. The only way now I am able to boot up my computer is using Super GRUB Disk and selecting manually /boot/EFI/GRUB/grubx64.efi. Then GRUB shows up and I can select an entry as expected originally.

My motherboard is an ASUS M5A97. I've read the wiki article about it and have tried the method of getting in the UEFI shell, but anywhere I placed the shellx64.efi binary in the ESP (under its root and /boot/EFI), UEFI couldn't find it. The error looked very similarly to this.

I've used instead the UEFI shell I've found on the arch installation iso to create an efibootmgr entry, however, it did not map fs0: fs1: or any fsN: to my ESP, I could only edit the one it has found on my flash drive.

This is exactly what I get from efibootmgr:

# efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0002,0000,0003
Boot0000* arch	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* GRUB	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0003* UEFI: KINGSTONDataTraveler 3.0	PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)/USB(1,0)/HD(2,GPT,06bc6ebb-32ba-456c-9033-cde8f419f20e,0x168,0x1680)AMBO

GRUB and arch entries are two attempts, the third one is a flash drive with Super GRUB Disk that I mentioned above.

Right now I've also noticed something interesting: after running

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

the further output becomes:

# efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0001,0000,0003
Boot0000* arch	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* GRUB	HD(4,GPT,dcbeb233-7665-4ef5-a0b9-59ad8b438f88,0xd6a7000,0x10d800)/File(\EFI\GRUB\grubx64.efi)
Boot0003* UEFI: KINGSTONDataTraveler 3.0	PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)/USB(1,0)/HD(2,GPT,06bc6ebb-32ba-456c-9033-cde8f419f20e,0x168,0x1680)AMBO

But after reboot the entry is reverted into its previous state.

Any clue, advice or hint is highly appreciated. Thank you for your time and help in advance!

Last edited by Hydroid (2018-07-14 16:54:24)

Offline

#2 2018-07-14 15:39:02

nl6720
Wiki Admin
Registered: 2016-07-02
Posts: 231

Re: [SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

It looks like you made some mistake when resizing and moving the ESP.

Post the output of:

# lsblk -o +FSTYPE,PARTTYPE

Offline

#3 2018-07-14 15:46:24

Hydroid
Member
Registered: 2018-07-14
Posts: 4

Re: [SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

Thank you for your reply! Easily could be the case. Here you go:

# lsblk -o +FSTYPE,PARTTYPE
NAME                   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT FSTYPE      PARTTYPE
sda                      8:0    0 111,8G  0 disk                        
├─sda1                   8:1    0  44,5G  0 part            ntfs        ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
├─sda3                   8:3    0  62,8G  0 part            LVM2_member e6d6d379-f507-44c2-a23c-238f2a3df928
│ ├─ssd-home           254:0    0     9G  0 lvm  /home      ext4        
│ ├─ssd-swap           254:1    0     4G  0 lvm             swap        
│ ├─ssd-arch           254:2    0    40G  0 lvm  /          ext4        
│ └─ssd-SystemRescueCD 254:3    0     1G  0 lvm             ext4        
└─sda4                   8:4    0   539M  0 part /boot      vfat        c12a7328-f81f-11d2-ba4b-00a0c93ec93b
sdb                      8:16   0 931,5G  0 disk                        
├─sdb1                   8:17   0 871,2G  0 part            ntfs        0x7
└─sdb2                   8:18   0  60,3G  0 part            ext4        0x83
sdc                      8:32   1  14,5G  0 disk            iso9660     
├─sdc1                   8:33   1   148K  0 part            iso9660     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
├─sdc2                   8:34   1   2,8M  0 part            vfat        c12a7328-f81f-11d2-ba4b-00a0c93ec93b
└─sdc3                   8:35   1  16,5M  0 part            hfsplus     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

Offline

#4 2018-07-14 16:00:48

nl6720
Wiki Admin
Registered: 2016-07-02
Posts: 231

Re: [SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

The partition type of sda4 is correct and at least the kernel detects it as vfat (but we don't know if it's FAT16 or FAT32). Unless the UEFI sees the filesystem you won't be able to boot. How exactly did you resize the partition?

For now I can only suggest this:
Backup the files from ESP, wipe the filesystem signature with `wipefs -a /dev/sda4` and format the filesystem following the wiki: EFI system partition#Format the partition.
When done copy the files back.

Offline

#5 2018-07-14 16:16:12

Hydroid
Member
Registered: 2018-07-14
Posts: 4

Re: [SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

gparted.png

I've used GParted, and did in two steps: first I've shrinked the ntfs partition /dev/sda1, then I moved the ESP to the left. Then I've extended, and later have shrunk it, because my ultimate goal was to have spare space on my boot partition to store a bootable copy of Arch Linux installation image and SystemRescueCD there - you can see from my previous post that I had an LVM partition for that purpose (destined to be deleted). After the extension I discovered that it cannot be booted and have shrunk it back, seeing whether it was the cause of the problem.

The ESP partition is formatted to FAT32.

I'll follow your instuctions soon and report back when I'm done. I really appreciate your help!

Offline

#6 2018-07-14 16:54:00

Hydroid
Member
Registered: 2018-07-14
Posts: 4

Re: [SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

Wow! Thank you! I've done exactly what you wrote and now GRUB shows up and behaves as it is expected.

You've made my day smile Marking thread as solved.

Offline

#7 2018-07-14 16:58:12

nl6720
Wiki Admin
Registered: 2016-07-02
Posts: 231

Re: [SOLVED] GRUB UEFI entry is skipped on Asus M5A97 motherboard

So the culprit was parted/GParted. I don't know the specifics, but AFAIK by resizing a partition it recreates the filesystem somehow. Whatever it did, it did it poorly, so a manual reformat was needed.

I'm glad that it works now. smile

Last edited by nl6720 (2018-07-14 16:58:40)

Offline

Board footer

Powered by FluxBB