-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHS (pre-LBA drives) #3
Comments
Hm, I do have quite a collection of old hardware, but I don't seem to have any HDDs old enough to only support CHS, not LBA. Please feel free to test this yourself, you don't need the fancy PCB, just plug some wires (and ideally the resistors, not 100% strictly required though) into the GPIOs and you should be good to go. I'd be happy to accept PRs fixing issues regarding CHS. |
The only thing I'm unsure of is how one would specify the drive geometry for Old drives like mine do not support any auto-detection - I clearly remember having to enter (or select) the correct CHS values for the drive within the BIOS. |
Not sure if something still might be parsing the ide_core parameters… I‘d give it a try. My driver is very low level and only handles the raw communication and setting of registers, everything else is done by libata. Not sure if anyone has ever used libata with a CHS drive… I have been looking for some very old pre-LBA drives in my collection over Christmas, but I wasn‘t able to find one that doesn‘t support autodetection. |
I've studied the kernel sources for quite a bit - the
Thus, I'd presume that drives made before ATA-1 (first standard, started 1986, finalized 1994) won't work with The way I see it, the best bet to access a CHS-only drive in 2022 is a mainboard with an IDE interface that's supported by the legacy 'ide' driver + Linux distribution with 5.10 LTS kernel (as 'ide' was removed from the Linux kernel starting with 5.13). |
Well, libata supports CHS, see here: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/ata/libata-core.c?h=v5.10#n747 If device don't report LBA support libata will convert LBA to CHS. So it's pretty possible and will be quite useful feature to implement, given that motherboards capable of accessing CHS drives are more rare to come by, and speed for drives that old is usually not the concern... |
I can confirm that a modern kernel (6.9ish) pre-LBA drives work when the kernel itself controls the IDE bus:
I'll give this a shot at some point and report back, but it definitely sounds like it'll work. |
I realise that this project doesn't currently have many practical uses since a simple USB to IDE adapter will do a much better job. But we could make this project useful by adding support for hard drives without LBA support. Early IDE drives are not readable by most modern IDE interfaces and this can be a pain for vintage computer owners, by adding support for those drives this immediately becomes a useful project to a lot of people.
As a first step we could allow manual configuration of drives similar to an old BIOS type 1-46 + a custom parameter mode. And later also detect pre-LBA drives with autodetect parameters.
I am more than happy to help with this.
The text was updated successfully, but these errors were encountered: