Mail Archives: djgpp/1998/03/05/05:16:46
Is what you're asking: how do you get the physical drive a particular
drive letter refers to ?
If so for what its worth:
As far as I know (at least I always assumed this), DOS maps drive letters
sequentially.
So disk1:partition1 = C:, disk1:partition2 = D:, disk2:partition2 = E:
etc.
So to find out which physical disk a drive letter referred to involved
reading the master boot sector of each drive, and finding out how many
partitions it had (I used to assume they were all DOS partitions - cause
for me they were at the time). Then you just count along.
I must say that this was all a few years ago, and what I did was largely
by trial and error - I didnt always understand why things worked - they
just did, and that was ok :-)
Also I used always use the BIOS disk access services which I gather is
unheard of in Linux.
manuel.
Martin Stromberg wrote:
> hdparm is a program that interfaces directly with the hard disk under
> Linux. One of the things it can do is set that an IDE disk should
> spin down after a certain idle time.
>
> This is something that I've been missing in DOS. So wildly extracting
> from the Linux kernel and the hdparm program sources, I've managed to
> get it working. However what I've done is to take only the things
> needed to make it work for me; basically five calls to outportb.
>
> Now I'd like to generalise it back to its glorious shape it came
> from. But how do I get which physical IDE disk and partition 'c:' or
> 'g:' is? For those who knows about Linux, I need a mapping from
> DOSish letters to /dev/hd{a,b,c,d}.
>
> Hoppla,
>
> MartinS
- Raw text -