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

joevt

Distinguished Member
That worked but there is a problem.

Boot 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,0
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,92991225856,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).
All good.

Boot Mac into 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,3
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,O:\,7,64424509440,23910363136,Yes,multi(0)disk(0)rdisk(3)partition(2),No,HFSJ
P3,C:\Volumes\SnowLeopard\,7,255170232320,206535573504,Yes,multi(0)disk(0)rdisk(3)partition(3),No,HFSJ
D1,4,4,0,250059350016,2
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,I:\,12,1073741824,853725184,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,F:\,12,524288000,523059200,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,1
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,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,E:\,7,85684600832,47027216384,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,D:\,7,86114091008,61770838016,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,C:\,7,148064485376,92985516032,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS
D4,6,0,6,200049647616,0
P1,C:\Volumes\Work\,7,53687091200,5012271104,No,,No,HFSJ
P2,C:\Volumes\Devs\,7,42949672960,2387001344,No,,No,HFSJ
P3,C:\Volumes\Apps\,7,32212254720,10113736704,No,,No,HFSJ
P4,C:\Volumes\Updates\,7,42949672960,2742059008,No,,No,HFSJ
P5,T:\,7,8589934592,962785280,No,,No,HFS+
P6,U:\,7,7516192768,858988544,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).
 Located active partition on drive 0: \ArcName\multi(0)disk(0)rdisk(0)partition(4)
 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.
I see you added the BIOS drive number to each disk in /tlist.

/bootcfg sees the active partition on physical drive 3 (the message uses the BIOS disk number and calls it drive 0).

Does the \Arcname parameter after the /bootcfg parameter do anything? I think it would nice to have a /bootcfg option that doesn't cause BootConfig to change or copy any files.


Booting 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}\
No active partition detected on disk 0.
No active partition detected on disk 4.
D0,3,3,0,320072933376,3
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,2
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,F:\,12,1073741824,853725184,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,3
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,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,C:\,7,85684600832,46994370560,Yes,multi(0)disk(0)rdisk(0)partition(2),Yes,NTFS
P3,E:\,7,86114091008,61766643712,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,D:\,7,148064485376,92988096512,Yes,multi(0)disk(0)rdisk(0)partition(4),No,NTFS
D4,0,0,0,200049647616,0

C:\Program Files (x86)\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg
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}\
No active partition detected on disk 0.
No active partition detected on disk 4.
 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.
 Located active partition on drive 0: \ArcName\multi(0)disk(0)rdisk(0)partition(2)
 Drive 3, Partition 2: Windows Vista+ (Ignored).
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).
The arc paths don't mention an rdisk(1) which should be D2. Are you unable to get arc paths for partitions with no file system? Windows XP shows EXT3 for the partition. Vista doesn't have the Ext2Fsd installed.


Booting 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}\
No active partition detected on disk 0.
No active partition detected on disk 4.
D0,3,3,0,320072933376,3
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,2
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,F:\,12,1073741824,853725184,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,3
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,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
P2,D:\,7,85684600832,47021772800,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,C:\,7,86114091008,61809287168,Yes,multi(0)disk(0)rdisk(0)partition(3),Yes,NTFS
P4,E:\,7,148064485376,92988092416,Yes,multi(0)disk(0)rdisk(0)partition(4),No,NTFS
D4,0,0,0,200049647616,0

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg
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}\
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).
 Located active partition on drive 0: \ArcName\multi(0)disk(0)rdisk(0)partition(3)
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).
Again, the arc paths don't mention an rdisk(1).

It seems that rdisk numbers that are unique across physical disks are correct. e.g. In all the output above, only one disk mentions rdisk(0) or rdisk(1) or rdisk(2). rdisk numbers used for multiple physical disks are probably incorrect for some disks. e.g. rdisk(3). Is it not possible to determine when rdisk(3) is correct or incorrect? Also, aren't all arc path partition numbers that differ from the MBR partition number incorrect? I'm thinking the output may look neater if the arc path was suppressed (like the entries for D4) in cases where it is determined to be incorrect.

I found a problem with this solution though: If you choose to edit a BCD on a different partition, (e.g. boot Vista 32 but edit the BCD on Vista 64 or Windows XP) then ebcd.### and NTDETECT.COM are still placed on the system partition (e.g. Vista 32) but easyldr# is stored in the other partition's Windows \NST folder (on the partition containing the selected BCD). This makes the Windows XP entry unusable. Also, editing multiple Windows XP entries in multiple BCD's will overwrite ebcd.### files since they are numbered based on the easyldr# entries in the individual \NST folders.

