UPDATE_FLASH(8)

๐Ÿ“ฆ version 1.3.14, in opensuse-leap 16.0

๐Ÿ’… update_flash(8) โ€” the PowerLinux Service Tools glow-up ๐ŸŽ€

okay bestie, so this is update_flash from the PowerLinux Service Tools manual, section 8 (that's your "system admin commands" section, iykyk). Sit down, grab a strawberry drink ๐Ÿ“, and let's get into it.


โœจ NAME โœจ

update_flash โ€” manage system and service processor firmware, no cap ๐Ÿ”ฅ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

/usr/sbin/update_flash [-v|-n] -f firmware.img
/usr/sbin/update_flash -h
/usr/sbin/update_flash -c
/usr/sbin/update_flash -r
/usr/sbin/update_flash -s

Like, look at the options squished together there โ€” [-v|-n] means pick one, you can't have both vibes at once ๐Ÿ’…


๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

The update_flash script is the main character of firmware management โ€” it validates, updates and manages firmware on IBM Power Systems servers. Literally its whole personality. ๐ŸŒˆ

๐ŸŽ€ VALIDATION ๐ŸŽ€

When you use it with the -v option, the script will ONLY perform validation of the image file. Like, that's it, that's the whole job. Regardless of the outcome of the validation, no actual flash will occur. Zero flashing. None. So if validation comes out messy, nothing breaks.

This option is only useful on machines that support validation of firmware images โ€” so do a little vibe check on your hardware first. โญ

๐Ÿ”ฅ UPDATE ๐Ÿ”ฅ

When you use it with only the -f option and an image file name, the script will attempt to update the system firmware with the given image.

If the machine can pre-validate the image, that happens automatically before the flash. Slay. If the machine is not capable of pre-validation, or if validation passes, the script will upload the firmware image into the kernel and will perform a shutdown -r now which will reboot the system. The flash itself occurs at the end of the reboot process. ๐Ÿฆ‹

โš ๏ธ WARNING, and I mean this fr fr: the system WILL be rebooted! Wait until the flash process has completed. This can be anywhere from 2 minutes to 20 minutes (or more) depending on the system โ€” like, it's not ghosting you, it's just built different. The control panel display will show that the system is flashing. Failure to wait may render a system inoperable. ๐Ÿ’€ Do not touch. Do not poke. Just wait.
๐Ÿ“ NOTE: if the machine supports two firmware image areas, the update is always applied to the temporary image area. The -c option is the normal means by which a temporary image is committed to the permanent side (see MANAGEMENT, below ๐Ÿ‘‡). But โ€” big but โ€” if a platform is running from a temporary image when an update is to be applied, then the platform may automatically commit the current temporary image to the permanent side to allow the new image to be updated to the temporary image area. The -v option can be used to determine what would result from an attempt to update a flash image. So yeah, -v is your "what would happen if" crystal ball ๐Ÿ”ฎโœจ

The -n option will prevent the automatic overwrite of the permanent image area and abandon the update entirely. Goodbye update, we hardly knew ye ๐Ÿ™ˆ

To apply an update to the temporary image area without overwriting the permanent image area, the system must first be running with the permanent image. The temporary image can then be rejected (see MANAGEMENT). Subsequently, the update can be applied. Order of operations matters, bestie โ€” do not skip steps. ๐Ÿงš

๐Ÿ’œ MANAGEMENT ๐Ÿ’œ

When used with the -c option, the script will commit the temporary image to the permanent side. In order to use this, the machine must be running on the temporary image. This option is only useful on machines supporting two firmware image areas.

When used with the -r option, the script will reject the temporary image. In order to use this, the machine must be running on the permanent image. To switch from the temporary image to the permanent image, you must reboot from the permanent image โ€” for example, using the ASMI or HMC. This option is only useful on machines supporting two firmware image areas.

So -c = "yes queen, keep it", -r = "no thank you, return to sender". ๐Ÿ’…


๐ŸŒธ OPTIONS ๐ŸŒธ

  • -h โ€” print the usage message and exit. The "help meee" flag ๐Ÿซถ
  • -f filename โ€” supply the filename to flash (required). Like, mandatory mandatory.
  • -v โ€” validate ONLY with the specified image file.
  • -n โ€” do not overwrite the permanent side image automatically.
  • -c โ€” commit the temporary image to the permanent side.
  • -r โ€” reject the temporary image.
  • -s โ€” determine if the partition has access to perform flash image management.

๐Ÿงš EXAMPLES ๐Ÿงš

To determine if the partition has authority to flash an image:

# update_flash -s

For a typical firmware update (this may commit temporary to permanent):

# update_flash -f 01AL740_100_042.img

To update only if the permanent side will not be overwritten:

# update_flash -n -f 01AL740_100_042.img

To validate an image:

# update_flash -v -f 01AL740_100_042.img

To commit the temporary image to permanent (note that the system must be running on the temporary image):

# update_flash -c

To reject the temporary image, and copy permanent to temporary (note that the system must be running on the permanent image):

# update_flash -r

โญ EXIT STATUS โญ

the receipts, basically. every number means something ๐Ÿ”ข

All cases:

  • 3 โ€” usage error
  • 4 โ€” permission error
  • 6 โ€” unexpected problem with /proc filesystem access
  • 7 โ€” error loading module
  • 8 โ€” RTAS(pSeries)/OPAL(PowerNV) call failed
  • 9 โ€” user aborted operation

Determine if the partition has authority to manage image (-s):

  • 0 โ€” flash image management is supported
  • 1 โ€” flash image management is not supported on this system

Validation (-v):

  • 0 โ€” validation successful

Update ([-n] -f):

  • 5 โ€” image file error
  • 10 โ€” auto overwrite permanent side image
  • 15 โ€” update Access Key expired

Manage (-c|-r):

  • 0 โ€” temporary image commit/reject successful

๐ŸŽ€ FILES ๐ŸŽ€

pSeries

rtas_flash kernel module
/proc/ppc64/rtas/firmware_flash (provided by kernel module)

PowerNV

/sys/firmware/opal/image
/sys/firmware/opal/{validate/manage/update}_flash

๐Ÿ’– NOTES ๐Ÿ’–

๐Ÿ“ฅ Download firmware

Firmware may be downloaded from the IBM website. Instructions for downloading and installing the firmware image are also there, and the information there will be more up-to-date than this page. So like, this page is cute but the website is the source of truth, bestie ๐Ÿค

๐Ÿ˜ญ Firmware update failure

Various conditions can lead to a firmware update failure. If you receive an authentication-related error, such as:

update_flash: RTAS: validate() Partition does not have authority
-or-
update_flash: System does not have authority to perform firmware update.

This can reflect either 1) that the permission is not set (correctable through the ASM interface, System -> Firmware Update Policy, or through an HMC if attached).

-or-

2) firmware still believes an HMC is attached. This can be corrected by following the steps outlined here:

http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/p7hatl/iphblresetserverp6.htm

๐Ÿ“ RPM format image

For "rpm format" images, the file will have a .rpm extension. It can be extracted using the below command:

rpm2cpio <rpm filename> | cpio -idmv

This will extract files under the current directory. Pass the <image>.img file to this script. โœจ

๐Ÿฆ‹ AIX format image

For older "AIX format" images, the file will have a .BIN extension. This zip file happens to be an AIX binary, but it can be extracted with the unzip command (with password from the web page):

unzip 70286C4F.BIN

This should produce a file with a .img extension. This image file is what should be flashed. And that's the tea. ๐Ÿซ–


that's the whole page, you ate it up ๐Ÿ‘‘ โ€” this one's from the Linux manual, dated 8 May 2013, and it's UPDATE_FLASH(8) all the way through. go forth and flash responsibly, mwah ๐Ÿ’œ๐ŸŽ€

๐Ÿ“ฆ where this page comes from