Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following are the contents of a sample boot.ini:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /NOEXECUTE=OPTIN /FASTDETECT

The rdisk value tells the physical disk number.

So, if I have three hard disks say:

  • /dev/sda

  • /dev/sdb

  • /dev/sdc

Then how to know which disk (/dev/sda or /dev/sdb or /dev/sdc) is rdisk(0) and which disk is rdisk(1), etc.?

share|improve this question
up vote 0 down vote accepted

Trial and error?

I'm sure there is a method by which Windows orders the disks, but even if I knew it, I wouldn't trust it and would alwasys check before changing stuff.

The boot.ini file gives you some clues, such as what operating system is on which disk. You may then be able to work it out from that. eg is there only one ntfs partition on a particular disk and two on others, what users are on each operating system and so have directories on each Windows system. You could even boot into each operating system and save a file in its system partition to help you.

(If you are trying to work out which disk a broken entry in boot.ini refers to, msconfig.exe has an option to check the boot paths to make sure that each option should boot.)

share|improve this answer
@Neal: Thanks. But i want to get this information in Linux. I think there is no smooth and reliable way to do this except by searching and analysis. – MA1 Mar 9 '10 at 10:08

According to Microsoft article Q102873: BOOT.INI and ARC Path Naming Conventions and Usage, the order of rdisk() is:

... the ordinal for the disk on the adapter and is usually a number between 0 and 3.

So it seems it would be the usual order (starting with 0): primary master, primary slave, secondary master, secondary slave. (I have no idea how it works with SATA though.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .