Re: Problem with larger IDE drive

Albert D. Cahalan (acahalan@cs.uml.edu)
Fri, 26 Mar 1999 00:19:24 -0500 (EST)


Andries.Brouwer@cwi.nl writes:

> The most difficult problem is finding the correspondence between the
> BIOS disks 0x80, 0x81, ... and the Linux disks /dev/sda, /dev/hda, ...

This is impossible without writing to the disk, but you can do a very
good job. Use the BIOS to read the first sector of every disk, and
supply userspace with the sectors via the proc filesystem.

So you might have a 512-byte file like this:
/proc/biosinfo/disks/0x80/bootsect.bin

Userspace just compares that with /dev/hda, etc. Userspace should be
able to change the data too, to match any changes to /dev/hda, etc.

Boot sectors should have a unique ID, and they usually differ by
boot code and partition data. In the unlikely event that all of
that is the same (someone used dd), you could take a guess or just
ask the user.

(and offer to add a unique ID if one is missing or not unique)

-
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/