Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

VHD Native Boot with Junctions


  • Please log in to reply
38 replies to this topic

#1
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

I've been trying to do something interesting with native VHD boot.

 

Has anybody tried to do anything like this? I've been at it for a few weeks now, without much progress. I did get this working with physical partitions before.

 

Are there any particular gotcha's with this process? I've tried bootsect /nt60 z: /force /mbr, bcdboot z:\windows, both [locate] and the physical drive path of the VHD with bcdedit, all to no avail.

 

The Windows 8 spinner never shows, and the boot consistently fails.

 

The same method does succeed when I clone my OS into the VHD using some kind of disk cloning software. There's some extra stuff that the disk cloning software does, apparently, but I haven't been able to figure it out, even despite comparing registries.

 

Does the VHD have to be created a particular way? I've even tried both GPT and MBR partitions.


Edited by simonking, 08 May 2014 - 02:20 AM.



How to remove advertisement from MSFN

#2
dhjohns

dhjohns

    Legend in My Own Mind

  • Member
  • Pip
  • 81 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

Read this.  http://www.johnpapa.net/bootoffmetal/



#3
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

Not trying to boot off of bare metal. I already have my OS loader on hidden MS partitions.



#4
dhjohns

dhjohns

    Legend in My Own Mind

  • Member
  • Pip
  • 81 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

If you are running Windows installed normally, and you have a vhd which is on your hard drive, then you just mount it from your normal OS.  I use EasyBCD, and then open it, and assign the new vhd to the boot menu.



#5
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

I've tried that and similar to no avail. Unfortunately, I must be missing something for the boot to work - because it is just not happening with this approach. A cloned VHD can be added to the boot menu and it works.


Edited by simonking, 08 May 2014 - 02:21 AM.


#6
dhjohns

dhjohns

    Legend in My Own Mind

  • Member
  • Pip
  • 81 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

You might be better off just to use a program to create a vhd from a physical drive.  Or you can do a fresh installation on the vhd.  I am sure you thought of that, but unless you are really trying to solve this problem it might be the easiest and quickest approach.



#7
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

Yes of course. However, my requirements dictate that I do this in the way that is described. So I need to know what steps/actions I need to undertake to ensure that the resultant VHD is bootable normally.

 

BTW, my condolences on the passing of Gabriel Garcia Marquez. Was a favorite author. May he rest in peace and in magical realism!



#8
dhjohns

dhjohns

    Legend in My Own Mind

  • Member
  • Pip
  • 81 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

Thank you for condolences.  I am sorry I can't help you any further with your issue.  You may want to create a free account at beyondwindows9.com  as they have some real tech gurus there who may help.  There is also a VIP membership for sale (real cheap.)  It may be worth your while.  I would try that forum though.  I have had some real issues, and received excellent results. 



#9
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

Thanks for the suggestion. I suppose no one else here has any feedback or experience with the issue?



#10
parth3b

parth3b
  • Member
  • 9 posts
  • OS:Windows 8.1 x86
  • Country: Country Flag

@simonking have you tried creating vhd in vmware or sun virtual box and then install os into that vhd and than use that vhd for boot than it will work 



#11
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

Thanks for the suggestion. I suppose no one else here has any feedback or experience with the issue?

Maybe you could expand a little on:

  • Why exactly you want or need this particular setup (i.e. what is the intended final goal)
  • What exactly you have tried, exact meaning exact, as opposed to "vague", i.e. "I used program xy wit this specific command line w z as opposed to a program that preserves security and hard links on files, so everything is "original"

Right now I cannot understand what is your expected final result :unsure:.

 

jaclaz



#12
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

Let's say there's a generic Windows installation with the C: partition containing the OS and the program files, users, etc. folders. Since this is a generic Windows installation, the BCD store will be located on the hidden boot partition as typically created by Windows setup (my current development case), or it may also be located on the C: partition itself (I have not yet tested this scenario, but hope to eventually arrive at it as well, once my current setup succeeds).

