Tested on OpenBSD 6.3

Make bootable image with geteltorito(1) and dd(1)

For example, make a bootable USB disk to update BIOS on ThinkPad X1 Carbon 6th gen with ISO provided by Lenovo.

Download BIOS Update 1.30 06 Sep 2018 and verify the checksum:

$ ftp -V https://download.lenovo.com/pccbbs/mobiles/n23ur11w.iso
n23ur11w.iso 100% |**************************| 21868 KB    00:16
$ sha256 n23ur11w.iso
SHA256 (n23ur11w.iso) = e308a5...

Install geteltorito(1) and convert the ISO to El Torito boot image.

$ doas pkg_add geteltorito
$ geteltorito -o bios.img n23ur11w.iso
Booting catalog starts at sector: 20
Manufacturer of CD: NERO BURNING ROM VER 12
Image architecture: x86
Boot media type is: harddisk
El Torito image starts at sector 27 and has 43008 sector(s) of 512 Bytes
$ sha256 bios.img
SHA256 (bios.img) = c6a11b...
$

Plug in a USB drive:

$ dmesg | grep removable | tail -n1
sd3 at scsibus5 targ 1 lun 0: <Vendor, Model, 1.11>
SCSI3 0/direct removable serial.12345678901234567890987654

In this case it appears as sd3.

Copy the image (replace /dev/rsdXc with your drive). For example, for sd3 that would be /dev/rsd3c, where r means raw and c is a whole device. All data on sdX will be erased!

# dd if=bios.img of=/dev/rsdXc bs=1m
21+0 records in
21+0 records out
22020096 bytes transferred in 2.201 secs (10002851 bytes/sec)
#

Check the content of the drive:

# disklabel sdX
# /dev/rsd3c:
type: SCSI
disk: SCSI disk
label: XXXXXXXXXXXXXXX
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 1945
total sectors: 31260672
boundstart: 0
boundend: 31260672
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:         31260672                0  unused
  i:            42976               32   MSDOS
# mkdir ./sdXi
# mount /dev/sdXi ./sdXi
# cd /mnt/sdXi
# find .
.
./System Volume Information
./System Volume Information/WPSettings.dat
./System Volume Information/IndexerVolumeGuid
./EFI
./EFI/Boot
./EFI/Boot/BootX64.efi
./FLASH
./FLASH/406E8.PAT
./FLASH/806E9.PAT
./FLASH/806EA.PAT
./FLASH/BCP.EVS
./FLASH/NoDCCheck_BootX64.efi
./FLASH/README.TXT
./FLASH/SHELLFLASH.EFI
./FLASH/N23ET55W
./FLASH/N23ET55W/$0AN2300.FL1
./FLASH/N23ET55W/$0AN2300.FL2
#

Reboot and flash the BIOS.


Thanks to Mikko Nyman for testing and Peter Hessler for the pointer.