Jump to content











Photo
- - - - -

Virtualize Win8.1: BIOS + MBR Physical Partition > to > WIM Image > to > UEFI GPT VHD

bios mbr wim image gpt uefi vhd partition virtual physical

  • Please log in to reply
7 replies to this topic

#1 crashnburn

crashnburn

    Frequent Member

  • Advanced user
  • 119 posts

Posted 13 July 2015 - 07:16 PM

Virtualize Win8.1: BIOS + MBR Physical Partition > to > WIM Image > to > UEFI GPT VHD
 
Virtualizing Win8.1 from BIOS + MBR Physical Partition > to > .WIM Image > to > UEFI GPT .VHD
 
Sometime last year I found out about Native boot VHDs and tried to go that way for good. There were some issues with hardware and OS (Win7 at the time) not working out and lot of new things that I was learning about VHDs. 
 
Anyways, that confusion, learning and failure led to a better path :) 
 
So this 2015, I figured out how to get VHDs (with Fresh Win 8.1 Installs via Install.WIM DISM Apply Image) to Native Boot on Surface Pro 3 (Sp3). 
 
I am going to attempt doing the following steps using DISM/ ImageX: 
 
MBR [Customized Win 8.1] (Physical) > Create Image > [Customized Win 8.1 .WIM] (Virtual - File based so - No sectors or MBR/GPT?? ). 
 
[Customized Win 8.1 .WIM] (Virtual) > Apply Image > [Empty New GPT .VHD] (on SP3) 
 
My thought is that by going to .WIM I bypass the whole converstion drama between MBR/BIOS & GPT/UEFI as the .WIM is agnostic of both of them? Is this a valid thought or not? 
Thoughts? 
 
NOTE: I can.. try out the above with creating a small FRESH MBR Windows 8.1 partition on X61T/ T61 and then doing the above 2 steps. Convert it to a .WIM and then applying to a GPT .VHD
 
I am guessing a SYSPREP is recommended somewhere in between. 
Someone somewhere also mentioned doing Sysprep in a VM/ Hyper V instead?
 
Thoughts? Where and how would you recommend applying the SYSPREP? 

Edited by crashnburn, 13 July 2015 - 07:23 PM.


#2 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1986 posts
  • Location:Nantes - France
  •  
    France

Posted 14 July 2015 - 10:12 AM

Hi Carshnburn,

 

A WIM is a file based disk image, not a sector based image, you cannot wim image the whole disk (including the boot sectors).

 

If you really want to use the WIM format (which has advantages like keeping the image small), you will need to prepare the destination disk (create, partition, format, set the boot sectors ...).

 

As for sysprep, I am no expert there but I believe this is needed only if you change significantly the hardware (motherboard, etc).

 

Regards,

Erwan 



#3 cdob

cdob

    Gold Member

  • Expert
  • 1343 posts

Posted 14 July 2015 - 07:43 PM

My thought is that by going to .WIM I bypass the whole converstion drama between MBR/BIOS & GPT/UEFI as the .WIM is agnostic of both of them? Is this a valid thought or not?

There is no conversion required: boot a UEFI machine and load a MBR VHD image.
Or boot a UEFI machine and load a GPT VHD image.

As for testing: use a fixed size VHD image.
A dynamically max 500gb (100gb occupied) VHD disk is a bad idea at a 250gb hard disk.
The max VHD disk has to be storable: use a 1tb hard disk at a 500gb (100gb occupied) VHD disk

Yes, file based transfer is a good idea:
dism capture/apply to a new created fixed size vhd.
 

Where and how would you recommend applying the SYSPREP?

If both systems uses AHCI at storahci.sys: do not use sysprep
8.1 requests CPU specs, kernel and hal are equal, both systems uses a pci bus.
The transfered system will boot, however be aware third party drivers may interfere.

#4 crashnburn

crashnburn

    Frequent Member

  • Advanced user
  • 119 posts

Posted 14 July 2015 - 09:13 PM

Hi Carshnburn,

 

A WIM is a file based disk image, not a sector based image, you cannot wim image the whole disk (including the boot sectors).

 

If you really want to use the WIM format (which has advantages like keeping the image small), you will need to prepare the destination disk (create, partition, format, set the boot sectors ...).

 

As for sysprep, I am no expert there but I believe this is needed only if you change significantly the hardware (motherboard, etc).

 

