Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Oct 1999 12:24:18 -0400
From:      "Gary T. Corcoran" <garycor@home.com>
To:        freebsd-fs@freebsd.org
Subject:   Read-only error when newfs'ing
Message-ID:  <37F8D4B2.4C980AD0@home.com>

next in thread | raw e-mail | index | archive | help

I give up! :)  Help!
I searched the email archives and found no messages at
all relating to this error.

I recently upgraded from FreeBSD 2.2.5 to 3.2-RELEASE,
then added a new Promise Ultra/66 IDE controller and
two IBM 36G ("37.5G") drives.  I've been struggling to
try to get the new controller and disks going on my system.
I'll report on that later to other lists.
(BTW, the disks work fine under Win98)

But my current problem is now that I think I have the
controller working, I can't newfs the disk.  I keep getting
the error:

newfs: wtfs: Read-only file system

Now since I'm trying to *create* the file system, this
seems very strange.  Nevertheless, I saw in The Complete FreeBSD
something about the disk label possibly being "write protected".
I tried disklabel -W, and that had no effect.  I tried using dd
to write 200 zero sectors to the "beginning" of the disk, but
that didn't help.  I got desperate and booted Win98 and used
tools to wipe some sectors and format the whole disk there
(I changed the FreeBSD partition into a Win98 partition and
 used the DOS format command, then changed the partition type
 back to FreeBSD)

When I went back to FreeBSD, fdisk showed the partitions (a
small 200M DOS partition and the 35G FreeBSD partition), and
complained about no disk label.  So far so good.  I then
wrote the disk label using this prototype file:

# /dev/rwd6:
type: ESDI
disk: DeskStar36
label: FreeBSD
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 4534
sectors/unit: 72838710
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

3 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 72710190        0    unused        0     0         # (Cyl. 0 - 4525)
  b: 128520   72710190    swap                          # (Cyl. 4526 - 4533)
  c: 72838710        0    unused        0     0       	# (Cyl.    0 - 4533*)

and a "disklabel -r" showed the above info was on the disk.

Then I tried "newfs -m 0 /dev/rwd6a", it again went through all the motions,
writing a few thousand (why? :) backup superblock numbers to the screen,
and then again I got the Read-only file system error.

BTW, I forgot to mention that I tried using sysinstall to do
everything, starting from a new fdisk of the disk, but that also
resulted in an error after its newfs.

Questions:
1. What <bleep>ing sector holds the "read only" bit so I can zero
out just that sector to remove the "write protection"? (if I want
to start over from scratch)

2. Why am I getting this "Read-only" error in the first place?
(and what does it really mean?)

Thanks,
Gary


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37F8D4B2.4C980AD0>