So I think saving the files relative to the edited BCD is probably the best way to go as you already do for the files that go in the \NST folder and the non-XP auxiliary files (ANG#, NeoGrub etc).

Further reasoning: There is a distinction between editing/fixing Windows XP boot files and adding Windows XP to a BCD boot menu. EasyBCD is used to edit a BCD store. A BCD store is probably used by a BOOTMGR on the same partition, thus the \NST files (including ntldr/easyldr#) are stored on the same partition. BOOTMGR is a system file and NTLDR is also a system file. The files they use (the BCD and boot.ini/ebcd.###) are also system files. Therefore they should all be on the same partition. Since we only know where the BCD is, then that's the partition to use.
 

mqudsi

Mostly Harmless
Staff member
The rdisk value of 0 for disk 4 is a bug - it should have defaulted to -1 in order to avoid confusion with an actual rdisk of 0. In your case, everything was OK because disk 4 does not have any active partitions. If it did, EasyBCD would have written boot.ini to the wrong partition.

I already know about the issue when editing the BCD on another, manually selected drive. That I'm going to handle, it's (ostensibly) a trivial matter. It's the normal "auto-detect everything" mode that was giving me hell!

I can't get the arc paths for drives that have no valid filesystems. NTLDR/the windows boot process assigns the arc paths with the un-exported IoAssignArcName, IoCreateArcNames, and IoCreateSymbolicLink kernel functions during boot, and it can only do so to drives that it can mount in kernel space. To me, this is not an obstacle because it's impossible for the _Windows_ boot partition to be anything other than FAT32 or NTFS. I've played around with the bootloader to boot Windows from an ext3fs partition before, but never really got around to finishing it and to the best of my knowledge, no one else has done that either so it's a non-issue.
 

mqudsi

Mostly Harmless
Staff member
This bootgrabber should correctly show the arcpath = -1 for disk4 and any other disks with no arcpaths for any of their partitions.

the duplicate arc paths problem is because I use the partition serial number to map arc paths to disk#part# combos. Until I work around that issue (no clue how as of yet), it'll remain that way.
 

Attachments

  • BootGrabber.exe
    129 KB · Views: 2

joevt

Distinguished Member
All the partitions have unique serial numbers (The EFI partitions are actually FAT). Do they need to be mounted with a file system to get the serial number? Could you read the first block of a partition to get the number like NeoGrub does?

Different file systems use different serial numbers. NeoGrub shows 4 bytes for FAT, 8 bytes for NTFS (The dir command in Windows shows 4 of those bytes), and a GUID for the EXT partition. HFS partitions also have a number (8 bytes). I guess you only need to worry about FAT and NTFS though.
 

mqudsi

Mostly Harmless
Staff member
I could.. Question is, how big of a block would I need to read? 1MB? 4MB? How would this deal with cloned partitions?
 

joevt

Distinguished Member
I thought the boot block would always be the first 512 bytes of a partition. The code you linked to me before http://www.codeproject.com/KB/system/change_drive_sn.aspx makes that assumption.
As for cloned partitions, does your method generate a different serial number for each partition? I don't know what your using the serial number for. Presumably, there's a table of volumes with serial numbers and arc paths that you're looking into. Does that table have different serial numbers for cloned partitions? How does that table distinguish between cloned partitions?

IoAssignArcName and IoCreateSymbolicLink are documented. IoCreateArcNames is a ReactOS thing. But I don't see a method for getting assigned arc names. There's methods for creating and deleting SymbolicLink but I don't see any for getting. Actually there's a method IoGetDeviceInterfaces. Maybe Interface is another name for SymbolicLink.

Have you looked at the WinObj http://technet.microsoft.com/en-us/sysinternals/bb896657.aspx utility? It shows ArcName symlinks to hard disk partition devices using the NT Object Manager. It looks like the Object Manager has everything you need. It shows the origin of the \ArcName and \Device and \\.\PhysicalDrive0 etc. names I've been seeing everywhere.
 
Last edited:

mqudsi

Mostly Harmless
Staff member
My method doesn't return different serial numbers, so it would be no better and even worse because it's more complex. But there has to be _some_ way of pulling it off.

IoAssignArcName and IoCreateSymbolicLink are documented but not exported. Which means I can't use them from userspace, only in kernel extensions and drivers.

I'm looking at WinObj now... We're soooooo close to a 100% working solution!
 

joevt

Distinguished Member
The following is the BootGrabber output from the latest BootGrabber:
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,3
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,O:\,7,64424509440,23910227968,Yes,multi(0)disk(0)rdisk(3)partition(2),No,HFSJ
P3,C:\Volumes\SnowLeopard\,7,255170232320,206561460224,Yes,multi(0)disk(0)rdisk(3)partition(3),No,HFSJ
D1,4,4,0,250059350016,2
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,523059200,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,1
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,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,E:\,7,85684600832,47027232768,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,D:\,7,86114091008,61814575104,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,C:\,7,148064485376,93010370560,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS
D4,6,0,6,200049647616,-1
P1,C:\Volumes\Work\,7,53687091200,5008424960,No,,No,HFSJ
P2,C:\Volumes\Devs\,7,42949672960,2386993152,No,,No,HFSJ
P3,C:\Volumes\Apps\,7,32212254720,10113732608,No,,No,HFSJ
P4,C:\Volumes\Updates\,7,42949672960,2742042624,No,,No,HFSJ
P5,T:\,7,8589934592,962777088,No,,No,HFS+
P6,U:\,7,7516192768,858980352,No,,No,HFS+
The BIOS disk number for D4 is now properly -1.

I've added some screen shots from WinObj. A tool that produces text output would be easier to use...

The ArcName folder shows all the ArcNames currently assigned and to which disk or partition they point to. The GLOBAL?? folder shows what devices all the global DosDevice names are linked to. There are local DosDevice names in \Sessions\0\DosDevices\00000000-0001ac79\. Volumes have multiple DosDevice names. I don't have a screen shot of cloned partitions or Dynamic disks to illustrate how they are handled. I've only got Basic disks.

With the Object Manager information, you can match disks, paritions, volumes, and ArcNames together. A lot of APIs use the Object Manager internally and some of them will get you the same information but it seems like it would be easier to just go to the source.
 

Attachments

  • DosDevices.png
    DosDevices.png
    242.2 KB · Views: 3
  • WinObj.png
    WinObj.png
    136.4 KB · Views: 3

joevt

Distinguished Member
All partitions now have correct arcptaths and /bootcfg now shows physical drive number for located active partition.

Output from booting 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,3
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,O:\,7,64424509440,23910223872,Yes,multi(0)disk(0)rdisk(3)partition(2),No,HFSJ
P3,C:\Volumes\SnowLeopard\,7,255170232320,206486491136,Yes,multi(0)disk(0)rdisk(3)partition(3),No,HFSJ
D1,4,4,0,250059350016,2
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(2)partition(1),No,
P2,I:\,12,1073741824,853708800,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,636928,Yes,multi(0)disk(0)rdisk(2)partition(4),No,FAT
D2,2,2,0,1000204886016,1
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(1)partition(1),No,
P2,P:\,7,21340618752,18118144000,Yes,multi(0)disk(0)rdisk(1)partition(2),Yes,EXT3
D3,4,4,0,320072933376,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(1),No,
P2,E:\,7,85684600832,47027236864,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,D:\,7,86114091008,61814583296,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,C:\,7,148064485376,84298502144,Yes,multi(0)disk(0)rdisk(0)partition(4),Yes,NTFS
D4,6,0,6,200049647616,-1
P1,C:\Volumes\Work\,7,53687091200,5008576512,No,,No,HFSJ
P2,C:\Volumes\Devs\,7,42949672960,2386989056,No,,No,HFSJ
P3,C:\Volumes\Apps\,7,32212254720,10113728512,No,,No,HFSJ
P4,C:\Volumes\Updates\,7,42949672960,2742034432,No,,No,HFSJ
P5,T:\,7,8589934592,962772992,No,,No,HFS+
P6,U:\,7,7516192768,858976256,No,,No,HFS+

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg
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).
 Located active partition on drive 3: \ArcName\multi(0)disk(0)rdisk(0)partition(4)
 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.

Output from booting 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}\
No active partition detected on disk 0.
No active partition detected on disk 4.
D0,3,3,0,320072933376,3
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,,175,64424509440,64424509440,Yes,multi(0)disk(0)rdisk(3)partition(2),No,
P3,,175,255170232320,255170232320,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
D1,4,4,0,250059350016,2
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(2)partition(1),No,
P2,F:\,12,1073741824,853708800,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,H:\,12,524288000,523100160,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,1
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(1)partition(1),No,
P2,K:\,7,21340618752,21340618752,Yes,multi(0)disk(0)rdisk(1)partition(2),Yes,
D3,4,4,0,320072933376,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(1),No,
P2,C:\,7,85684600832,46368231424,Yes,multi(0)disk(0)rdisk(0)partition(2),Yes,NTFS
P3,E:\,7,86114091008,61810253824,Yes,multi(0)disk(0)rdisk(0)partition(3),No,NTFS
P4,D:\,7,148064485376,84300972032,Yes,multi(0)disk(0)rdisk(0)partition(4),No,NTFS
D4,0,0,0,200049647616,-1

