PDA

View Full Version : Cheatsheet: EFI Issues



sea
18th April 2014, 04:36 AM
EFI issues - cheatsheet
Note these are the steps helped me.
They (problem/issue) may differ on your system.
Basicly i wanted an all purpose-slash-hammer-solution, which refer to the attached script menu entries 9 + 10.
Otherwise i hope this post gets you started.


Cheatsheet - Tasks

GRUB not shown
Win7:
Reboot
Press F12 the moment the computer power offs & on
Keep pressed until the BIOS boot menu shows
Select your USB/DVD drive with the liveimage on

Win8:
PC-Settings
Updates/Recovery
Advanced Reboot
UEFI USB (if liveimage is on USB)

LiveImage:
Let efibootmgr create an automatic entry
Reboot


New entry every boot

Remove ALL entries
Add Fedora & Microsoft entries
Set Bootorder to Fedora,Microsoft
Reboot

Workaround:
Execute the script attached, and choose: "8) Remove an entry at every start"

Windows wont boot
Only if none of the above worked out!

Reinstall GRUB2
Reinstall Fedora

Workaround: Post #3 (http://forums.fedoraforum.org/showpost.php?p=1700095&postcount=3)

Cheatsheet - Commands

Example new manual entry:

efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\fedora\\shim.efi -L Fedora
efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\Microsoft\\Boot\\bootmgfw.efi -L Windows

Set BootNext (where 0000 is the ID to boot):

efibootmgr -b 0000 -n 0000

Clear BootOrder (RISKY!) (EFI search mode // Boot Vendor?):

efibootmgr -O

Set BootOrder:

efibootmgr -o 0001,0000,2001,2002

Script - Video Guide
http://youtu.be/zigWdZ2HwZ8

Hope this helps

sea
21st April 2014, 02:34 PM
Updated:
Added a menu function to add all found *efi files under /boot/efi/EFI (10), of all vendors and all 'shims'.
Modified sea's dynamic template (9), should be the same (as 10) but with less entries.

--> Scriptmenu entry 10 became the desired 'all purpose hammer solution'.
It *should* solve your efi issues, however, no guarantuee taken, whether for it to work, nor for your system to remain healthy.

This post/cheatsheet/script is ment to help.
If you take this help, you are fully responsible for your actions by yourself.
I deny any responsiblity for anything that may, or may not happen to your system (or data), wheter it remains/becomes bootable or not.

Hope this helps
Cheerio :)

EDIT:
I even got rid of the "booting in insecure mode". :)
Attached are the screenshots from the (for the 4th time tested) use of etsh.sh -> 10 : "Clean disk & test all"
Before.jpg refers to after the script use, but before the reboot.
after.jpg therefore refers to after the reboot.

Note that it did boot of neither of the previously set bootorders, which i think is highly irritating.

sea
27th May 2014, 03:48 PM
As just posted elsewhere, i post here too to collect the solutions:

grub.cfg creation fails upon retrieving Windows information....
Thus resulting either in a non-bootable windows, or a non-configurable boot-menu..

This should help:
-----------------------------
Note that sda2 is the EFI partition on my system:
Write the file '/etc/grub.d/11_windows' but thange the UUID to the one of your EFI partition.

To get the prober UUID of your (single) ESP, try:

su -c blkid | awk '/EFI/ {print $2}'
Which in my (current) case returns:

UUID="147A-BABB"


NOTE: Please use the 40_custom file, only if it does not get applied (as in my case) use something like: 11_windows

+ ~ $ sudo cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
menuentry "Windows 8" --class windows {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 147A-BABB
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
:) ~ $ sudo blkid /dev/sda2
/dev/sda2: UUID="147A-BABB" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="949dc043-b4e9-11e3-86cd-9ee73db0c5f4"
Be aware, sda2 is the EFI-System-Partition (ESP), NOT the windows system parition (C:)!

Make /etc/grub.d/11_windows executable by: (the 40_custom file should be executeable already)

chmod +x /etc/grub.d/11_windows

Then furthermore change the way grub.cfg is created:

sudo mv /boot/efi/EFI/fedora/grub.cfg /boot/efi/EFI/fedora/grub-$(date +"%F").bak
sudo grub2-mkconfig > /boot/efi/EFI/fedora/grub.cfg

Hope this helps

PabloTwo
28th May 2014, 02:34 AM
Just a coupleof nit-picky suggestions for this cheatsheet thread:

1) Fix this obvious typo: "efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\Microsoft\\Boot\\bootmgfw.efi.efi -L Windows"

