[FIXED] EasyBCD 2.0.1 writes boot.ini to wrong partition

The partition wizard asks what the mount point is before you format it. You can choose a drive letter or a folder. Then it asks if you want to format it. You can choose to not format it.

Addendum:

I made a virtual hard disk (D1) with similar settings to the real hard disk (D0).
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(1),No
P2,E:\,7,85684600832,46593257472,Yes,multi(0)disk(0)rdisk(0)partition(2),No
P3,D:\,7,86114091008,60157870080,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P4,C:\,7,148064485376,93379813376,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes
D1,4,4,0,8590417920
P1,,6,2146765824,2146765824,Yes,multi(0)disk(0)rdisk(0)partition(1),No
P2,,6,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(0)partition(1),No
P3,,6,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(0)partition(1),No
P4,K:\,6,2146798080,2133364736,Yes,,No

P2 and P3 are unformated and have drive letters N and L.
When E and D are unformatted, the following output appears:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P2,,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P3,,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P4,C:\,7,148064485376,93382270976,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes
D1,4,4,0,8590417920
P1,,238,2146765824,2146765824,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P2,,7,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P3,,7,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P4,E:\,7,2146798080,2133331968,Yes,multi(0)disk(0)rdisk(1)partition(4),Yes
So now E moved to P4 of D1 but D1 P4 should be K.

Your old "Drive Grabber.exe" was able to get the correct drive letters in this case:
Code:
C:\>"drive grabber.exe"
\\.\PHYSICALDRIVE0
Disk #0, Partition #0, Type: Unknown
Disk #0, Partition #1, Type: Installable File System
E:
Disk #0, Partition #2, Type: Installable File System
D:
Disk #0, Partition #3, Type: Installable File System
C:
\\.\PHYSICALDRIVE1
Disk #1, Partition #0, Type: Unknown
Disk #1, Partition #1, Type: Installable File System
N:
Disk #1, Partition #2, Type: Installable File System
L:
Disk #1, Partition #3, Type: Installable File System
K:
 
Last edited:
I get the volume ID directly from the disk itself.

Joe, can you try this bootgrabber.exe instead of the one you have? I'm no longer getting the disk letters from Windows APIs (well, I fall back to the Windows API if I can't get it my way).
 

Attachments

  • BootGrabber.exe
    110 KB · Views: 14
That seems to work. Here's the output with the old and new BootGrabber with 2 disks and 1 formatted partition on each:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P2,,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P3,,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P4,C:\,7,148064485376,93381439488,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes
D1,4,4,0,8590417920
P1,,238,2146765824,2146765824,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P2,,7,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P3,,7,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P4,E:\,7,2146798080,2133331968,Yes,multi(0)disk(0)rdisk(1)partition(4),Yes

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber2 /tlist
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P2,E:\,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P3,D:\,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P4,C:\,7,148064485376,93381439488,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes
D1,4,4,0,8590417920
P1,,238,2146765824,2146765824,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P2,N:\,7,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P3,L:\,7,2146798080,2146798080,Yes,multi(0)disk(0)rdisk(1)partition(3),No
P4,K:\,7,2146798080,2133331968,Yes,multi(0)disk(0)rdisk(1)partition(4),Yes

Here is the output from the old and new BootGrabber with 1 disk with 1 formatted partition:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabberold /tlist
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P2,,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P3,,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P4,E:\,7,148064485376,93423579136,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P2,E:\,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P3,D:\,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(0)partition(3),No
P4,C:\,7,148064485376,93423579136,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes
Using the new BootGrabber in this case lets me add Windows XP entries where the old BootGrabber did not.

If the volume ID is important to how BootGrabber works, it may be useful to add an option to show the volume ID's that it sees. I think it would be interesting to see what BootGrabber is getting from the partitions that Parallels Desktop is hiding (probably zero's but I don't have a disk hex editor to confirm). It may also be useful to show the file system code of each partition - to know which are FAT, NTFS, HFS, RAW, EXT, etc.
 
GREAT, thanks Joe :smile: :smile: :smile:

BootGrabber *does* show the partition ID (FAT/NTFS/etc) - it's the 3rd parameter in the tlist output. Just look it up in this table here: http://www.win.tue.nl/~aeb/partitions/partition_types-1.html

As for the volume id thing... it's very complicated. I don't have any way of mapping a drive letter to a physical disk# + part# combo, and the only Windows API iterates over all the volumes on the system. An unformatted partition is NOT a volume, so I don't get its letter via those Windows APIs. The new way is reaaaaaaaaaally lowlevel both in terms of hardware (getting data from the partition bootsector) and Windows (searching the defined devices in the GLOBAL namespace in the kernel with unpublished exported functions from the NT kernel).
 
I was talking about file system type which is not the same as partition ID type. I think file systems can choose to ignore partition ID type when looking at a partition.

I mentioned before a SourceForge project Ext2FS which contains a utility that shows volumes and partitions. It maps drive letters to partitions (see attachment - it also shows file systems). I looked at the source code. The drive letter stuff seems complicated. I didn't look very closely or try to make a smaller more concise console exe version so I didn't notice any unpublished stuff being used. It does have at least one header with definitions for structs that are supposed to be opaque though.
 

Attachments

  • Ext2Mgr.png
    Ext2Mgr.png
    30.1 KB · Views: 10
I have another way of getting Filesystems that Windows recognizes by name, the results of which might differ from the partition ID. But it doesn't work for unidentified partitions..... I'll have to see how I can logically merge the results of the two.
 
Joe, can you give this build a shot?

It should have fixed all the boot.ini problems you were having + correctly show your HFS partitions.
 

Attachments

  • EasyBCD 2.0.2 Beta - Build 115.exe
    1.3 MB · Views: 11
When I tested EasyBCD 2.0.2 build 114, I neglected to test it out while booting the Mac into Windows XP. It fails to detect the boot device. The same occurs with EasyBCD 2.0.2 build 115. They work when I'm booted using Parallels, but not when I boot the Mac into Windows.

