Jump to content
RESET Forums (homeservershow.com)

Native Boot and VHD files


tswalker
 Share

Recommended Posts

I wasn't sure exactly where to throw this note as the article I wrote begins to cross a few boundaries... 

 

Anyway, I just posted an article related to using Native Boot drives for host operating systems.  I'm currently doing this will all of my servers, and find it to be a great alternative to installing my operating system. I will be moving to using this for my workstations as well.

 

http://blugged.wordpress.com/2014/11/22/virtualize-native-vhd-custom-re

 

I don't have all the answers, but any questions or concerns please shoot them at me.

Edited by tswalker
Link to comment
Share on other sites

if you're using a CPU that doesn't support virtualization. Some lower end Intel and AMD CPU's don't, so HyperV isn't an option, and VMWare Workstation isn't either (I believe). 

 

And it would be a better solution than VirtualBox in this case (as you'll get horrible performance.

 

 

Also, a great way to test Windows 10 directly on your hardware before/without committing to it.

Link to comment
Share on other sites

Also, another way to fix the WinRE partition, is to use an unattended config file. In fact, if needed, I could post a modified one here that would allow for easy customization of the image without the issues he talks about.

 

Heck, why not just do so:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <servicing></servicing>
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <DiskConfiguration>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Size>800</Size>
                            <Type>Primary</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>2</Order>
                            <Size>100</Size>
                            <Type>EFI</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>3</Order>
                            <Size>128</Size>
                            <Type>MSR</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Extend>true</Extend>
                            <Order>4</Order>
                            <Type>Primary</Type>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <PartitionID>1</PartitionID>
                            <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
                            <Label>WinRE</Label>
                            <Format>NTFS</Format>
                            <Order>1</Order>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <PartitionID>2</PartitionID>
                            <Order>2</Order>
                            <Label>System</Label>
                            <Format>FAT32</Format>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <PartitionID>3</PartitionID>
                            <Order>3</Order>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <Order>4</Order>
                            <PartitionID>4</PartitionID>
                            <Format>NTFS</Format>
                            <Letter>C</Letter>
                            <Label>Windows</Label>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
                <WillShowUI>OnError</WillShowUI>
            </DiskConfiguration>
            <ImageInstall>
                <OSImage>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>4</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
            <UserData>
                <ProductKey>
                    <Key>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Key>
                    <WillShowUI>OnError</WillShowUI>
                </ProductKey>
                <AcceptEula>true</AcceptEula>
                <FullName>User</FullName>
            </UserData>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
                <WillShowUI>OnError</WillShowUI>
            </SetupUILanguage>
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ComputerName>Computer</ComputerName>
            <ProductKey>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</ProductKey>
            <ShowPowerButtonOnStartScreen>true</ShowPowerButtonOnStartScreen>
            <OEMName>System</OEMName>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>false</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
            </OOBE>
         </component>
    </settings>
</unattend>

Just FYI, this will wipe disk 0, and install to that system, and will assume that this is an UEFI system.

Link to comment
Share on other sites

Just read article. Interesting. Yet I'm still unclear as to why I'd want to switch the traditional method?

Like Drashna mentions, using a virtual disk to contain the host operating system allows an easy way to add multiple boot loader options (other operating systems / versions), without the need to add more partitions. Just create another virtual disk (maybe made with HyperV and sysprep'd), add a section for it in the BCD. It's an easy way to test other operating systems, patches, software etc...

 

I should have mentioned that.. but a very valid point.

Edited by tswalker
Link to comment
Share on other sites

Also, another way to fix the WinRE partition, is to use an unattended config file. In fact, if needed, I could post a modified one here that would allow for easy customization of the image without the issues he talks about.

 ...

 

Just FYI, this will wipe disk 0, and install to that system, and will assume that this is an UEFI system.

The problem is when installing to the Native VHD, while you can create the partitions this way, the problems occur during the installation. The installer just doesn't seem to be able to properly handle creating the needed BCD entries along with ReAgentC configuration to move the recovery environment over into the correct partition... at least that is what has been happening to me.

Link to comment
Share on other sites

Well, in theory, manually installing to the VHD would be the best option

Using dism to apply the image to the VHD, and then using BCDEDIT to manually add an entry.

Link to comment
Share on other sites

I do have an automated solution that uses PowerShell in the unattend script within boot.wim of winpe that does the heavy work and reduces the size of the installer autounattend considerably. If you're interested in taking a look at it, you can find a generalized version here: http://1drv.ms/1FguQbf (licenses and holder names removed)

 

The files are split using 7zip, but create the contents to be used as a bootable USB for a specific machine (the Western Digital DX4000). It also contains the TightVNC requirements for remote access, but that and the specific drivers for the DX4000 could be easily replaced for other systems.

 

If you dig into it, just mount the WinPE boot.wim found under sources and take a peek at the PSInstaller.ps1 script and it's accompanying unattend.xml script. The trick to getting it to work via powershell was setting the execution policy environment in WinPE (which is handled in unattend.xml)

Link to comment
Share on other sites

My win8.1 is installed directly on my 120gb ssd, but the dual boot into server 2012 r2 is to a vhd on the ssd. The biggest advantage to me is not having to carve up my drive into multiple partitions. I can take full advantage of the dynamically expanding vhd.

 

Theoretically, it could also make the installation of server more portable. I could copy it to any new drive array and add the boot entry and be ready to go. And third, the entire vhd file is backed up by crash plan when I am booted into win8.1.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...