Regards,

Erwan 

My intent is not to image the boot sectors but allow me to recreate fresh boot specs on/ for the VHD.

 

The current intent is to only use WIM as a 'intermediary' 'agnostic' 'isolating' 'abstracting' stage / state. 
 

Yes, hardware will change significantly as this will be my go to VHD that can be moved from machine to machine when needed/ wanted. 

 

There is no conversion required: boot a UEFI machine and load a MBR VHD image.
Or boot a UEFI machine and load a GPT VHD image.


As for testing: use a fixed size VHD image.
A dynamically max 500gb (100gb occupied) VHD disk is a bad idea at a 250gb hard disk.
The max VHD disk has to be storable: use a 1tb hard disk at a 500gb (100gb occupied) VHD disk

Yes, file based transfer is a good idea:
dism capture/apply to a new created fixed size vhd.

 
If both systems uses AHCI at storahci.sys: do not use sysprep
8.1 requests CPU specs, kernel and hal are equal, both systems uses a pci bus.
The transfered system will boot, however be aware third party drivers may interfere.

 

cdob - well, this is what I was troubled about last year; the whole MBR/BIOS v/s GPT/UEFI or Mixed mode booting. It was rather confusing. 

It could've been windows 7 playing trouble maker, but I am wondering and maybe you are right.. Were my troubles unfounded? 

 

I am hoping the file based transfer using WIM simplifies things.

I am guessing making the VHD bootable should be as simple as a few BCDBOOT commands? Right? 

 

Well.. I think the machines are all AHCI.. E.g. Thinkpads T6x, X6x and new Machines Surface Pro 3 and other machines. But, will Win 8.x not create drama on new hardware without a Sysprep.. especially due to DRIVER PROFILES from previous MACHINE HARDWARE? 

That way before the OS moves to new machine it gets "cleansed" of drivers that were applicable to previous machine. ? Thoughts? 

 

That being said, Could you please shed some light on "how"/ "when" "where" would you suggest "h/w & driver profile cleansingSYSPREPs in the above steps (original post). 

 

I read somewhere / an MVP had suggested doing Sysprep on a Virtual Machine (Hyper V etc); for some reason - not sure if I remember but maybe something to do with less conflicting hardware + driver state. 

 

PS: Experiences of errors/ issues/ troubles anyone has faced in doing Syspreps that I can avoid by taking cautionary steps smile.png ??



#5 cdob

cdob

    Gold Member

  • Expert
  • 1343 posts

Posted 14 July 2015 - 10:20 PM

It could've been windows 7 playing trouble maker, but I am wondering and maybe you are right.. Were my troubles unfounded?

Wasn't a UEFI GOP graphic card involved? A hardware without Windows 7 support? Wasn't this the main reason?
 

I am guessing making the VHD bootable should be as simple as a few BCDBOOT commands? Right?

I don't understand 'Virtualize Win8.1'? How do you like to boot he VHD?
Do you like to run a virutal machine? Do you like to use native VHD boot?

YEs, bcdboot handles native boot. remember /f BIOS and /f UEFI
 

But, will Win 8.x not create drama on new hardware without a Sysprep..

Windows 8.x is designed for limited roaming.
Roaming with Windows To Go https://technet.micr...y/hh831833.aspx
Win 8.x will not create drama on new hardware without a Sysprep, as long you use native drivers.
Third party drivers may cause issues.

Do you expect Lenovo power manager to run at other hardware?
Sorry bad example, not supported at win 8.
In general: avoid hardware manufacturer addons.

If you force me to use sysprep:
Given the T61 example.
I would transfer the VHD image to a USB MBR SSD.
Run bcdboot to the USB drive.
Boot win 8 from the USB SSD at the T61.
Remove hardware manufacturer programs.
And run sysprep / shutdown.
 

doing Sysprep on a Virtual Machine

A virtual machine would adding drivers relating the virtual machine. This is the second choice in my opinion.


Added:
Given a Intel IDE machine with active intelide.sys
Spoiler


This windows booted at a AMD chipset machine:
intelide.sys is deactivated: demand start StartOverride=3
The Enum entry is cleaned
Windows 8 cleans boot drivers at transfer to other hardware.
Spoiler


http://reboot.pro/to...g-bios-setting/

Windows 8 disables not required boot drivers at boot


I would not use sysprep as for a simple transfer to other hardware.
  • crashnburn likes this