C:\Program Files (x86)\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg
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}\
No active partition detected on disk 0.
No active partition detected on disk 4.
 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.
 Located active partition on drive 3: \ArcName\multi(0)disk(0)rdisk(0)partition(2)
 Drive 3, Partition 2: Windows Vista+ (Ignored).
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).


Output from booting 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}\
No active partition detected on disk 0.
No active partition detected on disk 4.
D0,3,3,0,320072933376,3
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(3)partition(1),No,
P2,L:\,175,64424509440,64424509440,Yes,multi(0)disk(0)rdisk(3)partition(2),No,
P3,P:\,175,255170232320,255170232320,Yes,multi(0)disk(0)rdisk(3)partition(3),No,
D1,4,4,0,250059350016,2
P1,,238,223000808960,223000808960,Yes,multi(0)disk(0)rdisk(2)partition(1),No,
P2,F:\,12,1073741824,853708800,Yes,multi(0)disk(0)rdisk(2)partition(2),Yes,FAT32
P3,H:\,12,524288000,523100160,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,1
P1,,238,139930390016,139930390016,Yes,multi(0)disk(0)rdisk(1)partition(1),No,
P2,K:\,7,21340618752,21340618752,Yes,multi(0)disk(0)rdisk(1)partition(2),Yes,
D3,4,4,0,320072933376,0
P1,,238,209735168,209735168,Yes,multi(0)disk(0)rdisk(0)partition(1),No,
P2,D:\,7,85684600832,46496305152,Yes,multi(0)disk(0)rdisk(0)partition(2),No,NTFS
P3,C:\,7,86114091008,61768880128,Yes,multi(0)disk(0)rdisk(0)partition(3),Yes,NTFS
P4,E:\,7,148064485376,84300972032,Yes,multi(0)disk(0)rdisk(0)partition(4),No,NTFS
D4,0,0,0,200049647616,-1

