With Regards to Boot.ini and Extended Partitions

mqudsi

Mostly Harmless
Staff member
There has been a lot of confusion regarding this matter, so I figured I'd try to clear it up as much as I can:

The boot.ini file refers to partitions by their ARCpaths, such as "multi(0)disk(0)rdisk(0)partition(2)".

The numbering scheme of the "partition( )" parameter follows the order of entries in the MBR, not the order of the physical partitions themselves.

However, the number doesn't actually refer to the slot in the partition table, it refers to the partition sequence as counted by XP. That sequence follows the order of slots in the partition table, but skips empty slots and any extended partition entry.
(Although the "extended" entry itself is skipped, logical partitions within the extended partition are counted after all primaries.)

From Microsoft's site:
W is the partition number. All partitions receive a number except for type 5 (MS-DOS Extended) and type 0 (unused) partitions, with primary partitions being numbered first and then logical drives. NOTE: The first valid number for W is 1, as opposed to X, Y, and Z which start at 0 (zero).

I add to that list type 0xF (hexadecimal, equal to 15) which is the LBA Extended partition type.

I'm seriously considering releasing a boot.ini configurator with EasyBCD 2.0 that is launched separately (perhaps from the tools menu or useful utils page) with the advance warning that rdisk() values may be incorrect in mixed SATA/IDE environments.
 
aeu

My partition table:
attachment.php


Computer management:
attachment.php


Boot.ini:
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[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)\WINDOWS="Microsoft Windows XP 2" /noexecute=optin /fastdetect

Output of the new drive lister:
Code:
Disk 0 with 2 primary & 1 logical partitions
Size: 32212254720 Free: 21470103552
        1: Partition C:\:
                File System: 7
                Size: 5371072512
                Start: 32256
                End: 5371107840
                Cluster Size: 4096
                Free Space: 3161391104
                Primary: Yes
        0: Unmounted Partition
                File System: f
                Size: 5371107840
                Start: 5371107840
                End: 10742215680
                Cluster Size: 0
                Free Space: 0
                Primary: Yes
        2: Partition D:\:
                File System: 7
                Size: 5371072512
                Start: 5371140096
                End: 10742215680
                Cluster Size: 4096
                Free Space: 3158044672
                Primary: No
 

Attachments

  • CompMgmt.PNG
    CompMgmt.PNG
    44.8 KB · Views: 33
  • Test Machine-2009-02-05-16-45-36.png
    Test Machine-2009-02-05-16-45-36.png
    59.3 KB · Views: 32
I'd always thought that the order they were created in, rather than the order on the HDD was the significant factor, which makes it hard for someone in our support position, with only the latter information available to make other than a guess. (To Monk of course, the 2 things would be identical)
I guess I was right. The order of creation would equate to the position in the MBR, so from our point of view such a utility would be invaluable.
It's always embarrassing as "experts", to have to say "your guess is as good as mine !"
 
Yeah, that's why I'm hoping to release a boot.ini config utility that'll run from within Windows.

The only good thing is, 99% of the time, the order partitions are in on the disk and the order they were created with are identical except in the case of power users that are constantly partitioning and re-partitioning their drives......... then again, our forums are mostly filled with these fringe cases in the first place.
 
You can also confirm the confusion with diskpart. Depending on your configuration, the listing may show the disks/partitions in the order you expect, but the partition numbers are out of order. Used to have this problem on my laptop prior to putting Windows 7 on there and would have a screenshot to show, but I let TI convert everything to primary on a restore when it got messed up which fixed it.
 
Terry, could you please update the stick with this info? I've already updated the wiki.

Perhaps just a note that extended partitions are not counted, with a link to this thread here for a detailed explanation.

Thanks :smile:
 
Done.
Embarassing to have been giving Grub advice (It does count the Extended) with regard to boot.ini
What's weird though - It worked !
I've modified the sticky in the boot.ini and LInux sections appropriately.
 
OK, I have some really, really, really good news that I just have to share:

I can get the 100% correct ARC Path (complete with right multi, disk, rdisk, and partition) values!!!!!!!!!!! :grinning:

I've been reading the Windows NT kernel documentation, and if I write a filesystem driver I can get access to the information in the kernel regarding the ARC paths and with some hacks get the info I need!

I'm very, very far from doing that right now, and it's going to be some REALLY hard code, but I think it'll be worth it :smile:

/me won't be getting any sleep tonight, that's for sure!
 
Great news.
As well as the utility enabling us to offer 1st class accuracy in our advice, rather than the inspired guesswork we dispense now, I'm sure the expertise gained will translate into very useful features and great reliability in future releases of multiple NST products.
 
I've just been incredibly busy since - not getting home until 11pm and stuff so this next build is taking a bit longer than expected :smile:
 
Yes, this well make things a lot easier. Download, click, and forget :smile:

Addendum:

Check your pm box for the results CG.
 
Last edited:
Back
Top