Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
simonking

VHD Native Boot with Junctions

Recommended Posts

The VHD is not the issue, even in the Paragon test case that works.

 

The only remaining issue is the partition. Would you all agree?

 

What could possibly be a factor in creating a partition that might affect this?

 

Any must-have steps?

Edited by simonking

Share this post


Link to post
Share on other sites

I've done MountedDevices manipulations, all to no effect.

....

The only remaining issue is the partition. Would you all agree?

What could possibly be a factor in creating a partition that might affect this?

Any must-have steps?

Things to check are/can be:

  • Disk signature.
  • Offset to active partition (if you prefer partition alignment) and active status
  • Volume serial.
  • Volume label.
  • CHS geometry (but that should not be anympore an issue with Windows Vista and later boot code)

Basically all you have to compare are the MBR's and the VBR's of the two .vhd's for any difference, *everything else* is within the "normally accessible" areas of the filesystem and won't make a difference.

jaclaz

Share this post


Link to post
Share on other sites

Thanks for the information. Here's some output I've taken from the VHD's and Partitions that work and fail.

Volume P: - works.

Volume Z: - fails.

Disk 1 - VHD for Drive P.

Disk 2 - VHD for Drive Z.

Does any of this provide any insight?

Here's advanced diagnostics on each drive:

Drive P: - boots

->Boot Sector

cOEMID: NTFS

Size: 63320358400 bytes, 60386 Mbytes

TotalSectors: 123672575

SectorsPerTrack: 63

Heads: 255

->Partition_Info Type: 7, Advanced Unix QNX QNX OS/2 HPFS WindowsNT NTFS

->DeviceNumber: 1 PartitionNumber:1 Type:7

->VolumeGUID: \\?\Volume{20c8bc3d-cb37-11e3-8352-281878b6c447}\

->GetDiskFreeSpace

Sectors per cluster: 8

Bytes per sector: 512

ClusterSize: 4096

Total clusters: 15459071 (60386 MB)

Free Clusters: 11313312 (44192 MB) / Used Clusters: 4145759 (16194 MB)

Drive Z: - fails

->Boot Sector

cOEMID: NTFS

Size: 11810045440 bytes, 11262 Mbytes

TotalSectors: 23066495

SectorsPerTrack: 63

Heads: 255

->Partition_Info Type: 7, Advanced Unix QNX QNX OS/2 HPFS WindowsNT NTFS

->DeviceNumber: 2 PartitionNumber:1 Type:7

->VolumeGUID: \\?\Volume{20c8be9a-cb37-11e3-8352-281878b6c447}\

->GetDiskFreeSpace

Sectors per cluster: 8

Bytes per sector: 512

ClusterSize: 4096

Total clusters: 2883311 (11262 MB)

Free Clusters: 30949 (120 MB) / Used Clusters: 2852362 (11142 MB)

post-392023-0-26508200-1398363472_thumb.

post-392023-0-93365800-1398363506_thumb.

post-392023-0-48426400-1398363508_thumb.

post-392023-0-65096100-1398363509_thumb.

Share this post


Link to post
Share on other sites