C:\Program Files\NeoSmart Technologies\EasyBCD\bin>bootgrabber /bootcfg
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}\
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).
 Located active partition on drive 3: \ArcName\multi(0)disk(0)rdisk(0)partition(3)
 Drive 3, Partition 3: Windows Vista+ (Ignored).
 Drive 3, Partition 4: Valid Windows 2k/XP/2k3 (Added).

Remaining issues (all minor):
1) (already mentioned) For Vista 32 output, the L and P drives don't have a drive letter in Disk Management, Explorer, or in the DosDevices object manager list. L and P are probably stored in the Registry for when I choose to boot again with an HFS driver enabled?
2) (already mentioned) Editing a BCD on a different partition and adding a Windows XP entry puts NTDETECT.COM and boot.ini on wrong partition.
3) (new one I just thought of but haven't tested) Adding a Windows XP entry to a BCD on a different disk will probably use incorrect Arc paths in the .ini.
e.g. if you boot disk A which is rdisk(0) and edit BCD on disk B which is currently rdisk(1), the boot.ini will contain the correct arc path only if the disk containing Windows XP has the same rdisk number when booting disk B as it does when booting disk A. This is not guaranteed because rdisk numbers will be shuffled such that disk B will be rdisk(0) when it is booted, disk A will be not rdisk(0), and the disk containing XP may be different because of those changes.
 

mqudsi

Mostly Harmless
Staff member
Joe, thanks for all your help. Seriously, we usually get a lot of bug reports but no one with the patience to stick it through the R&D phase so many bugs end up on the "known but unable to reproduce in a controlled testing environment" phase.

As for the other issues:

1) Yep, that's correct. Since I can no longer rely on Windows API for practically anything, I get the raw disk signature + partition offset and compare it to the cached values in Windows. There *is* a new API that will probably do the trick, but it's only available on Vista+, while XP is my minimum supported operating system.