#6 crashnburn

crashnburn

    Frequent Member

  • Advanced user
  • 119 posts

Posted 19 July 2015 - 07:11 PM

UPDATE and PROTOTYPE SUCCESS: 
 
PEOPLE, FRIENDS, FORUM MEMBERS, ADMINS & MODS :) - Thanks. 
I appreciate all the help and cautionary words and I am listening to it all during my experiments. Yes, the goal seems a bit complicated and ambitious but isnt that what we help each other with? 
 
Anyways, I was able to achieve "Success" this weekend using ONE pathway for Steps A, B, C outlined below. I'd love it if you can please help me with Steps A, B, C - specific to the other pathways that I have not used or run yet. 
 
HISTORY 2014: 
I tried a similar exercise last year (around Aug 2014) which did not go all the way for various reasons. One large one might be that I was trying to run Win 7 on a new Win 8 machine.. 
 
GOAL: 
So, my goal to Migrate 
FROM: (My Win 8.x OS + Apps + Settings + Data) on (MBR/BIOS) machine 
TO: Semi-portable (UEFI/GPT).VHD that works on UEFI only machines (and GPT also because makes UEFI life easier)
 
(The mixed mode variations between MBR/BIOS and UEFI/GPT worlds I havent tried much as its a bit wonky. I may have encountered them last year but easier to stick with one of the extremes)
 
PROJECT BREAKDOWN: 
My PROJECT INTENT has the following steps: 
 
A - Cleanse / Hardware/ Drivers Information - 
 Only ways I found was Manual/ Forced Uninstalls of Drivers and Sysprep (apparently does so). 
 Paragon has an Adjust OS and some other tools that I have yet to try
 
B - Image the existing Drive/ Partition(s) to VHD - 
ImageX (deprecated) 
DISM - I've been using it to Apply Images (Win 8.x) to test VHDs. 
Looking at using it to Image the Partitions/ Disks instead of Disk2VHD as it could give me more granular control. 
/CaptureImage and /ApplyImage
 
 Disk2VHD - Does a nice job of pull the OS into VHD, but it pulls HDD info as it is: 
 - Boot Info 
 - Sector Info 
 - MBR/BIOS Info 
 
C - Boot Information
BCDedit - Seems to be the way before, but now I think the following two are what I use. 
BCDBoot - Simple to use
EasyBCD - I use it mainly as a supplementary tool
 - Verify/ Rename/ Cleanup/ Delete - The Entries made by BCDBoot 
 
SUCCESS STORY 2015 - Ran this on a fresh installed Win 8.x: 
 
What I was able to achieve so far :) 
 
A - Did some stuff manually, but was not able to get Sysprep /GENERALIZE /OOBE work yet. I know the tools intended purpose is not this, but PLEASE help me with "what it does" "how I can leverage what it does" instead of telling me NO. 
Or
Tell me what other ways: Tools, Apps, Scripts I could use for Step A
 
B - I figured given Windows 8 having lot of Native Driver/ Hardware Support it might adapt
Disk2VHD the fresh Win 8.x install. 
Ended up with a MBR .VHD > GPTGEN > GPT .VHD
Ran GPTGEN on it (thanks to the steps & tutorials from last year)
 
C - Just ran a simple BCDBOOT with GPT .VHD... Voila :) Success. 
I was able to boot in, out, etc. 
 
I could do the same with My main Win8.x OS Disk, but would like to have a better way for Steps
A - Sysprep /Generalize OR 
B - DISM /Capture-Image with /CaptureDir (from Disk to .WIM) and /ApplyImage to fresh .VHD
C - BCDBoot Seems to work easy breezy :)
 
So, please share ways and means on how I could improve for A, B
 
PS: I have access to Pro and Enterprise Licenses so please do not make that a concern right now. MS Gold Partners / MSDN/ etc etc. 


#7 crashnburn

crashnburn

    Frequent Member

  • Advanced user
  • 119 posts

Posted 20 July 2015 - 05:46 AM

That is the objective, to not WIM any of the boot or sector information. 

And my objective is to create a fresh set of Boot information. 

PS: Both of the above is because going from MBR/BIOS to GPT/UEFI

Hi Carshnburn,

 

WIM is a file based disk image, not a sector based image, you cannot wim image the whole disk (including the boot sectors).

 