This is the output while booting the Mac in Windows XP using build 115:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
Unable to get volume information for \\?\Volume{50280910-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{50280911-67dc-11dd-b05c-806d6172696f}\
D0,3,3,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,O:\,7,64424509440,23910260736,Yes,multi(0)disk(0)rdisk(3)partition(2),No,HFSJ
P3,C:\Volumes\SnowLeopard\,7,255170232320,206600298496,Yes,multi(0)disk(0)rdisk(3)partition(3),No,HFSJ
D1,4,4,0,250059350016
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,I:\,12,1073741824,853716992,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,F:\,12,524288000,523075584,Yes,multi(0)disk(0)rdisk(2)partition(3),No,FAT
P4,J:\,1,2097152,636928,Yes,multi(0)disk(0)rdisk(2)partition(4),No,FAT
D2,2,2,0,1000204886016
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,P:\,7,21340618752,18230349824,Yes,multi(0)disk(0)rdisk(1)partition(2),Yes,EXT3
D3,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,E:\,7,85684600832,46593257472,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,D:\,7,86114091008,60157882368,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,C:\,7,148064485376,92742860800,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS
D4,6,0,6,200049647616
P1,C:\Volumes\Work\,7,53687091200,5005524992,No,,No,HFSJ
P2,C:\Volumes\Devs\,7,42949672960,2387021824,No,,No,HFSJ
P3,C:\Volumes\Apps\,7,32212254720,10113638400,No,,No,HFSJ
P4,C:\Volumes\Updates\,7,42949672960,2742005760,No,,No,HFSJ
P5,T:\,7,8589934592,962809856,No,,No,HFS+
P6,U:\,7,7516192768,859013120,No,,No,HFS+
It all looks good. The file systems are correct. HFSJ, HFS+, FAT32, FAT, EXT3, NTFS. Partitions that are not mounted or are RAW have no file system. HFSJ and HFS+ are provided by MacDrive. EXT3 is provided by Ext2FS. The unknown volumes might be DVD drives with no media?

Registry items SystemPartition and BootDir still point to the wrong drive (\Device\HarddiskVolume12 drive letter D: ) The correct drive is \Device\HarddiskVolume13 drive letter C:.

The following shows how bootgrabber /bootcfg is unable to detect the correct boot device:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg \ArcName\multi(0)disk(0)rdisk(0)partition(0)
Unable to get volume information for \\?\Volume{50280910-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{50280911-67dc-11dd-b05c-806d6172696f}\
 Drive 0, Partition 2: No Windows installation found.
 Drive 0, Partition 3: No Windows installation found.
 Drive 1, Partition 2: No Windows installation found.
 Drive 1, Partition 3: No Windows installation found.
 Drive 1, Partition 4: No Windows installation found.
 Drive 2, Partition 2: No Windows installation found.
 Drive 3, Partition 2: Windows Vista+ (Ignored).
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).
 Drive 4, Partition 1: No Windows installation found.
 Drive 4, Partition 2: No Windows installation found.
 Drive 4, Partition 3: No Windows installation found.
 Drive 4, Partition 4: No Windows installation found.
 Drive 4, Partition 5: No Windows installation found.
 Drive 4, Partition 6: No Windows installation found.
Unable to detect correct boot device, quitting.
The following is the output when booting the Mac into Vista 64:
Code:
C:\Program Files (x86)\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
Unable to get volume information for \\?\Volume{61f460db-6c2f-11df-bbfa-806e6f6e6963}\
Unable to get volume information for \\?\Volume{e5d36fa4-6902-11dd-a511-806e6f6e6963}\
Unable to get volume information for \\?\Volume{e5d36fa5-6902-11dd-a511-806e6f6e6963}\
D0,3,3,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,,175,64424509440,64424509440,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P3,,175,255170232320,255170232320,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
D1,4,4,0,250059350016
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,F:\,12,1073741824,853708800,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,H:\,12,524288000,523059200,Yes,multi(0)disk(0)rdisk(2)partition(3),No,FAT
P4,I:\,1,2097152,636928,Yes,multi(0)disk(0)rdisk(2)partition(4),No,FAT
D2,2,2,0,1000204886016
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,K:\,7,21340618752,21340618752,Yes,multi(0)disk(0)rdisk(3)partition(3),Yes,
D3,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,C:\,7,85684600832,46342582272,Yes,multi(0)disk(0)rdisk(0)partition(2),Yes,NTFS
P3,E:\,7,86114091008,60153688064,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,D:\,7,148064485376,92745277440,Yes,multi(0)disk(0)rdisk(0)partition(4),No,NTFS
D4,0,0,0,200049647616
I don't use MacDrive except for in Windows XP (they don't let you install it on multiple OS's) so you don't see the HFS partitions above and the Apple Partition Map formatted external FireWire drive is probably the 3rd unknown volume. Note the drive letters for D3 are different than in Windows XP.

Registry items SystemPartition and BootDir are correct for Vista but bootgrabber /bootcfg is unable to detect the correct boot device:
Code:
C:\Program Files (x86)\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg \ArcName\multi(0)disk(0)rdisk(0)partition(0)
Unable to get volume information for \\?\Volume{61f460db-6c2f-11df-bbfa-806e6f6e6963}\
Unable to get volume information for \\?\Volume{e5d36fa4-6902-11dd-a511-806e6f6e6963}\
Unable to get volume information for \\?\Volume{e5d36fa5-6902-11dd-a511-806e6f6e6963}\
 Drive 1, Partition 2: No Windows installation found.
 Drive 1, Partition 3: No Windows installation found.
 Drive 1, Partition 4: No Windows installation found.
 Drive 2, Partition 2: No Windows installation found.
 Drive 3, Partition 2: Windows Vista+ (Ignored).
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).
Unable to detect correct boot device, quitting.

