You are not logged in.

#1 2013-07-19 14:18:48

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

[Solved] Lost UEFI entry, how am I supposed to resume it?

Hello,
I did not guess yet, what happened to invalidate my grub entry in the BIOS UEFI selection.
It is strange that I can boot Arch by launching the EFI shell, which calls grub. This it has made since the first setup and also this I still don't guess the reason.
I've tried

efibootmgr -c -g -d /dev/sda -p 7  -L "Archlinux" -l '\EFI\arch_grub\grubx64.efi'

My Arch is on sda7, but the entry give me Archlinux (drive not ptresent)
My ESP is on sda2.
I'm not that expert, but so strange to launch grub by EFI shell. Even trying to trick the windows 8 bootloader I think I'll have some surprise smile
It's mysterious for me.

Last edited by TheSaint (2013-07-21 17:21:27)


do it good first, it will be faster than do it twice the saint wink

Offline

#2 2013-07-19 16:01:04

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [Solved] Lost UEFI entry, how am I supposed to resume it?

The -p option to efibootmgr specifies the partition number of the ESP. Thus, if your ESP is /dev/sda2 and you're using a "-p 7" option to efibootmgr, as shown in your post, that's the source of your problem. OTOH, if that was a typo in your post, then something else is wrong. In that case, please post the output of the following commands:

efibootmgr -v
df -h /boot/efi
ls -l `find /boot -iname "*.efi"`

As to the question of how the NVRAM became corrupted, unfortunately there's no one easy answer for that. Firmware updates and some actions performed in the firmware's user interface can wipe the entries. So can competing OSes and EFI utilities. Some EFIs are just plain amnesiacs when it comes to their NVRAM entries; they can't retain them, or occasionally forget the entries at random. Some computers "helpfully" remove invalid entries, which means they'll be lost if you temporarily unplug a hard disk.

Offline

#3 2013-07-20 17:54:47

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [Solved] Lost UEFI entry, how am I supposed to resume it?

After some hard trying I'm back to my Arch, but not by the mean of UEFI entry, yet
I've tried efibootmgr -c -g -d /dev/sda -p 7  -L "Archlinux" -l '\EFI\arch_grub\grubx64.efi' with- p 2 AND with -p 7, both the same soup sad
efibootmgr -v is not available now, I boot from USB Arch, non UEFI.

# mount /dev/sda2 /boot/efi
# df -h /boot/efi
File system     Dim. Used Avail. Usad% Monted
/dev/sda2       900M  322M    579M  36% /boot/efi
# ls -l `find /boot -iname "*.efi"`
-rwxrwxrwx 1 root root 1354480 25 lug  2012 /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
-rwxrwxrwx 1 root root  120832 19 lug 18.09 /boot/efi/EFI/arch/grubx64.efi
-rwxrwxrwx 1 root root   47872 18 lug 11.30 /boot/efi/EFI/refind/drivers_x64/btrfs_x64.efi
-rwxrwxrwx 1 root root   31712 18 lug 11.30 /boot/efi/EFI/refind/drivers_x64/ext2_x64.efi
-rwxrwxrwx 1 root root   32128 18 lug 11.30 /boot/efi/EFI/refind/drivers_x64/ext4_x64.efi
-rwxrwxrwx 1 root root   35840 18 lug 11.30 /boot/efi/EFI/refind/drivers_x64/hfs_x64.efi
-rwxrwxrwx 1 root root   31776 18 lug 11.30 /boot/efi/EFI/refind/drivers_x64/iso9660_x64.efi
-rwxrwxrwx 1 root root   36064 18 lug 11.30 /boot/efi/EFI/refind/drivers_x64/reiserfs_x64.efi
-rwxrwxrwx 1 root root  162112 20 lug 15.04 /boot/efi/EFI/refind/refind_x64.efi
-rwxrwxrwx 1 root root   40192 18 lug 11.30 /boot/efi/EFI/refind/tools_x64/gptsync_x64.efi
-rwxrwxrwx 1 root root  847232 19 lug 19.59 /boot/efi/Shell.efi.
As I was entering by launching the EFI shell, which call grub, now I made a mistake and grub fails about [i]GRUB_COLOR_HIGHLIGHT not found[/i] whether I have or no grub.cfg in /boot/grub.
-rw-r--r-- 1 root root  120832 20 lug 21.32 /boot/grub/x86_64-efi/core.efi
-rw-r--r-- 1 root root  120832 20 lug 21.32 /boot/grub/x86_64-efi/grub.efi

