Write protected floppies should be mounted read-only

Backup backup backup.

Words to live by. Nobody every regretted making a backup. In preparation for my talk,
I formated, labeled, and newfs’d a floppy and copied the
StarOffice talk to it. I also flicked over the write-protect tab for a bit of added
protection.

That indicates the system was trying to write to the floppy and was failing because the floppy was
write-protected. Ummm, but why was it trying to write? I hadn’t written anything. I only copied
something off the disk. What’s going on?

Access time

If a file is accessed, the access time on the file is updated. That’s what was being updated.
That’s why the system was trying to write to the floppy. Access time is useful if you are trying
to find out how “used” a file is. If it’s not been access in a while, why keep it around?

First I create a file, test. Then I view the details of the file. Then I view
the time full details (T) and the access time instead of the modification time
(u). Then I access the file using more and check the times
again. You’ll see how they change.

Work around

I was able to unmount the floppy by doing this:

take out the floppy

adjust the write-protect tab

insert the floppy

umount /mnt

The right thing

The right thing to do is to mount the floppy read-only:

mount -r /dev/fd0 /mnt

Then I went back and tried again. No problems. The unmount worked fine.

I talked to some FreeBSD developers about this problem. They helped me to find out
the cause of the problem and come to the work around. Then they started talked about rewriting
the fd driver to take notice of the write-protect tab…. That’s an
interesting example of how things change. A problem comes up. Someone decides to solve it.

Why use flopiies? We use write-protected floppies to keep our AIDE database on critical machines. If we get rooted, the bad-guy can’t change the AIDE db unless he is physically present to slide the write-protect tab on the floppy. An alarm gets set off if either AIDE finds an error or if AIDE is not run at least once an hour

Which also means that anytime I make a change on one of these machines, I have to remember to umount the diskette, slide the tab, remount it rw, remake the AIDE db, unmount, reslide, remount ro. In any round of security patches I generally set off at least one alarm inadvertantly.

What I heard! Try to work with write-protected floppy now don’t cause system panic? I woldn’t check, thank you…Many times before my box panics when I have fogrotten to check read-wtire curtain on floppy…I think fd0 driver MUST check read-write curtain before mounting and refuse to mount (or force to read-only), when curtain is open. For my pity, many developers hasn’t interest to correct this bug (O, very long-stading bug, since 2.2.5 🙂 ), said "Floppy is obsolete as media and non-interest". Probably, it is obsoleted. But device exist and supported. Why is it buggy?