LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Can't write to floppy (http://www.linuxquestions.org/questions/linux-hardware-18/cant-write-to-floppy-790173/)

dbbolton 02-19-2010 07:51 AM

Can't write to floppy
 
I am trying to write a floppy boot image to my floppy drive (as root):
Code:

dd if=boot.img of=/dev/fd0
dd: opening `/dev/fd0': Read-only file system

But it is mounted as rw in my fstab:
Code:

/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0
When I try to mount it manually:
Code:

mount /dev/fd0
mount: block device /dev/fd0 is write-protected, mounting read-only

And it appears root has rw privileges:
Code:

ll /dev/fd0
brw-rw---- 1 root floppy 2, 0 2010-02-18 21:50 /dev/fd0



I also tried uncommenting the line in /etc/fstab, rebooting, then mounting it manually:
Code:

mount -t vfat /dev/fd0 /media/floppy
mount: block device /dev/fd0 is write-protected, mounting read-only
mount: /dev/fd0: can't read superblock

Here is the dmesg output:
Code:

[ 4775.928065] last result at 4296085528
[ 4775.928067] last redo_fd_request at 4296085528
[ 4775.928068] 20  0
[ 4775.928077] status=50
[ 4775.928079] fdc_busy=1
[ 4775.928080] do_floppy=ffffffffa01283bc
[ 4775.928082] fd_timer.function=ffffffffa012bb6b
[ 4775.928083] cont=ffffffffa012fe50
[ 4775.928085] current_req=ffff88005d4e4d20
[ 4775.928087] command_status=-1
[ 4775.928088]
[ 4775.928091] floppy0: floppy timeout called
[ 4775.928096] end_request: I/O error, dev fd0, sector 0

I have tried several disks, with the safety tab in both positions (to ensure that I tried it when it was unlocked), but it is always the same result.

What is the problem here?

allend 02-19-2010 08:02 AM

From 'man mount':
Quote:

Mount options for msdos
See mount options for fat. If the msdos file system detects an inconsistency, it reports an error and sets the file system read-only. The file system can be made writeable again by remounting it.
You may have the disk formatted as FAT16 rather than FAT32.
Try 'mount -t msdos /dev/fd0 /media/floppy'.

HasC 02-19-2010 08:04 AM

Floppy drive busted, perhaps?

Could you get another drive? Surely could not be very hard to do

HasC 02-19-2010 08:06 AM

Quote:

Originally Posted by allend (Post 3869313)
From 'man mount':

You may have the disk formatted as FAT16 rather than FAT32.
Try 'mount -t msdos /dev/fd0 /media/floppy'.

But that doesn't explain the dd error.

Unless, its user isn't root nor member of group "floppy"

allend 02-19-2010 08:10 AM

@HasC
Quote:

But that doesn't explain the dd error.
Ah, doh! Good point.

dbbolton 02-19-2010 08:21 AM

Quote:

Originally Posted by allend (Post 3869313)
From 'man mount':

You may have the disk formatted as FAT16 rather than FAT32.
Try 'mount -t msdos /dev/fd0 /media/floppy'.

Code:

mount -t msdos /dev/fd0 /media/floppy
mount: block device /dev/fd0 is write-protected, mounting read-only
mount: /dev/fd0: can't read superblock


michaelk 02-19-2010 08:28 AM

As already suggested I suspect the drive is bad.
Is this a dual boot PC where you can check it with another OS?

dbbolton 02-19-2010 08:34 AM

Quote:

Originally Posted by michaelk (Post 3869345)
As already suggested I suspect the drive is bad.
Is this a dual boot PC where you can check it with another OS?

The drive very well could be bad. It's fairly old.

It is a dual boot machine: Debian amd64 and Debian i386. I suspect that I will get the same results on the i386 system, but I will try it anyway.

dbbolton 02-19-2010 11:18 AM

I tried in the i386 system and got the same messages.

lexrexus 01-13-2012 12:39 AM

Floppy tests? Here's one:
 
Above someone said dos sets to read only when something isn't working right, or close to that - w/out giving an error? And in another post says something about can't read a block - or something like that. So, try fsck - Used to check and repair a filesystem.
fsck is a front end to a filesystem type specific fsck.ext2, fsck.minix, and fsck.msdos.
Syntax: fsck -t type device
Like fsck -t msdos /dev/fd0

This post is still here, so this is a timely reply.
I've noticed that few will help w/floppy problems anymore
So the odds r great that this will benefit someone stuck w/legacy tools, reading through what their search came up with. : ]
Tnx!!

business_kid 01-13-2012 07:50 AM

From my experience, you can mount a msdos/vfat system with either option and they sort themselves out - if you have them in the kernel.

You need kernel based floppy support, (perhaps including some legacy stuff) and msdos & vfat support (vfat supports msdos anyhow).

I suspect
1. You don't have kernel support
2. The read/write function in the floppy is bad.

nigelc 01-14-2012 06:21 AM

Hello,
Have you tried to read from the floppy?
Try & see if will read first as writing is harder to do.

cheers


All times are GMT -5. The time now is 10:56 AM.