If you really want to use the WIM format (which has advantages like keeping the image small), you will need to prepare the destination disk (create, partition, format, set the boot sectors ...).

 

As for sysprep, I am no expert there but I believe this is needed only if you change significantly the hardware (motherboard, etc).

 

Regards,

Erwan 

I will be moving it from Old BIOS hardware Thinkpad T6x/X6x to newer only UEFI Surface Pro 3 and/ or similar. So, I am thinking SYSPREP or any similar Cleansing process would help. 

 

Cdob - I did a GPTGEN conversion on the Disk2VHD generated VHD; MBR > GPT 

I can skip File System conversion if I go to a WIM using DISM. 

See my original and new hardware. Only is only BIOS and new one does not support Legacy CSM. Pure UEFI. 

There is no conversion required: boot a UEFI machine and load a MBR VHD image.
Or boot a UEFI machine and load a GPT VHD image.


As for testing: use a fixed size VHD image.
A dynamically max 500gb (100gb occupied) VHD disk is a bad idea at a 250gb hard disk.
The max VHD disk has to be storable: use a 1tb hard disk at a 500gb (100gb occupied) VHD disk

Yes, file based transfer is a good idea:
dism capture/apply to a new created fixed size vhd.

 
If both systems uses AHCI at storahci.sys: do not use sysprep
8.1 requests CPU specs, kernel and hal are equal, both systems uses a pci bus.
The transfered system will boot, however be aware third party drivers may interfere.

I'd guess both use AHCI, and I will clean most 3rd party drivers out. But, to avoid taking any hardware/ driver crap forward, neither MS or especially 3rd party drivers like Lenovo/ Thinkpad stuff. 

 

I have removed a bunch manually but some of the stuff refuses to go/ not sure how to clean. (I have been using Nirsoft and SysInternals to track stuff but no way to clean them out). 

 

I am not sure if there is any other way to CLEANSE besides SYSPREP. 

 

Yes. I guess it was GOP thingy (learned that from MSFN). Hence, I dropped the ball at the time. 

 

Native Boot VHD. :) 

 

Thanks for the Command-line options. Although I ran it without them and the default seems to have applied i.e. UEFI on SPro 3. 

Wasn't a UEFI GOP graphic card involved? A hardware without Windows 7 support? Wasn't this the main reason?
 
I don't understand 'Virtualize Win8.1'? How do you like to boot he VHD?
Do you like to run a virutal machine? Do you like to use native VHD boot?

YEs, bcdboot handles native boot. remember /f BIOS and /f UEFI
 
Windows 8.x is designed for limited roaming.
Roaming with Windows To Go https://technet.micr...y/hh831833.aspx
Win 8.x will not create drama on new hardware without a Sysprep, as long you use native drivers.
Third party drivers may cause issues.

Do you expect Lenovo power manager to run at other hardware?
Sorry bad example, not supported at win 8.
In general: avoid hardware manufacturer addons.


If you force me to use sysprep:
Given the T61 example.
I would transfer the VHD image to a USB MBR SSD.
Run bcdboot to the USB drive.
Boot win 8 from the USB SSD at the T61.
Remove hardware manufacturer programs.
And run sysprep / shutdown.
 
A virtual machine would adding drivers relating the virtual machine. This is the second choice in my opinion.


Added:
Given a Intel IDE machine with active intelide.sys

Spoiler


This windows booted at a AMD chipset machine:
intelide.sys is deactivated: demand start StartOverride=3
The Enum entry is cleaned
Windows 8 cleans boot drivers at transfer to other hardware.
Spoiler


http://reboot.pro/to...g-bios-setting/

I would not use sysprep as for a simple transfer to other hardware.

 

As per some posts on windows-noob (MS MVP for Deployment)  a VM would an be easier place to cleanse things before Imaging as it is more actual OEM Hardware agnostic

 

Not sure how the Intel vs AMD thing will help here.. if some Thinkpad HW/ Driver info stays on before Imaging. 



#8 crashnburn

crashnburn

    Frequent Member

  • Advanced user
  • 119 posts

Posted 22 July 2015 - 07:22 PM

I have completed through these phases of the project. Using this context, please help me with this further at this location: 

 

http://reboot.pro/to...e-boot-vhd-how/







Also tagged with one or more of these keywords: bios, mbr, wim, image, gpt, uefi, vhd, partition, virtual, physical

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users