Newsgroups: comp.os.msdos.djgpp From: m Subject: Re: hdparm lets your IDE disk spin down Content-Type: text/plain; charset=us-ascii Message-ID: <34FE7793.8E937BD6@removethis.ul.ie> Sender: usenet AT ul DOT ie Content-Transfer-Encoding: 7bit Organization: University of Limerick References: <6dlgva$o34$1 AT antares DOT lu DOT erisoft DOT se> Mime-Version: 1.0 Date: Thu, 5 Mar 1998 09:59:47 GMT Lines: 44 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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