Migrating BIOS Boot Order to Another UP Board

roarroar Posts: 4New Member
edited October 2017 in UP board BIOS
Hi there

I have multiple UP Boards. What I am trying to accomplish is to set all the UP Boards to the same BIOS version, configuration and boot order programatically. I have successfully been able to make all the UP Boards have the same BIOS verison and configuration, however, I cannot seem to be able to make the boot order consistent on all of them. The BIOS version I am able to successfully update to is the BIOS version which supports PXE boot UPC1BM0X_EFI. As far as configuration is concerned, I am referring to all options except boot order. For example, quiet boot enabled and PXE boot for IPV4 enabled.

The UP Boards I am using all use the AMI Aptio V (five) BIOS. I know that you can export an image of your current BIOS by using the afuefix64.efi tool provided by American Megatrends by running:
afuefix64.efi exported.bin /O

You can then flash the BIOS of another machine using the same tool with different arguments:
afuefix64.efi exported.bin /P /B /N /L

The options above evaluate to:
- P: Program main bios image
- B: Program Boot Block
- N: Program NVRAM
- L: Program all ROM Holes

I have been using the documentation and update utility available at:
AMI_Aptio_5.x_AFU_User_Guide_NDA.pdf and BIOS update util

After doing this, I can update the BIOS on another UP Board and ensure the relevant settings are configured correctly (i.e. PXE boot enabled). This all happens automatically when the UP Boards boot from my USB drive by running my custom startup.nsh script. The only problem I have is that the boot order is not changed. I need all the UP Boards to have the correctly boot order.

I have been reading the Aptio V Boot Option Infrastructure Guide which mentions the high-level steps for how the boot options are managed:
The high level steps of the boot option maintenance process are:
• Previous boot order list is read from non-volatile storage
• Currently available boot devices are collected
• Collected boot devices are filtered
• Collected boot devices are matched to options in previous boot order
• New boot options are created and missing ones are purged
• Boot options in list are processed based upon OEM needs
• Boot option list is stored back to non-volatile storage

This led me to believe the Program NVRAM argument (/N) would allow me to manipulate the boot order list as it is stored in non-volatile storage (NVRAM), however, updating the BIOS using this argument will happily update every other BIOS setting except the boot order. Can someone please provide me with some tips to manipulate the boot order programatically?


Edit: I do see that if I power off the device and disconnect the RTC battery, the boot options are set to some default order and all other BIOS settings are reset to default values which is quite interesting. I wonder, am I able to edit this factory default boot order to whatever I like and also force reload this factory default through EFI shell and/or by adding a different flag when performing a firmware update. Just food for thought..


  • Jesse KaukonenJesse Kaukonen Posts: 26New Member

    Thank you for your research into this.

    I'm currently investigating the very same issue - automating BIOS updates and setting the boot order to prioritize IPv4 PXE.

    I can verify that with UPC1DM07 storing and restoring the BIOS preferences via the tool does not restore boot order while it seems to at least enable the network stack. For me using the /L option to fill ROM holes does not work as I get an error:

    bd - Error: Requested Rom Hole not available in ROM file.

    This happens even if I use /O to make a copy of the same ROM.

    I also tried to update a factory BIOS Up to the latest BIOS using this tool, hoping I could do everything in one go. This doesn't work, as attempting to restore the image gives:

    1e - Error: Secure Flash Function is not supported on this file.

    Updating the BIOS using the update tool from the Up downloads page works, and after this the ROM can be restored. This suggests that the Up BIOS updater avoids this security feature somehow?

  • Jesse KaukonenJesse Kaukonen Posts: 26New Member

    I wasn't able to copy the boot order myself, but I got the cloning task automated with some Clonezilla kernel boot parameters. I've listed them here: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/91888fe3/

Sign In or Register to comment.