how to expand dosubcd.img and make it still bootable?
Moderators: Icecube, StopSpazzing
-
- Posts: 19
- Joined: Fri Jun 13, 2008 11:06 am
christ, how did i do this math (i'm an engineer too). :phoohooslax wrote:In the fd011520.img file, sectors per cluster is 8, not 240...so how do you get 240?
Code: Select all
capacity(bytes) = cylinders * number of heads per cylinder * number of sectors per head * 512(bytes per sector)
Code: Select all
capacity(KB) = 11,520 KB
capacity(in bytes) = 11,520*1024 = 11,796,480
Code: Select all
c = capacity(bytes) / number of heads / number of sectors / bytes per sector
= 11,796,480 / 8 / 36 / 512 (bytes per sector)
= 80
heh. it should be 80 cylinders for the 11,520Kb image, NOT 240 (???). if we apply the same math to 5,760Kb, the number of cylinders work out at 80 again.
Code: Select all
80(c) * 4(h) * 36(s) * 512(bytes per sector) = 5,898,240 bytes (or 5760Kb)

and, for the 50mb image (or 56,195Kb in this case), based on the stats provided by winimage, we should have
Code: Select all
57,543,680 (capacity in bytes) / 63 (sectors per track) / 255 (heads) / 512 (bytes per sector) = approx 7.
so, put simply - ignore those figures i quoted earlier and use the above equation to help you determine how many cylinders you need (since winimage doesn't appear to supply you with one).
sorry for the blunder.