VOGONS


First post, by bruenor41

User metadata
Rank Newbie
Rank
Newbie

Hi,

version 4130 added sanity check in file drive_fat.cpp. I try load img file like a 2GB hdd, but it fails on this check. Maybe is problem in hdd definition, maybe a bug. I am not sure, definition looks fine to me, it works with older revisions.

	if ((bootbuffer.sectorsperfat == 0) || // FAT32 not implemented yet
(bootbuffer.bytespersector != 512) || // non-standard sector sizes not implemented
(bootbuffer.sectorspercluster == 0) ||
(bootbuffer.rootdirentries == 0) ||
(bootbuffer.fatcopies == 0) ||
(bootbuffer.headcount == 0) ||
(bootbuffer.headcount > headscyl) ||
(bootbuffer.sectorspertrack == 0) ||
(bootbuffer.sectorspertrack > cylsector)) {
created_successfully = false;
return;
}
imgmount d /path/to/file.img -t hdd -fs fat -size 512,63,64,1023

Reply 1 of 2, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It is almost always a discrepancy in the number of heads and/or sectors per track between the boot sector info and geometry parameters you specify when mounting, which DOSBox SVN doesn't ignore anymore. It is planned to add a log message for the sanity checks that includes the head and sector count from the boot sector, which should help in understanding why the mount fails.

Reply 2 of 2, by bruenor41

User metadata
Rank Newbie
Rank
Newbie

Thank you very much, I though it. I always used these constants for imgmount :

32MB: 512,63,16,520
256MB: 512,63,16,520
512MB: 512,63,32,520
1GB: 512,63,64,520
2GB: 512,63,64,1023

I tested 512, it still works , 2GB fails. It's long time what I created these images, I can try create new 2GB hdd.

Edit : this is what I get from debugging for 2GB geometry, seems problem is here : headcount > headscyl (128 > 64)

sectorsperfat 250
bytespersector 512
sectorspercluster 64
rootdirentries 512
fatcopies 2
headcount 128
headscyl 64
sectorspertrack 32
cylsector 63