CHS to LBA Conversion

shas595

Distinguished
Sep 3, 2013
24
0
18,510
Hello All. I have a hard drive I need to cut down (long story, special HDD that can no longer be purchased, unless you have $8000 to spare!!!). I need it to have 3306/16/63 (~1721 mb) but the software I am using (MHDD) is asking for the max LBA to do the cut. I do not know how to do the conversion. I have seen the formula but it is not working out correctly. Any help would be AWESOME!

John
 
Solution
Total LBAs = C x H x S

= 3306 x 16 x 63
= 3332448

Since LBA 0 is the first sector, then max LBA = 3332447.

BTW the capacity is given by ...

C x H x S x 512 bytes per sector

= 3 332 448 x 512
= 1 706 213 376 bytes
Thanks! The formulas I saw were much crazier, but possibly were for finding a specific LBA that ties to a specific C/H/S location, say in the middle of the drive. So the formula for the max LBA is just (C x H x S) - 1 ?

John



 
The actual size is 1706 MB, which matches what you replied. I was working with so many drives I got confused. So in theory, using MHDD to cut a larger drive, if I state that the max LBA is 3332447, a legacy system will see the drive as being 3306/16/63 even though it may be much larger. And the extra space will not be seen as unallocated, but rather not exist at all, correct? Thank you again, you are a lifesaver!!


 
I just entered 3332447 as the Max LBA but when the drive comes up in windows it says 1.59 GB. Any thoughts?


EDIT: Nevermind, that was the FAT formatted size, itis 1706 MB total. Weird thing is when I run TESTDISK it says the CHS values are 826/64/63. Any Ideas?