Kernel Panic when reading/writing to fd0

Kernel Panic when reading/writing to fd0

Post by NOSp » Mon, 13 Dec 1999 04:00:00



Would any one be able to tell me what the cause for
a kernel painc when reading or writing to floppy drive

messages were:
/kernel: fd0c: hard error writing fsbn 19 (ST0 40<abnrml>
ST1 2<write_protect> ST2 0 cyl 0 hd 1 sec 2)
/kernel: fd0c: hard error writing fsbn 19 (ST0 40<abnrml>
ST1 2<write_protect> ST2 0 cyl 0 hd 1 sec 2)
/kernel: fd0c: hard error writing fsbn 19 (ST0 40<abnrml>
ST1 2<write_protect> ST2 0 cyl 0 hd 1 sec 2)
/kernel: fd0c: hard error writing fsbn 19 (ST0 40<abnrml>
ST1 2<write_protect> ST2 0 cyl 0 hd 1 sec 2)
--Kernel panic---

this has happened 3 times (every time i tried it)

Running FreeBSD3.2

 
 
 

Kernel Panic when reading/writing to fd0

Post by J Wuns » Fri, 17 Dec 1999 04:00:00



> Would any one be able to tell me what the cause for
> a kernel painc when reading or writing to floppy drive

> messages were:
> /kernel: fd0c: hard error writing fsbn 19 (ST0 40<abnrml>
> ST1 2<write_protect> ST2 0 cyl 0 hd 1 sec 2)

That shouldn't happen when reading it... (because it's a
`write protect' error).

Anyway, don't use /dev/fd0 for things like tar etc., always use
/dev/rfd0 (except in order to mount a floppy).  This has been
discussed to death, and now finally the user-visible block devices are
gone away (in -current).

--
cheers, J"org


Never trust an operating system you don't have sources for. ;-)

 
 
 

1. accessing /dev/fd0 directly for sector reads/writes

Hi there,

I'm getting into some operating system development, and it would make my
life a lot easier right now if I could use the Linux device drivers for
the time being to format my disks and such.

My question then becomes, how can I use /dev/fd0 directly?  I realise
I'd have to be root, that's no problem.  My understanding would be that
I can just open /dev/fd0 as a file and read and write to it.  I tried
this, but had some troubles.  I think I was reading correctly, but not
writting.

I know a "cat /dev/fd0" will give me the contents of the disk, so it
obviously acts as if it's a file, but it's actually a block device.
Does this mean that "fseek(file, 10, SEEK_SET)" will get me to the 10th
byte, or the 10th block?  If block, how do I find out the size (I'm
assuming it'd be 512 bytes, for a regular disk) of the block?

Any information on this topic would be helpfull.

Thanks,
Jeff

PS: Please respond via email if possible.

--------------------------------------------
            - Code X Software -
       Programming to a Higher Power


        web:   http://www.codex.nu/
--------------------------------------------

2. font strangeness from xterm and emacs

3. kernel panic; /dev/fd0

4. HELP w Compile Defines

5. Sockets: write() writes OK, yet read() reads garbage...?

6. WANTED: Source code for rlogin

7. exabyte 8200 Tape drive Linux 1.1.59 system Panics on read or write

8. emacs 19.xx and ispell

9. Kernel Panics Unable to write inode

10. Help : Kernel panic unable to write inode

11. kernel panic while cd writing

12. Kernel Panic w/ write-protected floppy

13. Kernel panic with write