The following is the output when booting the Mac into Vista 32:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
Unable to get volume information for \\?\Volume{1f7d1319-6c36-11df-889a-806e6f6e6963}\
Unable to get volume information for \\?\Volume{ac9910de-67e8-11dd-aa7a-806e6f6e6963}\
Unable to get volume information for \\?\Volume{ac9910df-67e8-11dd-aa7a-806e6f6e6963}\
D0,3,3,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,L:\,175,64424509440,64424509440,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P3,P:\,175,255170232320,255170232320,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
D1,4,4,0,250059350016
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,F:\,12,1073741824,853708800,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,H:\,12,524288000,523059200,Yes,multi(0)disk(0)rdisk(2)partition(3),No,FAT
P4,I:\,1,2097152,636928,Yes,multi(0)disk(0)rdisk(2)partition(4),No,FAT
D2,2,2,0,1000204886016
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,K:\,7,21340618752,21340618752,Yes,multi(0)disk(0)rdisk(3)partition(3),Yes,
D3,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,D:\,7,85684600832,46316134400,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,C:\,7,86114091008,61794729984,Yes,multi(0)disk(0)rdisk(0)partition(3),Yes,NTFS
P4,E:\,7,148064485376,92745277440,Yes,multi(0)disk(0)rdisk(0)partition(4),No,NTFS
D4,0,0,0,200049647616

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg \ArcName\multi(0)disk(0)rdisk(0)partition(0)
Unable to get volume information for \\?\Volume{1f7d1319-6c36-11df-889a-806e6f6e6963}\
Unable to get volume information for \\?\Volume{ac9910de-67e8-11dd-aa7a-806e6f6e6963}\
Unable to get volume information for \\?\Volume{ac9910df-67e8-11dd-aa7a-806e6f6e6963}\
 Drive 0, Partition 2: No Windows installation found.
 Drive 0, Partition 3: No Windows installation found.
 Drive 1, Partition 2: No Windows installation found.
 Drive 1, Partition 3: No Windows installation found.
 Drive 1, Partition 4: No Windows installation found.
 Drive 2, Partition 2: No Windows installation found.
 Drive 3, Partition 2: Windows Vista+ (Ignored).
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).
Unable to detect correct boot device, quitting.
I'm not sure where it got drive letters L and P from. That disk doesn't show any drive letters in Disk Management at the moment. Maybe I had MacDrive running on this OS at one point and it assigned drive letters L and P and BootGrabber is picking up on that somehow (registry)?
Note the drive letters for D3 are different than for Vista 64 and Windows XP.

The following is the output when booting XP in Parallels Desktop:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
Unable to get volume information for \\?\Volume{5028091f-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{e2eaec42-682f-11dd-be87-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935be-d2ff-11dd-9264-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935bf-d2ff-11dd-9264-001c42817b26}\
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(3),No,
P2,E:\,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(0)partition(3),No,
P3,D:\,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(0)partition(3),No,
P4,C:\,7,148064485376,92742889472,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg \ArcName\multi(0)disk(0)rdisk(0)partition(0)
Unable to get volume information for \\?\Volume{5028091f-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{e2eaec42-682f-11dd-be87-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935be-d2ff-11dd-9264-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935bf-d2ff-11dd-9264-001c42817b26}\
 Drive 0, Partition 2: No Windows installation found.
 Drive 0, Partition 3: No Windows installation found.
 Located active partition on drive 0: \ArcName\multi(0)disk(0)rdisk(0)partition(4)
 Drive 0, Partition 4: Valid Windows 2k/XP/2k3 (Added).
Windows XP in Parallels Desktop has no problem detecting the boot device. The 4 unknown volumes are probably emulated CD drives or they might be volumes that were mounted before but not at the moment? I think they have registry entries that tell what they used to point to.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoint2\{xxx}
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoint2\Volume\CPC\{xxx}
HKLM\SYSTEM\MountedDevices

It looks like the current method (build 115) to locate an active partition doesn't work while the Mac is booted into Windows XP or Vista.
 
Unknown volumes are any disks without media present, nothing to worry about.

Thanks for verifying that the filesystem hack works - your output looks beautiful! :smile:

Honestly, I'm not surprised that the boot drive detection does not work when booted into XP via bootcamp. If you check out your partition table, you'll realize that you don't have any active partitions in the MBR on that disk!

Traditionally, in order to boot into anything you'd have one partition set as active and the BIOS would load the MBR which would then load that one partition. But in your case, the EFI bootloader has no need for the active flag, it's configured to directly load a particular partition's bootsector.

You can set the active flag in the MBR on the partition that is your boot drive (it won't affect anything in Windows, nor does it have any real meaning, though).

You would get the same results if you had a disk with no active partition and then you used a boot CD to get into Windows. BootGrabber can't identify the active partition because there is no active partition.

Of course, if it turns out that there *is* an active partition in your MBR, then you can disregard everything I just said and I'll try and see what went wrong.
 
I believe the boot process on the Mac (or any PC with EFI) is the same as PC after EFI loads the BIOS. I use rEFIt to boot an individual partition on the Mac. If the partition contains a legacy OS (DOS, Windows, Linux, etc. on an MBR formatted disk) and you don't select an EFI executable on the partition, then rEFIt does the following:
1) It sets an EFI NVRAM variable that specifies the selected disk.
2) It sets the active flag of the selected partition in the MBR of the disk containing the selected partition.
3) It starts the legacy OS loader which loads the BIOS which starts scanning for a boot disk starting with the disk that was set in NVRAM.

