Bug 74080

Summary: Ext2 formatted diskette handling is broken
Product: [Retired] Red Hat Linux Reporter: alan
Component: kernelAssignee: Stephen Tweedie <sct>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: johnleddy
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-27 18:55:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description alan 2002-09-15 06:43:28 UTC
Description of Problem:


Version-Release number of selected component (if applicable):


How Reproducible:
100%

Steps to Reproduce:
1. Format a floppy as ext2 using gfloppy
2. Given the following table entry in /etc/fstab
       /dev/fd0    /mnt/floppy 	 ext2    noauto,owner	0 0
   mount the floppy with the command
       mount /mnt/floppy
3. Copy a file to the floppy  (file is 52k large)
4. Unmount the floppy, using either 
       umount /mnt/floppy
   or right click the floppy icon on the desktop and choose
   the unmount menu item
5. Now try to remount the floppy
       mount /mnt/floppy
   You get the error message 
       mount: wrong fs type, bad option, bad superblock on /dev/fd0,
       or too many mounted file systems

Actual results:
    You can only mount a floppy once, if you write to it

Expected Results:
    You should be able to mount and unmount a floppy as
    often as you like. 

Additional Information:
    There does not seem to be a problem with DOS preformatted
    diskettes.

Comment 1 Stephen Tweedie 2002-09-16 18:28:03 UTC
Are there any log messages shown in /var/log/messages from the kernel when you
do this?

Comment 2 alan 2002-09-16 19:20:28 UTC
Yes, there is the following info in the system log:

Sep 16 12:05:49 baldr kernel: EXT2-fs error (device fd(2,0)):
ext2_check_descriptors: Block bitmap for group 0 not in group (block 3715377212)!
Sep 16 12:05:50 baldr kernel: EXT2-fs: group descriptors corrupted!
Sep 16 12:16:17 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 4
Sep 16 12:16:18 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 5
Sep 16 12:16:18 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 8
Sep 16 12:16:18 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 13
Sep 16 12:16:18 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 16
Sep 16 12:16:18 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 17
Sep 16 12:16:19 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 21
Sep 16 12:16:19 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 24
Sep 16 12:16:19 baldr kernel: EXT2-fs error (device fd(2,0)): ext2_new_block:
Allocating block in system zone - block = 26
Sep 16 12:16:41 baldr kernel: EXT2-fs error (device fd(2,0)):
ext2_check_descriptors: Block bitmap for group 0 not in group (block 3715377212)!
Sep 16 12:16:41 baldr kernel: EXT2-fs: group descriptors corrupted!
~

Comment 3 Stephen Tweedie 2002-09-16 19:36:26 UTC
That's a sign of a corrupt floppy.  It could be gfloppy blowing up, or a bad
disk, or a drive fault, or a kernel fault.

Could you try formatting the disk manually and see what happens?  Use fdformat
then mke2fs to do a manual format.

Comment 4 alan 2002-09-16 21:58:26 UTC
I do not believe this is a drive problem, because I have observed
the exact same behavior on two different systems.

I do not believe this is a diskette problem.  I have used several
different diskettes.  I have verified that these same diskettes
work just fine, when formated by M$windows.

I tried using fdformat and mke2fs to prepare a diskette.  Here's what
I found:

1.  As an ordinary user I did not have permission to copy a file to
    /mnt/floppy.  

2.  As root, mounting, copying and unmounting worked as expected.

Of course, requiring root privilege to use a floppy disk is 
not acceptable.

Comment 5 Mike McLean 2003-01-02 20:01:06 UTC
This bug has been inappropriately marked MODIFIED. Please review the bug life
cycle information at 
http://bugzilla.redhat.com/bugzilla/bug_status.cgi

Changing bug status to ASSIGNED.

Comment 6 John R Leddy 2003-01-03 11:26:46 UTC
Looks like I might have duplicated this problem at bug80949.
I too can confirm this is not a problem with the floppy disks themselves.
My CD-RW also behaves the same way.
I notice this report is dated 2002-09-15;
I have a complete website, hopefully only 'trapped', on my disks.
Not quite the way I wanted to start the new year, but **** happens!
The thought of rebuilding the site from the ground up evokes seriously
unhealthy emotions.
Still, a lesson well learned I'd say.
Why I gave myself the extra work of re-formatting perfectly usable disks
I'll never know.
Anyway, trivial problems aside; What happened to the community's rep for
issuing fixes quicker than 'you know who' then ....

Comment 7 John R Leddy 2003-01-04 11:22:02 UTC
Is this a contributing factor for Nilmoni's problem at bug75030 ?

Comment 8 Stephen Tweedie 2003-01-06 13:19:02 UTC
If everything works fine with manual mke2fs, then it may be gfloppy incorrectly
initialising things.  If you use gfloppy to reproduce the problem, what does
/proc/mounts show as the filesystem type after both the first and second mounts?
 Using gfloppy for the format, can you try an immediate e2fsck on it and see if
there is anything wrong with the formatting?

Comment 9 Mike McLean 2004-02-27 18:00:15 UTC
This bug has been in NEEDINFO for over a year.