고객지원

RedFish Commands to Update Firmware for Your Server Systems

This guide features the cURL commands to update BIOS and BMC firmware for your server system which supports RedFish. Before we start, please make sure your host system has an IPMI or NC-SI LAN port connected to the internet and the BMC IP address of it for a client end in the same network segment to access.

1. BIOS Update:

curl -k -v -X POST https://[IP_address]/redfish/v1/UpdateService/upload --form 'UpdateFile=@[File_location]' --form 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/BIOS"]};type=application/json' --form 'OemParameters={"ImageType":"BIOS", "Config": 4, "Action": 3};type=application/json' -u [username]:[password] -H If-None-Match:W/\"1667287258\" -H "Expect:"

*We recommend this command which shuts down the host immediately and perform BIOS update.

For BIOS update, here are the definitions to the available values for "config" and "action":
'OemParameters={"ImageType":"BIOS", “Config”: config, “Action”: action}’
config
2: Preserve BIOS settings
4: Overwrite BIOS settings
action
1: Update on host shutdown
2: Update immediately without changing host state
3: Shutdown host to update

If the update request is successfully sent off, the system would return an Accepted message with a 2xx code:

You may also check the update progress by visiting:
https://[host_IP_addr]/redfish/v1/UpdateService

2. BMC Update:

curl -k -v -X POST https://[IP_address]/redfish/v1/UpdateService/upload --form 'UpdateFile=@[File_location] ' --form 'UpdateParameters={"Targets":["/redfish/v1/UpdateService/FirmwareInventory/BMC"]};type=application/json' --form 'OemParameters={"ImageType":"BMC"};type=application/json' -u [username]:[password] -H If-None-Match:W/\"1667287258\" -H "Expect:"

If the update request is successfully sent off, the system would return an Accepted message with a 2xx code as well.

3. Reboot Host:

In case you are not using a shutdown action parameter (3) for the BIOS update command, or to view the latest firmware information of your current host after the update, please reboot your host with the following command:

curl -k -v -X POST https://[BMC_IP]/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset -d '{"ResetType" : "GracefulRestart"} -H "Content-Type: application/json" -H "X-Auth-Token: [token]"

4. Troubleshooting:

If an issue occurs during the update (e.g. the procedure did not start, or an error code "Status:500 Internal Server Error" occurred), you can try below methods such as the power actions or resetting BMC to default according to the scenarios:

i. Double checking your command:

If your cURL request was returned by an error code 400, it means that the request command was incorrect. In other words, the request sent by the client to the host server did NOT follow the rules. The client should modify the request command before retrying so that it could be understood by the host.

ii. Reboot Host:

If the expected update procedure does not start up, you may try powering off your system, or try rebooting it:

curl -k -v -X POST https://[BMC_IP]/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset -d '{"ResetType" : "GracefulRestart"} -H "Content-Type: application/json" -H "X-Auth-Token: [token]"

ResetType Allowable values :
“On” for Host power on
“GracefulRestart” for Host reboot
“GracefulShutdown” for Host soft power off
“ForceOff” for Host hard power off

iii. BMC set to default:

If you encountered an error code 500 issue, this could be related to corrupted RedFish data. The overall solution is to resend a brand new copy of RedFish data to the server again. To do so, we flash BMC to the same version with items other than RedFish preserved, or simply update your BMC.
To preserve your current BMC config:

curl -k -v -X PATCH https:// [BMC_IP]/redfish/v1/UpdateService -d '{"Oem": {"AMIUpdateService": {"PreserveConfiguration": {"Authentication": true,"FRU": true,"IPMI": true,"KVM": true,"NTP": true,"Network": true,"REDFISH": false,"SDR": true,"SEL": true,"SNMP": true,"SSH": true,"Syslog": true,"WEB": true} } } }' -u [username]:[password] -H If-None-Match:W/\"1667287258\" -H "Expect:" -H "Content-Type: application/json"

5. Report an issue to us:

If there is an issue that cannot be resolved or further assistance is required, please visit https://event.asrockrack.com/tsd.asp and fill out the form as detailed as possible so we could provide an efficient tech support.

© 2024 ASRock Rack Inc. All rights reserved. | Information published on ASRockRack.com is subject to change without notice.| Terms of Use Notice | Privacy Policy