I've tried

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

with successful result but in the BIOS arch (drive not present) appeared
The last trial is to setup refind as bootloader, I'm getting troubles  with grub. Even wiki stopped to mention grub as bootloader (I think).

Last attempt to set entry by EFI shell bcfg doesn't find the path of refind_x64.efi. Because it isn't fs0: the ESP.
For some necessity, I think I have to fake the Win8 bootloader, once I've solved probably I'll put it back to normal.


do it good first, it will be faster than do it twice the saint wink

Offline

#4 2013-07-20 21:08:23

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [Solved] Lost UEFI entry, how am I supposed to resume it?

TheSaint wrote:

After some hard trying I'm back to my Arch, but not by the mean of UEFI entry, yet
I've tried efibootmgr -c -g -d /dev/sda -p 7  -L "Archlinux" -l '\EFI\arch_grub\grubx64.efi' with- p 2 AND with -p 7, both the same soup sad

According to your "ls -l..." output, you don't have an EFI/arch_grub directory, so your filename specification when you try to add GRUB to your menu is incorrect. You do have an EFI/arch directory, so changing the command to reference that should work.

# mount /dev/sda2 /boot/efi
# df -h /boot/efi
File system     Dim. Used Avail. Usad% Monted
/dev/sda2       900M  322M    579M  36% /boot/efi

This suggests that your ESP is /dev/sda2, although of course you could have some other partition mounted there in error. You might want to cross-check this with the output of "parted /dev/sda print" or "gdisk -l /dev/sda".

I've tried

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

with successful result but in the BIOS arch (drive not present) appeared

I'm not extremely familiar with the grub-install command, so I'm not sure whether or not the command you presented is correct. It's also unclear to me what you mean by "...in the BIOS arch (drive not present) appeared." Do you mean that you see this as soon as you boot, after you select a GRUB entry from the firmware's own boot manager, after you select an Arch entry in GRUB, or something else? If at all possible, you should try to identify what displays any error messages you see -- the solution is likely to be very different if a message is produced by the firmware vs. GRUB, for instance. I realize this isn't always easy, but noting the exact error messages, along with their contexts, can be helpful in this respect. Take a digital photo and post it if you need to do so.

Last attempt to set entry by EFI shell bcfg doesn't find the path of refind_x64.efi. Because it isn't fs0: the ESP.

You need to report the exact commands you issued and the exact errors you got. Saying you followed instructions in a wiki just isn't good enough; it's too easy to miss a step, mistype a command, etc. Again, take a screen shot with a digital camera and post a link to the image if doing so would be helpful.

For some necessity, I think I have to fake the Win8 bootloader, once I've solved probably I'll put it back to normal.

Maybe, but probably not, and it's better not to do this unless you absolutely must do so.

Offline

#5 2013-07-21 17:36:03

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [Solved] Lost UEFI entry, how am I supposed to resume it?

First of all, thank you for your help.
For the reports that are displayed on the EFI shell, I'm sorry it's hard to remember the correct sentence. However all is gone.
My hard disk is badly organized. The truth is that UEFI partition is the first as standard, like wiki mention.
The second partition contains an EFI directory like the first to let choose a recovery mode from the BIOS, but it's hidden an NTFS formatted.
When I mounted the correct partition (sda1) then also grub-install did the right entry in the NVRAM big_smile
Final, I just have to correct the order to let Arch start first.


do it good first, it will be faster than do it twice the saint wink

Offline

Board footer

Powered by FluxBB