2) Why suggest to create /etc/grub.d/11_windows when /etc/grub.d/40_custom is already there for that purpose?

$ sudo cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

sea
28th May 2014, 02:40 AM
1) Thank you, fixed
2) Because in some occasions, as (U)EFI behaves for me, grub2-mkconfig doesnt reach the 40_files.
Therefor the output is diffrently redirected, instead of "-o" use ">", that way, all the code generated 'that' far, gets written in the new config.

sea
22nd July 2014, 08:18 AM
Among others things, i though i need to extend this script.
Figured just adding the most recent additional post for creating a "Windows Entry" using an extra grub file, was enough for my personal needs.


Beeing 'on it', here's my Question before i upload it again:

Of those 56 downloads so far, hope it helped you!
Are there any thoughts / suggestions / improvements you would like to see for the script?
I know i sometimes dont reckognize the needs of others (you), thats why i keep asking, but wihtout feedback, i'll just continue with my personal needs, as it'll seem to be enough for you too ;)

Ahmad Samir
22nd July 2014, 09:04 AM
I think the new-boot-entry-is-added-at-each-boot issue is probably this bug https://bugzilla.redhat.com/show_bug.cgi?id=995834#c6

sea
22nd July 2014, 09:31 AM
Yes.
This could be solved by setting the newest entry as first boot order.
Or, to create a new entry with another shim reference.

Just thinking, should i create/use a log file?
Might be helpfull for debugging of what was done..

EDIT:
Ahh, got it Ahmir, yes i could make some additional menu entries that describe the issue, and (semi-)auto-do the steps required.
Good idea, thank you.

sea
5th October 2014, 07:01 PM
0.3.1
* Added efi-helper.sh script, replacement for the droped etsh.sh
* Its focused upon Dual-Boot (Win&Fed), however, beeing aware some might have just 'Multi-Boot', the adding for all efi files was kept
* Its using a configuration file now
* Its using a logfile now (this should help you to change commands to your needs)

I dont promise to solve your problems, but it should help.

EDIT:
The new removing of all entries no longer uses the -O option, wich caused my system to go back to the 'search for media' screen (beween vendor logo & grub screen)

Also, there is a glitch...
If you do not pass "-v" to the efi-helper script, it'll show the TUI configuration screen upon removing all entries.. idk why.. just go 'back' (1) from there... sorry :confused:

sea
26th November 2014, 04:53 PM
0.3.9
* TUI had changed name for tui-value-* to tui-conf-*
* Windows is now ver 8.1
* Fixed 'efi' file for fedora
* the accidental 'show up' of tui config is fixed

Attention: Removing all nvram entries results in "No boot media found, checking for devices" (lasts ~15 secs till grub is shown) on my computer -- but no efi entry is created, and both is bootable (this time :confused:)
So, almost all is fine.
But i dont know a 'fix' for that to -not- happen yet.

Also, this update is only a hotfix, for the 'setting handling', had forgotten to update this one when i renamed the tui-functions.

sea
26th November 2014, 10:40 PM
Just as a bump, if someone experienced issues with the script as in, it didnt do what you did expect.
Please, let me know NOW, as i'm now working at it to be stable for my F21/22 livespin, and after that it wont be changed again until i reinstall all my OS's, which will be in about 6 months - for F22/23...

Related suggestions are welcome.
Or related hints ;)

dkdigitally
8th January 2016, 12:31 AM
Hello sea, I was perusing different threads while trying to figure out how to boot back into Windows 10 after installing Korora (which I believe is based off of Fedora) on the same drive as Windows 10. I cam across your post where you mentioned the link in your signature and I followed it. When I try to download the attached file to your post it just opens a new window and tries to view it as an image.

Any help on how to get it to download instead of opening a new tab?

sea
8th January 2016, 02:02 PM
Since the forum doesnt accept/save/provide attachments, the script is no longer available using the forum.

You may get it from:
https://github.com/sri-arjuna/efi-helper

Once downloaded and extracted the tarball, use the installer like:

./configure --prefix=/usr
./make
sudo ./make-install

hth

sea
13th January 2016, 01:11 PM
Updated to match the latest TUI commands.
Please update your local code or redownload the tarball and install again.

Also, please be aware that i'm currently on an Archlinux (only OS) system with a MBR setup.
So me currently have no capability to test it, if anything fails, please let me know, either as PM, post in this thread or on github issue.

Hope this helps

bc140400159
22nd October 2016, 08:15 AM
Please help me out.

I installed fedora 24, i had dual boot but now i have only fedora in my system. I am newbie.

My whole data has gone ???


is there any way to get back my data from window 8.1