On 7/24/19 10:19 PM, Zhi-Qiang Lei wrote:
Hi, I’m trying to encrypt a DVD-RAM before putting some files onto it on my 
OpenBSD 6.5 desktop. But neither dd nor disklabel seems able to work on the 
drive. Did I miss something?

$ dmesg | grep cd
cd0 at scsibus3 targ 1 lun 0: <HL-DT-ST, BD-RE BU40N, FR07> ATAPI 5/cdrom 
removable serial.13fd3940302020202020
cd0 at scsibus3 targ 1 lun 0: <HL-DT-ST, BD-RE BU40N, FR07> ATAPI 5/cdrom 
removable serial.13fd3940302020202020

$ doas dd if=/dev/urandom of=/dev/rcd0c bs=1k
dd: /dev/rcd0c: Invalid argument
1+0 records in
0+0 records out
0 bytes transferred in 0.000 secs (0 bytes/sec)

$ doas disklabel -E cd0
cd0> a
partition: [a]
offset: [0]
size: [2236704]
FS type: [4.2BSD]
cd0> w
cd0> p
OpenBSD area: 0-2236704; size: 2236704; free: 0
#                size           offset  fstype [fsize bsize   cpg]
   a:          2236704                0  4.2BSD   2048 16384     1
   c:          2236704                0  unused
cd0> q
No label changes.

The same drive can be formatted and used on Mac OS X.

Thanks and best regards,
Siegfried

Did you try 2K blocks? The low level of CDROM only works that way.

Reply via email to