After that, everything is the same - the BIOS loads the MBR (I've verified this by modifying the MBR error strings and by using an AHCI enabling hack in the MBR), then the MBR loads and runs the boot blocks of the active partition, etc.

diskpart and dmdiag -v show a boot indicator for the partitions. I'm not sure if that's the active flag or something else.

Addendum:

I checked Disk Management. It shows the status of each partition Active/Boot/System. In Vista, it shows all applicable status (i.e. The Vista partition is Active, Boot, and System; two other partitions are just Active). In XP, it shows only the highest applicable flag in that order (i.e. the XP partition is Active, Boot, and System but Disk Management only shows System because that's the highest applicable flag). Actually, my Windows XP partitions show only as Boot because Windows is confused about which partition is the System partition and doesn't show any partition as being System... On my brother's Dell machine running XP, the XP partition is shown properly as System.
 
Last edited:
Interesting.

Can you try this one? Here I manually load the MBR and get the active flag (as I do for most other things, now....)
 

Attachments

  • BootGrabber.exe
    128 KB · Views: 2
BootGrabber output is unchanged for this version when booted into Windows XP in Parallels Desktop.
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
Unable to get volume information for \\?\Volume{5028091f-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{e2eaec42-682f-11dd-be87-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935be-d2ff-11dd-9264-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935bf-d2ff-11dd-9264-001c42817b26}\
D0,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(3),No,
P2,E:\,7,85684600832,85684600832,Yes,multi(0)disk(0)rdisk(0)partition(3),No,
P3,D:\,7,86114091008,86114091008,Yes,multi(0)disk(0)rdisk(0)partition(3),No,
P4,C:\,7,148064485376,93054533632,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg \ArcName\multi(0)disk(0)rdisk(0)partition(0)
Unable to get volume information for \\?\Volume{5028091f-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{e2eaec42-682f-11dd-be87-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935be-d2ff-11dd-9264-806d6172696f}\
Unable to get volume information for \\?\Volume{3df935bf-d2ff-11dd-9264-001c42817b26}\
 Drive 0, Partition 2: No Windows installation found.
 Drive 0, Partition 3: No Windows installation found.
 Located active partition on drive 0: \ArcName\multi(0)disk(0)rdisk(0)partition(4)
 Drive 0, Partition 4: Valid Windows 2k/XP/2k3 (Added).
It is still able to get the active partition.

The following is BootGrabber output when the Mac is booted in Windows XP:
Code:
C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /tlist
Unable to get volume information for \\?\Volume{50280910-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{50280911-67dc-11dd-b05c-806d6172696f}\
No active partition detected on disk 0.
No active partition detected on disk 4.
D0,3,3,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,O:\,7,64424509440,23910375424,Yes,multi(0)disk(0)rdisk(3)partition(2),No,HFSJ
P3,C:\Volumes\SnowLeopard\,7,255170232320,206560911360,Yes,multi(0)disk(0)rdisk(3)partition(3),No,HFSJ
D1,4,4,0,250059350016
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,I:\,12,1073741824,853712896,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,F:\,12,524288000,523100160,Yes,multi(0)disk(0)rdisk(2)partition(3),No,FAT
P4,J:\,1,2097152,643072,Yes,multi(0)disk(0)rdisk(2)partition(4),No,FAT
D2,2,2,0,1000204886016
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,P:\,7,21340618752,18118144000,Yes,multi(0)disk(0)rdisk(1)partition(2),Yes,EXT3
D3,4,4,0,320072933376
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,E:\,7,85684600832,46957850624,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,D:\,7,86114091008,60147617792,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,C:\,7,148064485376,92929269760,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS
D4,6,0,6,200049647616
P1,C:\Volumes\Work\,7,53687091200,5014814720,No,,No,HFSJ
P2,C:\Volumes\Devs\,7,42949672960,2387013632,No,,No,HFSJ
P3,C:\Volumes\Apps\,7,32212254720,10113748992,No,,No,HFSJ
P4,C:\Volumes\Updates\,7,42949672960,2742071296,No,,No,HFSJ
P5,T:\,7,8589934592,962797568,No,,No,HFS+
P6,U:\,7,7516192768,859000832,No,,No,HFS+

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg \ArcName\multi(0)disk(0)rdisk(0)partition(0)
Unable to get volume information for \\?\Volume{50280910-67dc-11dd-b05c-806d6172696f}\
Unable to get volume information for \\?\Volume{50280911-67dc-11dd-b05c-806d6172696f}\
No active partition detected on disk 0.
No active partition detected on disk 4.
 Drive 0, Partition 2: No Windows installation found.
 Drive 0, Partition 3: No Windows installation found.
 Drive 1, Partition 2: No Windows installation found.
 Drive 1, Partition 3: No Windows installation found.
 Drive 1, Partition 4: No Windows installation found.
 Drive 2, Partition 2: No Windows installation found.
 Drive 3, Partition 2: Windows Vista+ (Ignored).
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).
 Drive 4, Partition 1: No Windows installation found.
 Drive 4, Partition 2: No Windows installation found.
 Drive 4, Partition 3: No Windows installation found.
 Drive 4, Partition 4: No Windows installation found.
 Drive 4, Partition 5: No Windows installation found.
 Drive 4, Partition 6: No Windows installation found.
Unable to detect correct boot device, quitting.
The only difference between this and the previous version is the "No active partition" lines. I believe they are correct: Disk 0 has an MBR with no active partitions (both partitions are HFS and therefore don't need to be active); and Disk 4 is my APM formatted FireWire drive. I can't tell if it found the correct active partitions on Disk 1, 2, 3. BootGrabber /config is still unable to detect the correct boot device.

BootGrabber output when booting the Mac into Vista 32 or Vista 64 is similar to the above.

/tlist shows different information than /list. The yes/no for /tlist seems to be indicating active partition. The yes/no for /list is indicating primary partitions.

I'm still not sure why L and P are being shown when booted into Vista 32 but I guess it's not a big deal since they can't be used by any other partition at the same time. Attached is a screen shot of Disk Management when the Mac is booted into Vista 32.
 

Attachments

  • vista32.JPG
    vista32.JPG
    222.4 KB · Views: 1
I don't know much about BIOS or Windows but I guess that BIOS enumerates disks differently than Windows. BIOS uses INT13 stuff. Windows dumps all that for it's own drivers when it's booting up. BIOS can't always see all the drives that Windows can (e.g. USB, FireWire, some SATA ports that only work in AHCI mode while BIOS is running in IDE mode).

Does changing the boot order in BIOS on a normal PC change the physical drive order in Windows?

My Windows XP partition (D3,P4) has NeoGrub. When I select NeoGrub from the BOOTMGR on that partition and do a UUID command, it shows the following drives:
hd0 -> D3
hd1 -> D2
hd2 -> D1

When I boot into GRUB2 on my Ubuntu partition (D2,P2) and do some ls commands, it shows the following drives:
hd0 -> D2
hd1 -> D1
hd2 -> D3
hd3 -> D0

The following is where the drives are connected:
D0 -> Drive Bay 1
D1 -> Drive Bay 3
D2 -> Drive Bay 2
D3 -> Drive Bay 4
D4 -> FireWire

Note that every boot test I've done so far into a partition means that partition is the active partition on the boot disk and that partition contains the BOOTMGR, BCD, NTLDR, boot.ini, etc. necessary for booting and the option I selected in the BOOTMGR points to the OS on the same partition.
 
See, that's my biggest problem and what I have been talking about in this thread from the beginning and on these forums since I began working on Vista HnS.

Windows and the BIOS don't agree on a *lot* of stuff. But NTLDR uses INT13 and not the advanced disk enumeration of Windows. So it makes it hard to get in and get the real info.

I'm probably going to fall back to checking for those boot files. Let me do some more research and get back to you.
 
At least the rdisk numbers in the arc path seem to match the BIOS numbers that NeoGrub sees:

rdisk(0) -> D3 -> hd0
rdisk(1) -> D2 -> hd1
rdisk(2) -> D1 -> hd2
rdisk(3) -> D0 (-> hd3 probably)

So BIOS disk 0 (hd0 -> rdisk(0)) is the boot disk even though it is seen by Windows as physical disk 3.
 
That's what the output from BootGrabber and NeoGrub seem to indicate. Wherever you get the arc path from must be good for something.

This is only from viewing BIOS while booted from one of the hard drives though. It might be a good idea to test from a Windows on each disk, or try the one Windows disk in each drive bay. It would also be good to check the NeoGrub and rdisk numbers after booting from one partition into a different partition or a different disk... I guess the system disk (containing BOOTMGR) would always be BIOS disk 0 and the boot disk (containing Windows) would be anything else.
 
Back
Top