2) Will work on that Sunday :smile:

3) Changing the boot drive on the same machine to boot into a different OS is completely unsupported. EasyBCD (and all our software) assumes that you never change the boot drive from the BIOS and always use a software bootloader to manage your multi-boots. Alas, *this* is one thing that can't be worked around via software. If you change your hardware config around (even if only virtually by selecting a different boot device), you're on your own. We advise people to always use a fixed boot device and use EasyBCD to configure their dual-boot before doing anything else.
 

joevt

Distinguished Member
1) I was thinking you could look at the list of drive letters in the \GLOBAL?? directory. There's a SymbolicLink \DosDevices too.
Named Device Objects (Windows Driver Kit)
Introduction to MS-DOS Device Names (Windows Driver Kit)
Local and Global MS-DOS Device Names (Windows Driver Kit)
Maybe you could try CreateFile (or whatever API) with "\\.\L:" to test if L: actually exists currently. Another method would be to match a drive letter in the \DosDevices Object Manager list to a partition using the drive letter's SymbolLinks.

3) For this maybe a warning could be displayed if the currently selected BCD is not on the boot disk and the user tries to create an entry such as Windows XP that depends on the BIOS disk number and that entry needs to point to a different disk than the one containing the selected BCD (I think it's safe to assume that anything on the disk containing the selected BCD will be disk 0 when that BCD is booted). I forget if the other options like the ones that use AutoNeoGrub use a hard coded disk number at all. It's safe to remove entries from any BCD as long as EasyBCD is only removing stuff from the disk containing the BCD.
 

mqudsi

Mostly Harmless
Staff member
1) Yes, I definitely could. I'm just trying to decide if it's a good thing or a bad thing that I display drive letters for currently un-mounted partitions. I already use DosDevices for a lot of things.

3) possibly. I'll look into it, there may be a more elegant solution out there such as prompting the user to manually select what he knows to be the boot partition and doing something with that.
 

joevt

Distinguished Member
1) I was thinking that making the output show what Disk Management does would be good. There are two kinds of un-mounted volumes - unformatted drives that have drive letters and appear in Disk Management and Explorer (e.g. my D: and E: in Parallels), and drives that have an unrecognized file system with stale drive letters that don't appear in Disk Management and Explorer (L: and P: in my Vista 32).

3) Right. A warning that says "you shouldn't do this", or a dialog that says "go ahead but you need to tell me what these drive/s are going to be". An entry may require more than one drive to be specified (e.g. multiple XP's require multiple entries in boot.ini). I don't think the user will know any better than EasyBCD how the drives are going to be enumerated in BIOS though. I figured that if a user was going to edit a BCD located at \Boot\BCD then the disk containing that BCD would have to be drive 0 when that BCD is used for booting (if we can assume that only a BOOTMGR on the same partition as the BCD could use that BCD and that BOOTMGR must always be on disk 0 when it boots).
 

mqudsi

Mostly Harmless
Staff member
EasyBCD 2.0.2 released that incorporates these changes.

For now, when using a manually selected BCD, boot.ini is created on the same partition that the BCD is loaded from.
 

macycat

Member
EasyBCD 2.0.2 released that incorporates these changes.

For now, when using a manually selected BCD, boot.ini is created on the same partition that the BCD is loaded from.

I have messed around with this issue for hours today, but I didn't find this thread until much later. It seems like EasyBCD works great for my Win7 and Linux installs, but it has trouble with the XP installs. From a user perspective (and to be honest, I don't understand everything you two have been discussing), problems occur when you try to do a boot of XP from a different disk than the BCD file is on.

My setup is a Win7 and an XP install on an SSD and a Win 7, an XP, and a Linux install on a hard drive (HD). The BCD files are on the XP partitions for both the SSD and HD. I tried to boot all five installs from the SSD and the hard drive the XP, the Win7, and Linux installs from the HD. But no matter what I tried for the settings of the XP install on the SSD boot setup , it would only boot to the SSD XP install. I finally modified the boot.ini file on the SSD XP partition to include both XP installs. This, of course, leads to a second boot menu (not optimal). On the HD boot.ini file, I only listed the HD XP install.

