I mis-understood your first post, Teng. The .iso image confused me and I
thought you were trying to write to optical media.
It sounds like you needed to simply mount the USB removable mass storage to
/mnt. Oddly enough, I can't find a directly relevant entry for this in the
OpenBSD FAQ to link to, though it seems like a common-enough task. I'll
outline some simple steps for you (and maybe submit a diff for the
Multimedia FAQ with some more refinement).
Typically, /mnt doesn't have any files in it before you mount it. You
should move them somewhere else to avoid confusion.
Use disklabel(8) to determine the partition you want to mount. Many
pre-formatted USB drives have a MSDOS/FAT filesystem on partition i. For
example, on my laptop, the USB stick I inserted showed up as sd2, since sd1
is taken by the built-in media card reader. disklabel shows two entries (c
is always a meta-partition that means "whole disk") and the one I want to
mount is sd2i.
[***@zodiac ~]$ doas disklabel sd2
disk: SCSI disk
total sectors: 118672
# size offset fstype [fsize bsize cpg]
c: 118672 0 unused
i: 118543 32 MSDOS
[***@zodiac ~]$ doas mount /dev/sd2i /mnt
As you can see below, /mnt is on /dev/sd2i and ready to use.
[***@zodiac ~]$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0a 8.2G 7.3G 533M 93% /
/dev/sd0l 59.6G 4.1G 52.5G 7% /home
/dev/sd2i 57.8M 30.4M 27.4M 53% /mnt
Any files you copy to /mnt ought to show up on the removable media now.
Remember to umount /mnt when you're done. As Ted stated, you may also wish
to use tar to archive files to external media instead.
i bought two DVD+R discs,and storage 01.iso using the way you told me
(the FAQ), it works fine. Thank you very much for your advice.
And at the same time,i realize that the DVD+RW actually can replace the
least in terms of storaging files(because they can both be written a
If you look carefully at the man page for dd(1), you'll see that you can
use it to write an image file directly to the block device. This is good
for writing the contents of installXX.fs to a USB stick, or for making
images of removable media. It's not the recommended way to burn an ISO to
optical media, though.
The man pages for mkhybrid(8) and cdio(1) are also worth a look.
To directly answer your question, the steps you likely need to take
(assuming your burner is cd1... you didn't paste your entire dmesg, so I
mkhybrid -R -o 01.iso /mnt
cdio -f cd1c tao 01.iso
Post by Teng Zhang
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
$ doas vnconfig vnd0 01.iso
$ doas mount /dev/vnd0c /mnt
$ uname -a
OpenBSD zhangteng.my.domain 5.9 GENERIC.MP#1888 amd64
/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)
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
sd1: 7632MB, 512 bytes/sector, 15630336 sectors