Dd /
Flashing USB Image
First, check which disk is the USB drive:
$ dmesg | grep -E 'sd[0-9]' sd0 at scsibus3 targ 1 lun 0: <Generic, Mass-Storage, 1.09> removable serial.19080225120218120009 sd0: 121001MB, 512 bytes/sector, 247810048 sectors
You can often identify the USB drive by the amount of available storage space (above 128GB). In this case, the drive is also labeled as Generic, Mass-Storage
. Our USB is device sd0.
WARNING: Triple check the next command before executing it. Do NOT blindly copy and paste the below command. You MUST have the correct disk or you might overwrite an existing disk and delete all its data.
To flash the USB image:
# dd if=install*.img of=/dev/rsd0c bs=1M
Replace install*.img
with the correct path to the OpenBSD image
file.
Note: the letter r
indicates we write to the raw device rsd0c rather than sd0c (the block device). We use partition letter c
to indicate the entire disk.
Once done,
# eject /dev/rsd0c