It seems like this happens either if I use the local BCD file or a remote one.

A few interesting things that I noticed - booting from the SSD into Linux provided a boot menu back to both the SSD and HD boot menus. 1) When I booted from the SSD, selected Linux, then selected the HD boot menu, the boot menu came up fine. It listed Win7, XP, and Linux ... just how I set it up on the HD. But when I selected the HD XP install, it booted up the SSD XP install. It looks like the HD BCD calls the SSD XP ntldr. 2) When I booted from the HD, I could get to the HD XP and HD Win7 installs as expected. I could also get to the Linux install. If from there I selected the SSD boot menu, I got all five options, but selecting either XP option would directly boot the HD XP install. Again, it looks like the XP ntldr that gets called is dependent on the boot drive, not the desired one. 3) I usually got the NSF directory, but I really couldn't get the easyldr or ebcdxxx files to be created.

Is the easyldr and ebcdxxx approach not being implemented right now because of the XP booting issue? In any case, don't give up ... it seems like you are really close. By the way, I am using version 2.0.2.117.
 

mqudsi

Mostly Harmless
Staff member
Hi macycat, welcome to NST.

In order to use easyldr instead of NTLDR, you need to manually select the drive that your XP installs are on.

If you use the defaults and have the "autoconfigure" checkbox ticked, it'll use NTLDR the old way. But if you manually add two entries for the two different drives (by unchecking the checbox first), it'll go through easyldr.

Give it a shot and let me know how it goes.

Addendum:

btw, complete EasyLDR documentation can be found here: Windows XP - EasyBCD - NeoSmart Technologies Wiki

(complete with charts and pictures)
 
Last edited:

macycat

Member
Hi macycat, welcome to NST.

In order to use easyldr instead of NTLDR, you need to manually select the drive that your XP installs are on.

If you use the defaults and have the "autoconfigure" checkbox ticked, it'll use NTLDR the old way. But if you manually add two entries for the two different drives (by unchecking the checbox first), it'll go through easyldr.

Give it a shot and let me know how it goes.

Addendum:

btw, complete EasyLDR documentation can be found here: Windows XP - EasyBCD - NeoSmart Technologies Wiki

(complete with charts and pictures)

I did read through that description .. .by the way, that is an excellent job of documenting how things work. Unfortunately, I keep getting the "valid XP install not found" error. What does EasyBCD need to declare finding a valid XP install? Also, the choice of drive letters and how they are displayed is confusing to me. How does this work for the two cases of 1) accessing the BCD from an install on the same disk and 2) accessing the BCD from an install on a different disk?

Thanks.

I would like to point out that I didn't think that I would be able to access installs on a drive different from the boot drive. EasyBCD allowed me to do that (although with a two-step boot menu ... at least for now!)
 

Terry60

Telephone Sanitizer (2nd Class)
Staff member
The BCD doesn't contain any partition letters.
Letters are virtual labels for partitions, held in the registry of the running OS.
They differ from system to system.
The letters you see in EasyBCD are translations of the UID information held in the BCD into the more familiar (and easily understood) disk letters as seen by the system that's running EasyBCD.
You must speak to EasyBCD in the same language. i.e. use the letter for the XP partition that the running system sees it as.
 

macycat

Member
The BCD doesn't contain any partition letters.
Letters are virtual labels for partitions, held in the registry of the running OS.
They differ from system to system.
The letters you see in EasyBCD are translations of the UID information held in the BCD into the more familiar (and easily understood) disk letters as seen by the system that's running EasyBCD.
You must speak to EasyBCD in the same language. i.e. use the letter for the XP partition that the running system sees it as.

That's what I have been trying to do, but I seem to get the "valid XP install not found" error no matter what I try.

Here is my setup (if I boot from my SSD --- if I boot from my HD, Disk0 and Disk1 get swapped):

Disk0 Part 1 - XP, BCD and XP boot files
Disk0 Part 2 - Win7

Disk1 Part1 - XP, BCD and XP boot files
Disk1 Part2 - Win7
Disk1 Part3 - Linux

I still have the remaining questions: What does EasyBCD need to declare finding a valid XP install? Does the drive letter labeling work differently when 1) accessing the BCD from an install on the same disk or 2) accessing the BCD from an install on a different disk? Why do I get the "valid XP install not found" error?


Thanks.
 
Top