The VHD boot simply stalls. I am doing my R&D on a Surface Pro 2, so all that happens is that I get the Surface logo (would be the Windows logo on a non-OEM Windows 8.1 install) after opting to boot into the VHD, and then the "spinner" below the VHD just never appears. No error is shown at any time, I can only hard-reset the machine to boot into another partition.

I created a new VHD, and then I used Paragon Hard Disk Manager 14 to clone my partition C: onto this VHD. This VHD boot worked!

Clearly, there's something "a little extra" that Paragon is doing here, to either the partition, or the boot sector, or wherever - that I am missing.

I am virtually certain there's some kind of partition tweak/setting that I am missing; because Paragon's clone works.


Edited by simonking, 08 May 2014 - 02:22 AM.


#13
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

OK, now I understand better, still I miss why exactly you want to "install to C:\" and later "move" this install "to Z:\" (but leaving the "program files, users, etc. folders" on C:\).

I mean (just an idea) why not installing to the VHD and later move the "program files, users, etc. folders" to C:\?

And, if I get this right, the "final goal" is to have (besides the "boot" partition with the BOOTMGR and the \boot\BCD which may be either a separate one or being your same "C:\") all the actual Operating System, exception made for "program files, users, etc. folders" inside the .vhd while having the "program files, users, etc. folders" still resifding on C:\.

But I am still failing to uinderstand what would be the advantage use of such a setup. :unsure: Saving hard disk space? Allow for a (better) multibooting?

 

As a side note, if you are into Windows 8.1, the new Wimboot approach may interest you (if the scope is to save hard disk space).

Also, more generally, if you capture a Wim image of the C:\ and apply it ot the .vhd, what happens? (without any third party tool and rather simple).

 

jaclaz


Edited by jaclaz, 24 April 2014 - 09:01 AM.


#14
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

I'm happy I was able to explain the scenario.

 

I have a lot of constraints; as such, the approach I have described appears to be the best one. The only problem is, getting the VHD to boot!


Edited by simonking, 08 May 2014 - 02:23 AM.


#15
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

I'm happy I was able to explain the scenario.

 

I have a lot of constraints; among these:

 

1) I cannot assume a fresh install will be possible,

2) I cannot assume more than 1 GB of free space will be available,

3) I cannot assume any additional external storage will be available.

 

As such, the approach I have described appears to be the best one. The only problem is, getting the VHD to boot!

Still, nothing tells me which actual advantages you expect from this approach.

 

But it's not my business at all, anyway.

 

What I would do right now if I were you would be to (temporarily) forget about  your approach :w00t: and see if you can find the *whatever* you are missing into the procedures used for native or non-native VHD booting, like:

http://reboot.pro/to...-windows-to-go/

http://reboot.pro/to...ct-make-mini-8/

 

Maybe the step you are missing is correcting/updating the MountedDevices key?

Or *somehow* your procedure changes the Disk Signature of the .vhd?

 

Maybe if instead of "directly" on the Surface2 you try your test inside a "more normal" VM, you can get a BSOD or however an error that could give hint of what is the actual problem.

 

jaclaz



#16
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

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, 08 May 2014 - 02:23 AM.


#17
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

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



#18
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag
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)

Attached Files



#19
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

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



#20
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

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, 08 May 2014 - 02:24 AM.


#21
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

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.pc...br/Win2kmbr.htm

http://www.911cd.net...ndpost&p=130963

http://www.multiboot...ure-in-mbr.html

 

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

 

jaclaz



#22
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

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, 08 May 2014 - 02:25 AM.


#23
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

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, 25 April 2014 - 08:33 AM.


#24
simonking

simonking

    Junior

  • Member
  • Pip
  • 58 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

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, 08 May 2014 - 02:27 AM.


#25
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,043 posts
  • OS:none specified
  • Country: Country Flag

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, 25 April 2014 - 09:41 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN