Hi, What are you trying to do?
If you're after files which are on the ISO image, then cp(1) will do just fine - simply mount the USB disk and copy the files. Unless of course, you're trying to create a bootable USB stick out of a bootable ISO image - neither cp(1) nor tar(1) will do the job in this case and you will need to use dd(1). Again, if this is indeed the case, *and* you are trying to create a bootable OpenBSD USB install medium, ISO won't work in this case - you'll need to use either the minirootXX.fs or installXX.fs images[0] Regards, Raf [0] http://www.openbsd.org/faq/faq4.html#MkInsMedia On Thu, Aug 04, 2016 at 02:43:20AM BST, Teng Zhang wrote: > hi, i want to write all files in /mnt to usb,so i issued the command: > > doas dd if=/mnt of=/dev/rsd1c bs=5M > > but it failed. I'm not pretty understand the way to operate dd, so > could you please tell me how can i operate it to write the files to > usb? > Some information about my system: > > the files in /mnt is created like this: > > $ doas vnconfig vnd0 01.iso > $ doas mount /dev/vnd0c /mnt > > $ uname -a > OpenBSD zhangteng.my.domain 5.9 GENERIC.MP#1888 amd64 > > $ mount > /dev/sd0a on / type ffs (local) > /dev/sd0m on /home type ffs (local, nodev, nosuid) > /dev/sd0d on /tmp type ffs (local, nodev, nosuid) > /dev/sd0f on /usr type ffs (local, nodev) > /dev/sd0g on /usr/X11R6 type ffs (local, nodev) > /dev/sd0h on /usr/local type ffs (local, nodev) > /dev/sd0l on /usr/obj type ffs (local, nodev, nosuid) > /dev/sd0k on /usr/src type ffs (local, nodev, nosuid) > /dev/sd0e on /var type ffs (local, nodev, nosuid) > /dev/vnd0c on /mnt type cd9660 (local, read-only) > > dmesg: > umass0 at uhub2 port 1 configuration 1 interface 0 "SanDisk Cruzer Edge" rev > 2.10/1.00 addr 3 > umass0: using SCSI over Bulk-Only > scsibus2 at umass0: 2 targets, initiator 0 > sd1 at scsibus2 targ 1 lun 0: <SanDisk, Cruzer Edge, 1.00> SCSI4 0/direct > removable serial.0781556b970715105252 > sd1: 7632MB, 512 bytes/sector, 15630336 sectors