superfury wrote:
So the 8GB drive is: 994 cylinders, 255 heads, 63 sectors. So according to the BIOS it's a 7978,32MB harddisk.
The geometry looks correct, but as 994*255*63*512=8175928320 and no matter what I try, I don't get 7978MB.
Let's see the whole again, exactly 8192 million bytes is the disk_size.
Disk size gets shifted by 9 so it is total LBA sectors again, exactly 16 million.
You divide that by (16*63) to get 15873 cylinders so CHS geometry is 15873*16*63=15999984 CHS sectors, all must be addressable.
You set the calculated physical CHS geometry OK, but decrease LBA sector count by 1 before setting IDENTIFY LBA count. Well, it's one less, but it should not matter, as LBA count is still larger than CHS count.
The rest depends on XTIDE then. We know XTIDE uses LBA mode to access drive, so this is not about IDE emulation translation error. We know XTIDE calculates logical geometry OK, because 994*255*63=15968610 CHS sectors and it is less than physical LBA/CHS. We don't know if XTIDE uses initialize drive parameters to set custom translations, but if it does, you don't recalculate cylinders based on drive size in sectors, you keep the previous cylinder values and update the drive size with that, and new head/sector values. So it could be IDE emulation bug. Otherwise, if there is some weird bug in XTIDE, it manifests on drives larger than 8257536 sectors (~4gb) and it addresses hard drive wrong, but if large enough drive than 8GB is used maybe it just works (but disks unreadable on other machines).
The, do you see the issue on both dynamic and static images, maybe one of them has a bug?