4

Due to my unusual hardware configuration (see Graphics card not working on Windows 8.1 on Mac), i am forced to set two PCI registers using the mm EFI command before being able to boot Windows. Right now i have a build of the EFI shell (my mobo does not have one built-in) dropped as bootx64.efi with startup.nsh looking like this:

mm 0010003E 1 ;PCI :8
mm 02000004 1 ;PCI :7
fs0:\EFI\Microsoft\Boot\bootmgfw.efi

Would it be possible to replace the EFI shell with something more lightweight that would preferably NOT allow interrupting the boot process?

0
2

Were you performing an EFI boot of Windows on a Mac? I've just accomplished the same thing on my Mid-2009 MacBook Pro 5,4

My EFI shell is also non-firmware. I had to put it in the EFI partition and bless it manually.. Still I was able to use Set StartupDelay [X] My EFI shell is the Precompiled x86_64 UEFI Shell v1 binary found at https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Obtaining_UEFI_Shell or more directly: https://svn.code.sf.net/p/edk2/code/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi I am using the v1 rather than the v2 because v2 is described as being more useful on UEFI (v2) systems unlike my Mac which uses 1.10 EFI firmware.

With that, Set StartupDelay [x] works for me, but don't put it in your startup.nsh! You only need to invoke it once. Otherwise, you will needlessly rewrite your NVRAM after every boot, reducing its lifespan needlessly. I haven't tried '0' for a startup value. I just needed a smaller delay. For me, my startup.nsh starts Refind. I need to have some time to bypass it if I'm starting the shell from refind. Although, refind has a shell accessible by exiting refind, and there is no nsh startup issued within it.. I am not sure if this shell is enabled by having shell.efi tool, or if it was always there.

help set -b shows good info on the set command. It states that if there is no NVRAM environment associated with the shell, it will save the variables into /efi/boot/bootstr.nvr, which means the command should work for anyone without NVRAM. but that file is never created on my machine, so it's definitely in NVRAM. I proved it by using dmpstore StartupDelay which dumps the NVRAM variables (in this case, only for StartupDelay, if it exists)

Hope that helps.

2
1

You can eliminate the startup delay by putting "set StartupDelay 0" at the beginning of your startup.nsh, where 0 is the number of seconds to wait. This worked for me.

1
  • I do not have the EFI shell in my firmware, so it did not work for me. – kinokijuf Oct 13 '14 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.