On Wed, Mar 09, 2011 at 01:01:17PM +0100, marc wrote: > On 3/7/2011 9:03 PM, Joachim Schipper wrote: > >I have no idea what you think you've been told, but: > > > >a) do NOT post private mail publicly - it's rude; > Sorry. I didn't realize. > > >b) follow the FAQ, including the 'r' in /dev/rsd0a - it works. > > Thanks Joachim. That's it, it works. I didn't know what rsd0a meant as > fdisk and disklabel were refering to sd0a... > > I think it would be nice to add a little note in the docs explaining > what 'r' stands for and that you should add it in front of your device > name to access it while being used.
The distinction between raw character devices and block devices is very old and fundamental in Unixes. It will be hard to add that little note in all places it might be useful. The hints are there in the docs and probably in the archives to be found... dd(1): : EXAMPLES Write an OpenBSD floppy image to a floppy disk: # dd if=floppy34.fs of=/dev/rfd0c bs=32k Create an ISO-9660 image of a CD-ROM: # dd if=/dev/rcd0c of=disk.iso bs=32k disklabel(8): : disk Specify the disk to operate on. It can be specified by its full pathname, by an abbreviated disk form, or by its disklabel UID. In its abbreviated form, the path to the device, the `r' denoting "raw device", and the partition letter, can all be omitted. For example, the first IDE disk can be specified as either /dev/rwd0c, /dev/wd0c, or wd0. FAQ 14 - Disk Setup : Partition identification An OpenBSD filesystem is identified by the disk it is on, plus the file system partition on that disk. So, file systems may be identified by identifiers like "sd0a" (the "a" partition of the first "sd" device), "wd2h" (the "h" partition of the third "wd" device), or "sd1c" (the entire second sd device). The device files would be /dev/sd0a for the block device, /dev/rsd0a would be the device file for the "raw" (character) device. > > I also think it would be great to add msdos and ntfs support in the > installation cdrom (no it's not there). Ubuntu has it, it should be > possible. There is msdos filesystem support in bsd.rd: OpenBSD 4.9-beta (RAMDISK_CD) #304: Tue Feb 1 19:19:33 MST 2011 # mount -t msdos /dev/sd0i /mnt It works just fine. The mount programs in /sbin in bsd.rd are: mount_cd9660, mount_ext2fs, mount_ffs, mount_msdos and mount_udf. There is no newfs_msdos, if that is what you mean. Nevertheless msdos filesystems are preferably created from Windows. That ramdisk kernel should be the same as on an install CD. I have used mount_msdos from bsd.rd numerous times to transfer an OpenBSD boot sector to the Windows bootloader using a msdos partition on a USB flash key. You can even partition the disk from the OpenBSD installer, create the msdos filesystem from Windows, and mount it writable from OpenBSD. > > openbcd looks interesting but it's a shame it's not open source... > > thanks everybody for your comments, > > best > marc -- / Raimo Niskanen, Erlang/OTP, Ericsson AB