One of the two (the one that fails seemingly) has 128 sectors before (unusual but that should not create any issue) and is active whilst the one that works has 2048 (normal alignment nowadays) and is not active (but since the BOOTMGR and \boot\BCD are "elsewhere" it's fine).

But you failed to post info about the Disk Signature and the Mounteddevices data you have in the Registry, and the *whatever* you have in your \boot\BCD for the two .vhd's.

jaclaz

Share this post


Link to post
Share on other sites

The Active issue is probably not an issue with the partition that does work, precisely due to the reason that you mentioned.

Edited by simonking

Share this post


Link to post
Share on other sites

The MountedDevices are fixed up for both VHDs. In fact, it even works when I delete all keys under MountedDevices.

The Active issue is probably not an issue with the partition that does work, precisely due to the reason that you mentioned.

Where can I locate the Disk Signature? Hopefully that is the problem!

Well, I wonder how you can check if you have the "right" MountedDevices entries without knowing the Disk Signature as the former is made out of the latter.

However JFYI:

http://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm

http://www.911cd.net/forums//index.php?s=&showtopic=19663&view=findpost&p=130963

http://www.multibooters.com/tutorials/view-and-change-disk-signature-in-mbr.html

Also, the \boot\BCD entries, as said, may be relevant.

jaclaz

Share this post


Link to post
Share on other sites

Wow thanks, I will check that out!

Well none of this helped unfortunately. It just doesn't work.

I've also tried setting the partition offset to 1024 KB, that didn't help.

I also changed the boot code in the MBR to 00 from 80, seeing that it was yet another difference between the Paragon setup and my own, per the screenshots above. That didn't help either.

I was pretty sure that I had the issue narrowed down to the partition level; but I really don't see what other sleuthing I could do at the partition level anymore?

What about the boot\BCD entries? Here's the current output:

Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=\Device\HarddiskVolume2
path \EFI\Microsoft\Boot\bootmgfw.efi
description Windows Boot Manager
locale en-us
inherit {globalsettings}
default {current}
resumeobject {73dab109-c8d8-11e3-832d-005056c00008}
displayorder {current}
{73dab115-c8d8-11e3-832d-005056c00008}
toolsdisplayorder {memdiag}
timeout 30

Windows Boot Loader
-------------------
identifier {current}
device partition=C:
path \windows\system32\winload.efi
description Windows 8.1
locale en-us
inherit {bootloadersettings}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \windows
resumeobject {9ac1b3b6-bcc9-11e3-82d0-281878d2c336}
nx OptIn
bootmenupolicy Standard
detecthal Yes

Windows Boot Loader
-------------------
identifier {73dab115-c8d8-11e3-832d-005056c00008}
device vhd=[D:]\myvhd.vhd
path \windows\system32\winload.efi
description My Own VHD
locale en-us
inherit {bootloadersettings}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice vhd=[D:]\myvhd.vhd
systemroot \windows
resumeobject {9ac1b3b6-bcc9-11e3-82d0-281878d2c336}
nx OptIn
bootmenupolicy Standard
detecthal Yes

Edited by simonking

Share this post


Link to post
Share on other sites

Here's the current output:

Good, but what to compare it with? :unsure:

Also, try setting the Disk Signature of your "created" image to the SAME Disk Signature the Paragon made image has, same for offset, same for volume label and serial.

Or, do the reverse, i.e. change the Paragon made image, changing one at the time these things (Disk Signature, Volume Label, Volume Serial).

Check for any other difference in the actual filesystem between the Paragon created image and yours.

jaclaz

Edited by jaclaz

Share this post


Link to post
Share on other sites

What to compare with? The Paragon entries are identical for VHD boot - except the obvious differences, of course (VHD path and boot entry name and GUID).

 

What do you mean by setting the Disk Signature? Of course, the problem is, I cannot even get that far, unfortunately. That stuff happens after the "spinner" has successfully shown.

 

If you mean something else by disk signature, please let me now. The volume label and serial also have no effect.

Edited by simonking

Share this post


Link to post
Share on other sites

Let's see if I can sum up the experience till now, I miss bit and pieces of the procedure you followed.

1. You have a "main" (normally working) Windows, let's call it the "C:\Windows". The BOOTMGR and \boot\BCD reside in the "hidden" 100 Mb partition.

2. Then you have another instance of Windows, let's call it the "D:\Windows" on another partition, also working.

3. Somehow you must have added this "D:\Windows" booting option to the \boot\BCD to test that it works and boots.

4.Then you use Paragon *whatever* to "clone" (actually image) the D:\Windows install to a .vhd, let's call this "ParagonWindows.vhd".

5. Somehow you must have added this "ParagonWindows.vhd" booting option to the \boot\BCD to test that it works and boots.

6.Then you create with your own tools, with a procedure that you don't want to disclose, a new .vhd with EXACTLY the same contents (according to you) of BOTH the "D:\Windows" and of the "ParagonWindows.vhd", let's call this "MyOwnWindows.vhd".

7. Somehow you must have added this "MyOwnWindows.vhd" booting option to the \boot\BCD to test that it works BUT find out that it does not boot

I have more or less clear points 1.,2., 4. and 6. above (but feel free to correct those points also), I have NO idea of what you did in points 3., 5. and 7. (and not even if they exist at all or if the "vague" descripton I made is in any way accurate.

About DIsk Signature, you have right now the "ParagonWindows.vhd" working, try:

  • AFTER having made a backup of it's MBR (first sector) hex edit it to change the Disk Signature in it to a "random" one
  • Try booting from the "ParagonWindows.vhd"
  • If it fails, try again after having completely cleared the MountedDevices in the Registry of the "ParagonWindows.vhd"

What happens?

Try restoring the backed up MBR and repeat.

What happens?

If you prefer try "negative" troubleshooting, i.e. instead of changing things (always one by one) to the .vhd that is not working, try changing things (still one at the time) to the .vhd that is working, until it fails to work, then last thing you changed will be the one that "s different " and probably causes the issue:

jaclaz

Edited by jaclaz

Share this post


Link to post
Share on other sites

I'm happy to amend/recap this for you:

 

1. You have a "main" (normally working) Windows, let's call it the "C:\Windows". The BOOTMGR and \boot\BCD reside in the "hidden" 100 Mb partition.

 

Yes, that is correct.

 

2. Then you have another instance of Windows, let's call it the "D:\Windows" on another partition, also working.

 

Allow me to amend this by saying that I copy my C: partition into the next available free space on the disk as the D: partition using Paragon.

 

3. Somehow you must have added this "D:\Windows" booting option to the \boot\BCD to test that it works and boots.

 

Paragon does this automatically as part of the cloning. I can also delete this boot option using:

 

bcdedit /delete {paragonguid} // where paragonguid is the new guid

 

4.Then you use Paragon *whatever* to "clone" (actually image) the D:\Windows install to a .vhd, let's call this "ParagonWindows.vhd".

 

I believe Paragon does have some kind of physical to virtual migration option, but I have never tried that option, up to and including now.

 

5. Somehow you must have added this "ParagonWindows.vhd" booting option to the \boot\BCD to test that it works and boots.

 

The exact commands for your review are:

 

bcdedit /copy {current} /d Paragon VHD

bcdedit /set {paragonguid} device vhd=[locate]\paragon.vhd

bcdedit /set {paragonguid} osdevice vhd=[locate]\paragon.vhd

 

Alternately:

 

bcdedit /copy {current} /d Paragon VHD

bcdedit /set {paragonguid} device vhd=[e:]\paragon.vhd

bcdedit /set {paragonguid} osdevice vhd=[e:]\paragon.vhd

 

6.Then you create with your own tools, with a procedure that you don't want to disclose, a new .vhd with EXACTLY the same contents (according to you) of BOTH the "D:\Windows" and of the "ParagonWindows.vhd", let's call this "MyOwnWindows.vhd".

 

There is definitely something up with the way Paragon creates partitions, or similar. That is the only remaining difference between my own tests and using Paragon in between.

 

7. Somehow you must have added this "MyOwnWindows.vhd" booting option to the \boot\BCD to test that it works BUT find out that it does not boot

 

Yes. Same bcdedit commands as above.

 

Now, do you have any specific commands I can use to backup the MBR, and to edit it? Any tools you would recommend, any specific steps? Happy to try them all out.

Edited by simonking

Share this post


Link to post
Share on other sites

Yep, what I am perplexed is the lack of any error, BSOD or whatever on the failing image.

What about running Bcdboot and/or bootsect.exe? :unsure:

Till now we have not reviewed if the actual CODE is there (both in the MBR and in the VBR).

You could make a backup of the MBR and of the VBR of both .vhd's, compress the four files together in a .zip archive and attach them to your next post, so that I can have a look at them.

Clonedisk should be able to do these backups, just in case, an easy GUI tool is Hdhacker:

http://dimio.altervista.org/eng/index.html

Or, if you are more a command line oriented what you cannot miss is the dsfok toolkit:

http://members.ozemail.com.au/~nulifetv/freezip/freeware/

see:

http://www.msfn.org/board/topic/162668-make-a-proper-dual-boot/?p=1037471

for some usage examples.

Anyway for the Disk Signature, *any* hex/disk editor would do, I am "partial" to good ol' Tiny Hexer (with my viewers for it):

http://reboot.pro/topic/8734-tiny-hexer-scripts/

but since you only have to play with the Disk Signature (as Clonedisk that you are already using has provisions for the Label and volume serial, besides exact CHS/LBA creation of the partition) MBRFIX would do nicely:

http://www.sysint.no/nedlasting/mbrfix.htm

http://www.sysint.no/products/Download/tabid/536/language/en-US/Default.aspx

see also:

http://www.msfn.org/board/topic/30378-fixmbr/?p=387013

(the current version of MBRFIX has more commands, and my pseudo-GUI was never updated, but fuwi's one should be):

http://reboot.pro/topic/4530-gui-for-mbrfix/

(that is if you actually want a GUI)

jaclaz

P.S.: erwan.l has just kindly added a "Change Disk ID" feature to Clonedisk:

http://reboot.pro/topic/8480-clonedisk/?p=183813

Edited by jaclaz

Share this post


Link to post
Share on other sites

I’ve dumped the attached data for my drives, drive P works and drive Z fails. Drive 1 is the VHD for P and Drive 2 is the VHD for Z.

I’ve got something incredible to report…I cloned the non-booting VHD partition into another identically sized VHD that I made by copying the original VHD file, mounting it, deleting the partition, and then cloning the partition inside the original VHD using Paragon.

This boots!

What gives? None of this seems to make any sense…

dat files.zip

Share this post


Link to post
Share on other sites

About the files you posted:

The MBR_HardDisk1.dat contains Windows 7 code.
The MBR_HardDiks2.dat contains Windows 8 code.

I am less sure about the code in the VBR.

The Bootsector_DriveP.dat contains boot code that is similar to Windows 7 code, but which is seemingly partially different.
The BootSector_DriveZ.dat contains Windows 8 code.

Cannot say if this is "by design" and/or if it is connected to the issue at hand.

jaclaz

Share this post


Link to post
Share on other sites

So it looks like *part* of what Paragon is doing is injecting its own boot code to the MBR and the BS. Can you also clarify what you mean about the VBR (that is, what *is* this VBR)? Are there any other parts to check that I might have missed for comparisons?

Short of doing a full binary comparison of the VHDs - which also I plan to do, do you have any suggestions for a good HEX DIFF tool? - is there anything else I can check? I did try to manually inject the Paragon MBR and the BS into the failing VHD/partition, but that did not appear to fully succeed with CloneDisk, so I am not sure whether those would be the ultimate fix either, as I was not able to fully test it. I'm also going to try the G4D boot loader with CloneDisk.

Also, is there any consideration for the files bootmgr and BOOTNXT, or are these OK to just copy as plain files?

There might be a problem with HDHacker, the changes it makes to Logical Drive (BootSector) seem to stick, but the changes it makes to the Physical Drive (MBR) do not seem to stick, even though there are no error messages shown. So maybe that's why my boot effort is still failing, assuming the Paragon boot regions are indeed the cure to the problem. Is there another tool that can copy the MBR from one drive to another?

Edited by simonking

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...