Hello Alain,
there seems to be a severe bug in fdutils-5.4-20020222.
At least for me superformat is not able to format high
capacitiy disks without the --verify_later option.
The original bug report I received is at
http://bugs.debian.org/148587
It seems, that the verify code uses the _old_ drive
parameters (either whatever was autodetected for media
that was in the drive before, set with setfdprm, or the
default) to verify the tracks, which are formatted with
the new parameters.
You can reproduce this as follows:
# insert a disk with the usual 1440/1440 format into the drive
# and make sure that the floppy driver uses this format.
voss@automatix [~] setfdprm /dev/fd0 1440/1440
voss@automatix [~] mdir
Volume in drive A has no label
Volume Serial Number is 682D-7F39
Directory for A:/
No files
1 457 664 bytes free
voss@automatix [~] superformat /dev/fd0 ds hd sect=21
This command results in a lot of I/O errors
and noises like the floppy drive is suffering.
The first few error messages are
Jun 30 14:31:39 automatix kernel: end_request: I/O error, dev 02:00 (floppy), sector 60
Jun 30 14:31:40 automatix kernel: end_request: I/O error, dev 02:00 (floppy), sector 62
Jun 30 14:31:43 automatix kernel: end_request: I/O error, dev 02:00 (floppy), sector 81
Jun 30 14:31:44 automatix kernel: end_request: I/O error, dev 02:00 (floppy), sector 82
Jun 30 14:31:46 automatix kernel: end_request: I/O error, dev 02:00 (floppy), sector 102
If I try the same with the "--verify_later" option,
everything works fine:
voss@automatix [~] superformat --verify_later /dev/fd0 ds hd sect=21
Formatting cylinder 79, head 1
mformat -s21 -t80 -h2 -S2 -M512 a:
Verifying cylinder 79, head 1
I hope this helps,
Jochen
PS.: if you reply to this mail, please send (via Cc:) a copy to
148587-forwarded(a)bugs.debian.org
--
http://www.mathematik.uni-kl.de/~wwwstoch/voss/
Hello,
it seems that superformat has problems with
the device file system devfs. There the floppy
device files all live under /dev/floppy. With
superformat this leeds to problems like the
following:
mnemaxa:~# strace superformat /dev/floppy/1h1200
execve("/usr/bin/superformat", ["superformat", "/dev/floppy/1h1200"], [/* 18 vars */]) = 0
uname({sys="Linux", node="mnemaxa", ...}) = 0
.....
open("/dev/floppy/1h1200", O_RDWR|O_NONBLOCK|O_EXCL) = 3
fstat64(0x3, 0xbfffc7bc) = 0
ioctl(3, FDRESET, 0x1) = 0
ioctl(3, FDGETDRVPRM, 0xbfffd2e4) = 0
open("/etc/driveprm", O_RDONLY) = -1 ENOENT (No such file or directory)
ioctl(3, FDGETPRM, 0xbfffd254) = 0
close(3) = 0
open("/dev/fd1", O_RDWR|O_NONBLOCK|O_EXCL) = -1 ENOENT (No such file or directory)
write(2, "open: No such file or directory\n", 32open: No such file or directory
) = 32
_exit(1) = ?
The user tries to format /dev/floppy/1h1200, but superformat
changes this to the non-existent /dev/fd1.
I think that the following code in "superformat.c"
(from fdutils-5.4-20020222) is responsible for this:
Starting at line 734:
/* this is not a generic format device. Close it,
* and open the proper device instead */
if(argc == 0)
ioctl(fd[0].fd, FDGETPRM, &geometry);
have_geom = 1;
close(fd[0].fd);
snprintf(drivename,9,"/dev/fd%d", fd[0].drive);
fd[0].name = drivename;
I think it would help to change this as follows:
1) Check for the existence of /dev/.devfsd
2) If it exists (devfs is used), use "/dev/floppy/%d"
as the device name.
3) If .devfsd does not exist, proceed as in the code sniplet
above.
I hope this helps,
Jochen
--
http://www.mathematik.uni-kl.de/~wwwstoch/voss/
Hallo Alain,
some user of the Debian version of superformat noted
the following inconsistency: most programs include
a synopsis line in the output of the --help option.
Examples:
voss@automatix [~] ls --help | head
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuSUX nor --sort.
-a, --all do not hide entries starting with .
-A, --almost-all do not list implied . and ..
-b, --escape print octal escapes for nongraphic characters
--block-size=SIZE use SIZE-byte blocks
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
voss@automatix [~] grep --help | head
Usage: grep [OPTION]... PATTERN [FILE] ...
Search for PATTERN in each FILE or standard input.
Example: grep -i 'hello world' menu.h main.c
Regexp selection and interpretation:
-E, --extended-regexp PATTERN is an extended regular expression
-F, --fixed-strings PATTERN is a set of newline-separated strings
-G, --basic-regexp PATTERN is a basic regular expression
-e, --regexp=PATTERN use PATTERN as a regular expression
-f, --file=FILE obtain PATTERN from FILE
Superformat does not follow this convention.
voss@automatix [~] superformat --help | head
-D --dosdrive set the dos drive
-v --verbosity set verbosity level
-f --noverify skip verification
-B --dosverify verify disk using mbadblocks
-V --verify_later verify floppy after all formatting is done
-b --begin_cylinder set cylinder where to begin formatting
-e --end_cylinder set cylinder where to end formatting
-G --fmt_gap set the formatting gap
-F --final_gap set the final gap
-i --interleave set the interleave factor
Maybe you could add an additional line to the
"superformat --help" output, to make it more friedly.
I hope this helps,
Jochen
PS: If you answer to this mail, the Debian bug tracking system would
be glad to receive a copy (via Cc:) of your mail to the address
88297-forwarded(a)bugs.debian.org.
--
http://www.mathematik.uni-kl.de/~wwwstoch/voss/