Subject: Can't format 640MB optical disk
To: None <netbsd-help@netbsd.org>
From: Trevin Beattie <trevin@xmission.com>
List: netbsd-help
Date: 01/16/2000 14:53:28
I'm sure this was covered several months ago, but I can't find the
reference.  I have a Fujitsu 640MB optical drive, whose reported
geometry is 2048bps, 32spt, 64tpc, and 151-odd cyl (310352 2048-byte
sectors).  I've tried to label it with disklabel and then format it
with newfs, but keep coming across very strange errors.

The command 'disklabel -w -r /dev/sd2d mo640' seems to run without
error, but when I follow it with 'disklabel -r /dev/sd2d', I get the
error "disklabel: no disk label".

If I run 'disklabel -w -r /dev/rsd2d mo640', and follow with
'disklabel -r /dev/rsd2d', then I get a correct-looking disk label. 
But 'disklabel -r /dev/sd2d' still complains "disklabel: no disk
label".

Even worse, if I run disklabel without the -r option, it shows me:
4 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  d:  1241408        0     unused        0     0       #(Cyl.0-606*)
boot block size 0
disklabel: super block size 0
disklabel: partition d: partition extends past end of unit

which is clearly incorrect.

Next, if I try to format the disk with newfs using 'newfs
/dev/rsd2a', I get the error:
write error: 310351
wtfs: Invalid argument

So I tried using 'newfs /dev/sd2a' and I got:
newfs: /dev/sd2a: not a character-special device
Warning: 944 sector(s) in last cylinder unallocated
/dev/sd2a:      310352 sectors in 152 cylinders of 64 tracks, 32
sectors
        606.2MB in 10 cyl groups (16 c/g, 64.00MB/g, 7680 i/g)
super-block backups (for fsck -b #) at:
 8, 32808, 65608, 98408, 131208, 164008, 196808, 229608,
 262408, 295208,
write error: 4
wtfs: Read-only file system

which really doesn't make sense since the disk is not
write-protected.  What gives?

--- Trevin Beattie
After a number of decimal places, nobody gives a damn.