iPXE discussion forum

Full Version: How to flash UEFI BIOS with iPXE?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello iPXE Forum! Cool

Can iPXE be configured to flash a UEFI BIOS over the network?

My current process:
1. Format a USB drive as FAT32 and copy flash files to USB
2. Boot to UEFI Built in Shell
3. Execute the flash.nsh
4. Reboot system after the UEFI BIOS is flashed
FILES:
afuefi.smc
fdt.smc
flash.nsh
X11SPI8.614

I was able to utilize iPXE sanboot to boot FreeDOS ISOs over a network share to flash legacy BIOS. Now I'm looking for a way to do this to flash UEFI BIOS.

Can you please assist? Is there some way to pull the flash files and flash.nsh script over the network with iPXE and flash the BIOS?
use initrd to download all files
and then use chain shellx64.efi
That usually "just" works.
Thanks for the information. The initrd commands completed successfully. How can I generate the shellx64.efi file?
What do you mean generate the shellx64.efi?
A right you wrote use built in .... there is few bioses where that works so I skipped that part and assumed that you had appropiate shell.efi binary on your usb device.

Probably this or similar is what you want
https://github.com/tianocore/edk2/blob/m.../Shell.efi
If I attempt to `chain http://xxx/Shell.efi` from the iPXE shell I get a black screen with a flat cursor. The system appears to be unresponsive.
And you have tested that the shell file works when booted from usb memory as boot file, or even started from the builtin shell?
I configured the BIOS to boot to the UEFI Built in Shell and placed the .efi on a USB drive. Then at the prompt enter:

fs1:
Shell.efi
Running this starts a new shell successfully
Update: I was able to run the chain Shell.efi command successfully now. It might have been a network hiccup on the first run or two.
Thank you! After successfully running initrd and chain I'm greeted with a working shell.

However, I'm trying to edit/rename files in the shell which yields a "cannot move to or from a read-only file or directory FS2:\fdt.efi"

Is it possible to enable read/write access on FS2:\ in the shell?
I am using various shell binaries that I have collected. I am curious if you get it working, is it is possible to pass an argument to the shell in order to automatically execute your 'flash.nsh' file?

Code:
################################# uefishell
:uefishell
menu UEFI Shells Menu

item 10     UEFI Shell 1.0
item 20     UEFI Shell 2.0
item 21a    UEFI Shell 2.1.a
item 21b    UEFI Shell 2.1.b

item back Back to top menu...
iseq ${menu-default} menu-recovery && isset ${submenu-default} && goto menu-recovery-timed ||
choose selected && goto ${selected} || goto start
:menu-recovery-timed
choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start


:10
  kernel ${boot-url}/uefi-shell/1.0/Shell_Full.efi
  boot || goto failed
  goto start
  
:20    
  kernel ${boot-url}/uefi-shell/2.0/Shell.efi
  boot || goto failed
  goto start
  
:21a
  kernel ${boot-url}/uefi-shell/2.1.a/Shell.efi
  boot || goto failed
  goto start

:21b
  kernel ${boot-url}/uefi-shell/2.1b/Shell.efi
  boot || goto failed
  goto start
Reference URL's