compared with
Current by Mahmoud Al-Qudsi
on Jun 26, 2007 18:20.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 h1. Drive Letters
  
 Windows uses letters to represent physical drives on your machine, making it a lot easier to understand what's happening where.
  
 The problem with Windows' method of labeling the physical volumes and their respective partitions is that if you dual-boot, most of the time overlaps will occur. Right now it is all too likely that if you dual-boot you have different partition labels "facing" each operating system that don't seem to add up. To clarify (just an example):
  
 Windows XP (installed on the first partition of the first drive) sees:
 1. C:\ for the XP partition
 2. D:\ for the Vista partition
 3. E:\ for a common data partition shared between the two
  
 Windows Vista (sitting on the first partition of the _second_ drive) sees:
 1. C:\ for the _Vista_ partition
 2. D:\ for the XP partition
 3. E:\ for the data partition
  
 So what's the right way to use drive letters in EasyBCD? It's quite simple, actually: *Always use the drive letters that operating system _you are currently booted into_ sees\!*
  
 EasyBCD "translates" the letters that _current_ OS sees into numbers for the drive and partition. So if you're in XP and EasyBCD asks for the Vista drive, tell it {{D:\}}, because that's what XP thinks it is. Nevermind what Vista believes, it's the operating system _you are currently in_ that matters.
  
 h1. Drive Numbers
  
 Different operating systems number their drives and partitions in different ways. The debate on the "right" way to do this is as old as time itself, and goes back to whether you consider "0" or "1" to be the "first number" in any index-based sequence.
  
 h2. Linux
  
 The Linux Camp did it logically... For the most part. When you are dealing with Linux hard drive and partition numbers, start counting both from the number zero. For example, {{(hd0,1)}} is the _second_ partition of the _first_ hard drive. Pretty easy to follow, just {{(hdd,p)}} where the second 'd' is the drive number and the 'p' is the partition number.
  {noformat}
 (hd0,0) first primary partition on first hard disk
 (hd0,1) second primary partition
 (hd0,2) third primary partition
 (hd0,3) fourth primary partition (usually an extended partition)
 (hd0,4) first logical partition
 (hd0,5) second logical partition ...
 {noformat}
  
 But when you're _within_ Linux dealing with the drives and devices, you'll be shocked (and rightly so) to realize that they've done away with this straight-forward numbering scheme and opted to use a combination of _both_ letters and numbers... and categories too!
  
 The different kind of "numbers" you will encounter in the Linux world:
 * hd(#,#)
 * hdL#
 * sdL#
  
 In the list above "L" is a small-case letter, and "#" is a number. hd(#,#) has already been discussed, and is primarily used _before_ booting into Linux, in programs like Lilo and GRUB.
  
 hdL# and sdL# are a bit more confusing. The "h" and "s" differentiate between IDE/ATA drives and SATA/SCSI drives respectively. Even more confusing, at this point numbering starts from _one_ again! So the third partition of the second _IDE_ drive on your PC is {{hdb3}} while the second partition of the first SCSI drive on your machine is {{sda2}}. Confused yet?
  
 It gets worse. Linux doesn't actually understand {{sda1}} as referring to a drive – it's just a combination of letters and numbers to it. To make Linux understand what you want, you have to prefix the letter & number combination with {{/dev/}}. So if you're in the console and you want to tell Linux to access the 2nd partition of the 3rd SCSI drive, you would have to actually write {{/dev/sdc2}}.
  
 Ironically, in an attempt to make things a bit "easier," certain Linux distributions (mostly just Ubuntu) now use sdL# notation for everything. Basically they've "merged" the two hdL# and sdL# lists into one, which does make it easier in a way… except of course that you don't know whether it's IDE or SATA drives that get listed first\!
  
 h2. Windows
  
 Microsoft may have picked a more unusual method of "counting" the drives and partitions, but at least they stuck to it the whole way through. Despite its weirdness, it's quite easy once you get what's going on:
  
 On Windows (and therefore, in EasyBCD as well… for the most part), drives start counting at 0, _but partitions start from 1_\! So drive 0, partition 2 is the _second_ partition of the _first_ hard drive. Drive 3 partition 1 is the first partition of the _fourth_ drive, and so on and so forth.
  
 This may seem a bit off at first, but there's a good reason for this. In Windows, you can access the MBR (something EasyBCD does quite often) of each drive by setting the partition equal to zero. So drive 0 partition 0 is actually the _MBR_ of the first hard drive. However, when dealing with EasyBCD and most other Windows programs, you will never reference the MBR, so just remember that drives start from 0 and partitions from 1. Even in boot.ini.