When transferring a hard drive from one computer to another, sometimes a situation can occur where the BIOS-provided CHS hard disk geometry (interrupt 13h without extensions) is different from the CHS geometry it presented as on the computer that it came from. In my case one computer seems to have been using 240 heads for interrupt 13h access. If you have an operating system such as DOS, or a Windows NT boot sector (up to at least XP), or any other partition boot sector that is operating in legacy interrupt 13h mode instead of extended interrupt 13h, where it communicates legacy ~8.4 GB-limited CHS values to the BIOS, your operating system will not correctly access the hard drive and will be unable to boot. Furthermore, many more modern computers from the 90s and thereafter have fairly basic BIOS hard drive configurations that don't let you see or change anything related to cylinders, heads or sectors.
How does someone find out what number of cylinders, heads, and sectors a BIOS is presenting for a particular hard drive? Is there some kind of DOS utility that will tell you? Also, is there a utility to change the CHS values in the MBR partition table and partition start and end entries to correspond to a different BIOS-provided geometry on a different computer?
It is important to good understanding of INT 13h, extended 64-bit INT 13h, what operating systems use INT 13h only, the 528MB limit, the 8.4GB limit, 255 or 256 heads, and LBA before attempting this kind of fix during a hard drive swap. Here is a link to a Stack Exchange information on the topic: https://retrocomputing.stackexchange.com/tags/chs/info
To read more background on the history of CHS, int 13h, and BIOS translations, you can read my summary of it here.
Since this is a very confusing topic, here is some background: In the early days, IDE hard drives were accessed using cylinders, heads, and sectors. SCSI hard drives have always used an LBA like linear addressing method, but the SCSI BIOS still presented an int 13h CHS interface for DOS to access the SCSI hard drive using cylinders, heads, and sectors. These CHS values were manually entered in to the CMOS setup. The DOS operating system would access the hard drive through the BIOS int 13h interface using these CHS values. Everything worked fine. If you moved the hard drive to a different computer, you just entered the same CHS values in to the CMOS setup on the new computer. If you had a SCSI HDD, your SCSI controller BIOS would provide consistent CHS values for DOS to use.
The IDE hard drive CHS is limited to 65536 cylinders, 16 heads, and 256 sectors, which is the 128GB limit or "LBA28". The BIOS (or SCSI BIOS) int 13h interface is limited to 1024 cylinders, 256 heads (or 255 for DOS compatabilty), and 63 sectors making the 8.4GB limit. These two limits combined result in 1024 cylinders, 16 heads, and 63 sectors, making the 528MB limit for an IDE hard drive with a non translating BIOS.
To get around this, BIOSes started providing int 13h extensions which is a 64-bit LBA like number used by the operating system to access the hard drive. But before that became standard, a workaround was created where the BIOS would provide fake int 13h geometry and translate it in to real hard drive CHS geometry or use LBA to access the hard drive. If you have a BIOS that does not support int 13h extensions, or an operating system that is using the legacy int 13h CHS mode (even the Windows XP boot sectors will sometimes operate in the CHS int 13h mode), this is where the problems arise. The CHS value of the hard drive is no longer determined by the hard drive, but by the BIOS of the computer that the hard drive is put in to. Putting the hard drive in to a different computer can change the BIOS provided int 13h CHS values of the hard drive. There is sort of a standard way of creating virtual CHS values for a hard drive, but there is more than one standard way of doing it, which makes it not really standard.
It would have been better if extended int13h had been the solution from the beginning, and the whole translation thing had been skipped. It used to not matter if the CHS values in the BIOS were correct when a hard drive was transferred to another computer, because the true CHS values are stored in the DOS partition table, and software uses that. DOS would use that and the BIOS would send it directly to the hard drive, so the BIOS values were ignored. The only time it mattered would be if a utility like fdisk used the incorrect CHS values from the BIOS when making a new partition. Ever since translation became a thing, and the BIOS had to modify the CHS values, having mismatched CHS values will make the drive inaccessible to any software that uses INT 13h CHS access. Even Windows XP uses CHS if a partition is within 1024 cylinders.
When thinking about this, be sure to not confuse the IDE hard drive CHS or LBA access modes with the DOS (or other OS) to BIOS int 13h or extended int 13h interface. They are two completely different things. The BIOS presented to DOS and BIOS to HDD CHS values haven't been the same since hard drives went over 528MB.