Subject: newfs: ioctl (WDINFO): Inappropriate ioctl for device
To: None <port-sparc@sun-lamp.cs.berkeley.edu>
From: - Greg Earle <earle@isolar.Tujunga.CA.US>
List: port-sparc
Date: 05/14/1994 01:34:52
I just decided to wipe my IPC clean and start from Ground Zero with Theo's
latest snapshot.

I'm up in single-user mode at the moment and decided to give "newfs" a
whirl on my 1 Gb external disk.  It has an existing SunOS label, and I was
using the whole thing as /usr/src.

I ran "newfs -m 5 -i 8192 /dev/rsd1c" and it made the new file system, but at
the end I got the message

	newfs: ioctl (WDINFO): Inappropriate ioctl for device
	newfs: /dev/rsd1c: can't rewrite disk label

I then tried "disklabel -r sd1c" and got

	Bad pack magic number (label is damaged, or pack is unlabeled)
	# /dev/rsd1c:
	type: unknown
	disk:
	label:
	flags:
	bytes/sector: 512
	sectors/track: 79
	tracks/cylinder: 15
	sectors/cylinder: 1185
	cylinders: 1703
	rpm: 0
	interleave: 0
	trackskew: 0
	cylinderskew: 0
	headswitch: 0		# milliseconds
	track-to-track seek: 0	# milliseconds
	drivedata: 0

	8 partitions:
	#	 size    offset     fstype    [fsize bsize    cpg]
	  c:  2018055         0     4.2BSD      1024  8192     16   # Cyl. 0 -
	Warning, revolutions/minute 0

	boot block size 0
	super block size 0

If I do "disklabel -e sd1c", and leave it unchanged, I get a complaint about
"line 11: 0: bad rpm" and "line 12: 0: bad interleave" and another warning
about rpm being 0.

Since I can still mount it OK, I guess I'm just curious - it appears that the
disklabel stuff is nearly all there, but missing a couple of bits.  And I was
wondering if I were to have gone through with the edits, would it have screwed
things to bits?  Finally, I was wondering if "newfs" was thinking that the
disk was a wd disk or something, based on the ioctl() error quoted above.

So far, the new binary snapshot is a lot easier to work with in bringing it
up from scratch than the first one was.  Thanks Theo!

	- Greg


------------------------------------------------------------------------------