Messages in this thread | | | Date | Thu, 23 Mar 2000 16:01:33 -0600 | From | David Elliott <> | Subject | Cylinder limits jumper for drives over 32GB |
| |
Hi,
I currently have a Micronics C400 motherboard (www.diamondmm.com) using an older version of the Award BIOS. I recently purchased a 40 GB hard-drive and need to be able to boot off of it as well as use the full 40 GB in Linux.
Unlike other drives, where cylinder limits only changes the cylinders reported, on this drive it also changes the LBA capacity to 66055248. I can only assume that the real LBA capacity is then stored elsewhere. With EZ-Drive loaded, at least EZ-Drive will set the CHS to the correct size (for any drive over 8GB, heads is 255 and sectors is 63 for EZ-Drive, cylinders is dependent on the capacity of the drive, but is always over 4111 on a drive over 32GB).
So, there are two possible solutions. Either figure out where the new LBA capacity is written on these drives, and use it when what we thought was LBA capacity == 66055248. Or we can do some testing in the lba_capacity_is_ok function. For a quick fix, having lba_capacity_is_ok return 0 if the LBA capacity is 66055248 and the heads are 255 and the sectors are 63 and the cylinders are greater than 4111 will cause init_idedisk_capacity to use C*H*S as the capacity, which in this case is more correct.
Note that the C*H*S is not exactly the full capacity of the drive as reported. My drive has 4982*255*63 reported by EZ-Drive (and also this is what Linux will deduce from the LBA capacity when clyinder limits jumper is not set). However, 4982*255*63 is only 80035830 while my drive's LBA capacity (as reported without cly. limits set) is 80041248. So I lose a few sectors (not that big of a deal as long as I take care to not put a partition past that point, which I don't even think fdisk will let you do).
As far as finding the new LBA capacity field, I guess it would be in one of the reserved fields, but I haven't checked yet. As far as faking the capacity using info from EZ-Drive, that's kind of a hack, but it'd work if we couldn't find the real LBA somewhere
-Dave
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |