lkml.org 
[lkml]   [2001]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPROBLEM: Remounting write-protected floppy
Hi,

is this a bug or am I missing something? I'm
not at all a kernel hacker.

1. Remounting write-protected floppy

2. It is possible to remount a write-protected,
read-only mounted floppy disk as read-writeable,
and write and remove files on it. The result
is weird, depends on what you're doing

3. floppy, mount, filesystem, VFS

4. Kernel: 2.2.19 and 2.2.18 (unpatched)
mount 2.10m (NFS patched, and unpatched originating SuSE 7.0)

5. Kernel warnings: (a lot)
Apr 26 10:25:07 max kernel: floppy0: Drive is write protected
Apr 26 10:25:07 max kernel: end_request: I/O error, dev 02:00\
(floppy), sector 82

6. Procedure:
-------------------------------------------------------------------
Using an ext2-formatted, write-protected HD (1.44) floppy:

max:~ # mount /dev/fd0 /floppy -t ext2
mount: block device /dev/fd0 is write-protected, mounting read-only
max:~ # mount /dev/fd0 /floppy -t ext2 -o remount,rw
max:~ # ls -l /floppy
total 765
drwxr-xr-x 3 root root 1024 Apr 26 08:35 .
drwxr-xr-x 20 root root 4096 Jan 16 23:42 ..
-rw-r--r-- 1 root root 761016 Apr 26 08:35 bzImage
drwxr-xr-x 2 root root 12288 Apr 26 08:33 lost+found
max:~ # echo empty > /floppy/bzImage
max:~ # ls -l /floppy
total 18
drwxr-xr-x 3 root root 1024 Apr 26 08:35 .
drwxr-xr-x 20 root root 4096 Jan 16 23:42 ..
-rw-r--r-- 1 root root 6 Apr 26 10:57 bzImage
drwxr-xr-x 2 root root 12288 Apr 26 08:33 lost+found
max:~ # cat /floppy/bzImage
¸À?ظmax:~ #

The last command sometimes writes "empty" instead of the old
content of bzImage as above.
-------------------------------------------------------------------

7. Environment
-------------------------------------------------------------------
Linux max 2.2.18 #2 Sun Mar 4 13:56:26 CET 2001 i586 unknown
Kernel modules 2.3.11
Gnu C 2.95.2
Binutils 2.9.5.0.24
Linux C Library x 1 root root \
4070534 Sep 5 2000 /lib/libc.so.6
Dynamic linker ldd (GNU libc) 2.1.3
Procps 2.0.6
Mount 2.10m
Net-tools 1.56
Kbd 0.99
Sh-utils 2.0
Modules Loaded snd-seq-midi snd-seq-midi-event\
snd-seq snd-card-cs4232 isapnp snd-mpu401-uart snd-rawmidi\
snd-seq-device snd-cs4231 snd-mixer snd-pcm snd-opl3\
snd-hwdep snd-timer snd
-------------------------------------------------------------------

Regards,

Christian

P.S.: If you answer, please CC: me, I'm not on the list.

--
* Christian Knoke +49 4852 92248 *
* D-25541 Brunsbuettel Wurtleutetweute 49 *
* * * * * * * * * Ceterum censeo Microsoft esse dividendum.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.040 / U:0.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site