Hi Riley,
>
> Using the format I devised for an MS-DOS compatible dump floppy, the
> equivalent test would be the following bash script...
>
> Q> #!/bin/bash
> Q> MAGIC=`dd if=/dev/fd0 bs=1 skip=3 count=8`
> Q> if [ "$MAGIC" != "LinPanic" ]; then
> Q> echo 'ERROR: This is NOT a Linux Panic Dump floppy.' >&2
> Q> exit 1
> Q> else
> Q> echo 'This is a Linux Panic Dump floppy.' >&2
> Q> exit 0
> Q> fi
>
> Alternatively, it would be sufficient to require that the directory is
> already formatted for MS-DOS and is either empty or contains only a
> volume label entry, since any such disk by definition can have no data
> of any value on it.
I really think that any trashable diskette should be used, but with
three choices :
- a "LinPanic" diskette would allow automatic dump
- a non "LinPanic" diskette would :
- either put the dumper in interactive mode
(user operation needed),
- or reboot without any dump because we don't want
to risk the diskette contents.
But your script is interesting in the case of a server. At boot time, it
could shout "Hey, you have a diskette in your drive which is not a linpanic
one. is this normal ?"
> Best wishes from Riley.
Regards,
Willy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/