Cannot boot into self-created EFI Shell environment - black screen

Hi folks,

for reasons (forgot UEFI Admin password and cannot change boot device) I wanted to add an UEFI Shell to the grub menu of wife’s Ubuntu laptop (ASUS Zenbook)

I asked Chat-GPT for assistance and got following stepe I all did:

I downloaded https://github.com/tianocore/edk2/blob/edk2-stable201903/ShellBinPkg/UefiShell/X64/Shell.efi

I copied the Shell.efi file in /boot/efi/EFI/tools

I created an entry with ‘sudo nano /etc/grub.d/40_custom’

menuentry "EFI Shell" {
    search --no-floppy --fs-uuid --set=root ABCD-1234
    chainloader (${root})/EFI/tools/Shell.efi
}

ABCD-1234 was replaced with the UUID of the boot VFAT partition

sudo update-grub

reboot

When I select the entry from grub nothing happens. It takes me to a black screen. Am I missing something? No error messages that give me a hint.

In another tutorial I read sth like ‘insmod fat’? Is this needed? Sth. else?

EDIT: meanwhile I tried ‘insmod fat’ and ‘insmod part_gpt’ before search line - did not help…

Hi @PeterRies ,
Is this useless?
https://www.biosbug.com/asus/

Hi @eso - unfortunately: yes. I set an Admin password. This obviously only works for user passwords. I already came across this, but didn’t work.

I found a promising solution in an ASUS Rog Forum, which makes use of AMI flash tool (AfuLnx, AfuDos, AfuEfi…) to dump BIOS and then grab some bytes from there, do some magic decoding stuff.

But this AMI tool needs to compile a driver under Linux wich is supported only up to Kernel 5.x (I failed there for “reasons”). Windows Version is no option, DOS tool failed, as I could not boot into FreeDOS on an EFI machine. So last resort is the efi version of that tool to create a BIOS dump. This is what’s this thread is about.

In a Gentoo forum I read sth about two more insmod things that were added to the GRUB entry.

Solution… Obviously had a bad shell.efi file…

Download from here: https://github.com/pbatard/UEFI-Shell/releases/download/24H1/shellx64.efi

Modify /etc/grub.d/40_custom

menuentry "UEFI Shell von Festplatte starten" {
    insmod part_gpt
    insmod fat
    set root=(hd0,gpt1) 
    chainloader /EFI/Boot/shellx64.efi
    echo "Booting UEFI Shell..."
    sleep 5
    terminal_output gfxterm 
}

sudo update-grub2

And you should be able to enter the efishell and do whatever you like.

With this I was able to extract the ASUS (AMI) Bios with the AfuEfix64.efi tool. Now I need to check if lost BIOS password is in there somewhere. The position in file where a yt video refers to unfortunately is empty… Let’s see…

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.