Subject: Re: newfs trouble on -current
To: matthew green <mrg@eterna.com.au>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: port-sparc64
Date: 05/11/2005 20:30:26
On Thu, 12 May 2005 02:38:11 +1000
matthew green <mrg@eterna.com.au> wrote:
> disklabel -W sd0
But there was already a valid disklabel(5) on the drive as it contained
a NetBSD 2.0 instalation before. I never had to use "-W" on NetBSD
prior. (IIRC Tru64 is the only *ix I came across that needs "-W" to
make the disklabel(5) writable.)
Leaving nothing untried: (I stored the old disklabel(5) in the file "dl".)
# disklabel -W sd0
# disklabel -rR sd0 dl
write: No such file or directory
# disklabel sd0
# /dev/rsd0c:
type: unknown
disk: mydisk
label:=20
flags:
bytes/sector: 512
sectors/track: 218
tracks/cylinder: 10
sectors/cylinder: 2180
cylinders: 8152
total sectors: 17774160
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0=20
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 263780 0 4.2BSD 1024 8192 0 # (Cyl. 0 - 1=
20)
b: 525380 263780 swap # (Cyl. 121 - 3=
61)
c: 17774160 0 unused 0 0 # (Cyl. 0 - 81=
53*)
e: 2097160 789160 4.2BSD 2048 16384 0 # (Cyl. 362 - 13=
23)
f: 14887840 2886320 4.2BSD 2048 16384 0 # (Cyl. 1324 - 81=
53*)
# newfs /dev/rsd0f
/dev/rsd0f: 7269.5MB (14887840 sectors) block size 16384, fragment size 2048
using 40 cylinder groups of 181.75MB, 11632 blks, 22784 inodes.
wtfs: write error for sector 14887839: Undefined error: 0
# dd if=3D/dev/zero of=3D/dev/rsd0b bs=3D1k count=3D16
dd: /dev/rsd0b: end of device
1+0 records in
0+0 records out
0 bytes transferred in 0.008 secs (0 bytes/sec)
# dd if=3D/dev/zero of=3D/dev/sd0b bs=3D1k count=3D16
16+0 records in
16+0 records out
16384 bytes transferred in 0.083 secs (197397 bytes/sec)
# disklabel -r sd0
# /dev/rsd0c:
type: unknown
disk: mydisk
label:=20
flags:
bytes/sector: 512
sectors/track: 218
tracks/cylinder: 10
sectors/cylinder: 2180
cylinders: 8152
total sectors: 17774160
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0=20
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 263780 0 4.2BSD 1024 8192 0 # (Cyl. 0 - =
120)
b: 525380 263780 swap # (Cyl. 121 - =
361)
c: 17774160 0 unused 0 0 # (Cyl. 0 - 8=
153*)
e: 2097160 789160 4.2BSD 2048 16384 0 # (Cyl. 362 - 1=
323)
f: 14887840 2886320 4.2BSD 2048 16384 0 # (Cyl. 1324 - 8=
153*)
--=20
tsch=FC=DF,
Jochen
Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/