tested on openbsd 6.3
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.