{"id":258,"date":"2013-08-21T07:26:56","date_gmt":"2013-08-21T07:26:56","guid":{"rendered":"http:\/\/neosmart.net\/kb\/?page_id=258"},"modified":"2015-08-18T09:24:35","modified_gmt":"2015-08-18T14:24:35","slug":"drive-letters-and-disk-numbers","status":"publish","type":"page","link":"https:\/\/neosmart.net\/wiki\/easybcd\/drive-letters-and-disk-numbers\/","title":{"rendered":"Drive Letters and Disk Numbers"},"content":{"rendered":"<h2>Drive Letters<\/h2>\n<p>Windows uses letters to represent physical drives on your machine, making it a lot easier to understand what&#8217;s happening where.<\/p>\n<p>The problem with Windows&#8217; 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 &#8220;facing&#8221; each operating system that don&#8217;t seem to add up. To clarify (just an example):<\/p>\n<p>Windows XP (installed on the first partition of the first drive) sees:<br \/>\n1. C:\\ for the XP partition<br \/>\n2. D:\\ for the Vista partition<br \/>\n3. E:\\ for a common data partition shared between the two<\/p>\n<p>Windows Vista (sitting on the first partition of the\u00a0<em>second<\/em>\u00a0drive) sees:<br \/>\n1. C:\\ for the\u00a0<em>Vista<\/em>\u00a0partition<br \/>\n2. D:\\ for the XP partition<br \/>\n3. E:\\ for the data partition<\/p>\n<p>So what&#8217;s the right way to use drive letters in EasyBCD? It&#8217;s quite simple, actually:\u00a0<strong>Always use the drive letters that operating system\u00a0<em>you are currently booted into<\/em>\u00a0sees!<\/strong><\/p>\n<p>EasyBCD &#8220;translates&#8221; the letters that\u00a0<em>current<\/em>\u00a0OS sees into numbers for the drive and partition. So if you&#8217;re in XP and EasyBCD asks for the Vista drive, tell it\u00a0<code>D:<\/code>, because that&#8217;s what XP thinks it is. Nevermind what Vista believes, it&#8217;s the operating system\u00a0<em>you are currently in<\/em>\u00a0that matters.<\/p>\n<h2>Drive Numbers<\/h2>\n<p>Different operating systems number their drives and partitions in different ways. The debate on the &#8220;right&#8221; way to do this is as old as time itself, and goes back to whether you consider &#8220;0&#8221; or &#8220;1&#8221; to be the &#8220;first number&#8221; in any index-based sequence.<\/p>\n<h3>Linux<\/h3>\n<p>The Linux Camp did it logically&#8230; For the most part. When you are dealing with Linux hard drive and partition numbers, start counting both from the number zero. For example,\u00a0<code>(hd0,1)<\/code>\u00a0is the\u00a0<em>second<\/em>partition of the\u00a0<em>first<\/em>\u00a0hard drive. Pretty easy to follow, just\u00a0<code>(hdd,p)<\/code>\u00a0where the second &#8216;d&#8217; is the drive number and the &#8216;p&#8217; is the partition number.<\/p>\n<h4>(hdx,y) syntax<\/h4>\n<pre>(hd0,0)   first primary partition on first hard disk\r\n(hd0,1)   second primary partition\r\n(hd0,2)   third primary partition\r\n(hd0,3)   fourth primary partition (usually an extended partition)\r\n(hd0,4)   first logical partition\r\n(hd0,5)   second logical partition ...<\/pre>\n<p>But when you&#8217;re\u00a0<em>within<\/em>\u00a0Linux dealing with the drives and devices, you&#8217;ll be shocked (and rightly so) to realize that they&#8217;ve done away with this straightforward numbering scheme and opted to use a combination of\u00a0<em>both<\/em>\u00a0letters and numbers&#8230; and categories too!<\/p>\n<h4>Other syntaxes<\/h4>\n<p>The different kind of &#8220;numbers&#8221; you will encounter in the Linux world:<\/p>\n<ul>\n<li>hd(#,#)<\/li>\n<li>hdL#<\/li>\n<li>sdL#<\/li>\n<\/ul>\n<p>In the list above &#8220;L&#8221; is a small-case letter, and &#8220;#&#8221; is a number. hd(#,#) has already been discussed, and is primarily used\u00a0<em>before<\/em>\u00a0booting into Linux, in programs like Lilo and GRUB.<\/p>\n<h4>sdX vs hdY<\/h4>\n<p>hdL# and sdL# are a bit more confusing. The &#8220;h&#8221; and &#8220;s&#8221; differentiate between IDE\/ATA drives and SATA\/SCSI drives respectively. Even more confusing, at this point numbering starts from\u00a0<em>one<\/em>\u00a0again! So the third partition of the second\u00a0<em>IDE<\/em>\u00a0drive on your PC is\u00a0<code>hdb3<\/code>\u00a0while the second partition of the first SCSI drive on your machine is\u00a0<code>sda2<\/code>. Confused yet?<\/p>\n<p>It gets worse. Linux doesn&#8217;t actually understand\u00a0<code>sda1<\/code>\u00a0as referring to a drive \u2013 it&#8217;s just a combination of letters and numbers to it. To make Linux understand what you want, you have to prefix the letter &amp; number combination with\u00a0<code>\/dev\/<\/code>. So if you&#8217;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\u00a0<code>\/dev\/sdc2<\/code>.<\/p>\n<p>Ironically, in an attempt to make things a bit &#8220;easier,&#8221; certain Linux distributions (mostly just Ubuntu) now use sdL# notation for everything. Basically they&#8217;ve &#8220;merged&#8221; the two hdL# and sdL# lists into one, which does make it easier in a way\u2026 except of course that you don&#8217;t know whether it&#8217;s IDE or SATA drives that get listed first!<\/p>\n<h3>Windows<\/h3>\n<p>Microsoft may have picked a more unusual method of &#8220;counting&#8221; the drives and partitions, but at least they stuck to it the whole way through. Despite its weirdness, it&#8217;s quite easy once you get what&#8217;s going on:<\/p>\n<p>On Windows (and therefore, in EasyBCD as well\u2026 for the most part), drives start counting at 0,\u00a0<em>but partitions start from 1<\/em>! So drive 0, partition 2 is the\u00a0<em>second<\/em>\u00a0partition of the\u00a0<em>first<\/em>\u00a0hard drive. Drive 3 partition 1 is the first partition of the\u00a0<em>fourth<\/em>\u00a0drive, and so on and so forth.<\/p>\n<p>This may seem a bit off at first, but there&#8217;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\u00a0<em>MBR<\/em>\u00a0of 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Drive Letters Windows uses letters to represent physical drives on your machine, making it a lot easier to understand what&#8217;s happening where. The problem with Windows&#8217; 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 [&hellip;]<\/p>\n","protected":false},"author":505,"featured_media":0,"parent":64,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-258","page","type-page","status-publish","hentry"],"aioseo_notices":[],"jetpack_shortlink":"https:\/\/wp.me\/P3SlTq-4a","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/pages\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/users\/505"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":3,"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/pages\/258\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/pages\/258\/revisions\/261"}],"up":[{"embeddable":true,"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/pages\/64"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/wiki\/wp-json\/wp\/v2\/media?parent=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}