Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Aug 1997 10:54:16 -0500
From:      Zach Heilig <zach@gaffaneys.com>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        questions@freebsd.org
Subject:   Re: Is that floppy write-protected?
Message-ID:  <19970831105416.59270@gaffaneys.com>
In-Reply-To: <Pine.BSF.3.96.970830222053.664N-100000@localhost>; from Doug White <dwhite@gdi.uoregon.edu> on Sat, Aug 30, 1997 at 10:22:04PM -0700
References:  <19970828085510.60034@gaffaneys.com> <Pine.BSF.3.96.970830222053.664N-100000@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 30, 1997 at 10:22:04PM -0700, Doug White wrote:
> > If you mount a write-protected flopp, and remove a file on it, the script
> > can't tell if the file was really removed or not (it sure looks like it was
> > removed from the scripts point of view).

> Check the return value from `rm'; if it's >0 then something bad happened.

see apended log [1]...

> > I know I could unmount the floppy, remount it, and test if the files are
> > really gone, but then /var/log/messages becomes full of needless
> > write-protected floppy errors.  This is what I ended up doing, but it
> > would be nice if there were a better solution.

> How about re-read the directory following the `rm'?  If rm trashed the
> file then the dir re-read should show it's gone.

The file is gone, from the operating systems point of view.  It just can't
tell the floppy that.  It would probably be good if mount(1) would autodetect
read-only media, and mount it read-only. :-).  Unfortunately, there are many
types of media...

**

[1] That won't quite work right.  This log shows what I'm talking about, all
the commands returned success (0), PS1="$? # ".

Script started on Sun Aug 31 10:31:58 1997
$ su -l
Password:
0 # mount /fd0
0 # ls -l /fd0
total 997
-r--r--r--  1 root  wheel       19 Aug 11 20:37 boot.config
-r-xr-xr-x  1 root  wheel  1013840 Aug 25 09:36 kernel
0 # rm /fd0/kernel
0 # ls -l /fd0
total 1
-r--r--r--  1 root  wheel  19 Aug 11 20:37 boot.config
0 # umount /fd0
0 # mount /fd0
0 # ls -l /fd0
total 997
-r--r--r--  1 root  wheel       19 Aug 11 20:37 boot.config
-r-xr-xr-x  1 root  wheel  1013840 Aug 25 09:36 kernel
0 # umount /fd0
0 # exit
$ 
Script done on Sun Aug 31 10:32:48 1997

These are the entries from /var/log/messages:

Aug 31 10:32:07 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 17)
Aug 31 10:32:07 murkwood /kernel: fd0c: hard error writing fsbn 64
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 11)
Aug 31 10:32:21 murkwood /kernel: fd0c: hard error writing fsbn 48
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 0 sec 13)
Aug 31 10:32:21 murkwood /kernel: fd0c: hard error writing fsbn 56 of 56-63
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 3)
Aug 31 10:32:22 murkwood /kernel: fd0c: hard error writing fsbn 648
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 18 hd 0 sec 1)
Aug 31 10:32:23 murkwood /kernel: fd0c: hard error writing fsbn 1200
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 33 hd 0 sec 13)
Aug 31 10:32:23 murkwood /kernel: fd0c: hard error writing fsbn 1800
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 50 hd 0 sec 1)
Aug 31 10:32:24 murkwood /kernel: fd0c: hard error writing fsbn 2352
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 65 hd 0 sec 13)
Aug 31 10:32:26 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 17)
Aug 31 10:32:27 murkwood /kernel: fd0c: hard error writing fsbn 64
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 11)
Aug 31 10:32:27 murkwood /kernel: fd0c: hard error writing fsbn 72
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 2 hd 0 sec 1)
Aug 31 10:32:28 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 17)
Aug 31 10:32:29 murkwood /kernel: fd0c: hard error writing fsbn 64
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 11)
Aug 31 10:32:34 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 17)
Aug 31 10:32:34 murkwood /kernel: fd0c: hard error writing fsbn 64
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 11)
Aug 31 10:32:42 murkwood /kernel: fd0c: hard error writing fsbn 56 of 56-63
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 3)
Aug 31 10:32:42 murkwood /kernel: fd0c: hard error writing fsbn 64
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 11)
Aug 31 10:32:44 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 17)
Aug 31 10:32:45 murkwood /kernel: fd0c: hard error writing fsbn 16 of 16-18
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 17)
Aug 31 10:32:45 murkwood /kernel: fd0c: hard error writing fsbn 64
                (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 1 hd 1 sec 11)


-- 
Zach Heilig (zach@gaffaneys.com) -- Actually it's all quite simple.  A
technician at JPL messed up, and mixed a couple of frames between different
films.  The 'missing' engine flames from the apollo 11 LM ended up as the
'muzzle flashes' on the grassy knoll in the Zapruder film... [Chris Stratton]



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