Monday, February 8, 2016

How To Dual Boot Using Virtual Hard Disk (VHD)

PART  I: Converting an ISO image to VHD file

Introduction:

Very often we require to have a dual boot system, maybe for some study purpose or for some training purpose. For a physical machine in which Secure Boot (UEFI) is enabled, is very difficult to make it a dual boot system. Using a Virtual Hard Disk (VHD) it is easy to make a dual boot system in UEFI (replaces BIOS). Nowadays OEM pre-installed OS comes with these security features.

A brief introduction to UEFI (Unified Extensible Firmware Interface)




  • UEFI allows firmware to implement a security policy

  • Secure boot is a UEFI protocol not a feature of OS

  • UEFI secure boot is part of Windows 8 secured boot architecture

  • Windows 8 utilizes secure boot to ensure that the pre-OS environment is secure

  • Secure boot doesn’t “lockout” operating system loaders but is a policy that allows firmware to validate the authenticity of components

  • OEMs have the ability to customize their firmware to meet the needs of their customers by customizing the level of certificate and policy management on their platform

  • Microsoft does not mandate or control the settings on PC firmware that control or enable secured boot from any operating system other than Windows.


  • Why convert an ISO to VHD?

    Using an ISO image virtual machines can be made bootable but not the physical machines. VHD files can be used for booting a physical machine. For this reason, we need to have an OS in VHD format, either we can directly download the OS in VHD format or we can convert an OS in ISO format to VHD format.

    How to convert an ISO to VHD?

    (1) Download windows image converter script (Convert-WindowsImage.ps1) from the following link

    (2) Put the file in the root directory, preferably C:\
    (3) Right-click on the file, click on properties, and then unblock it.


































    (4) Login as Administrator or run the PowerShell in admin mode.
    (5) Change the execution policy to 'RemoteSigned'.







    (6) Now run the following command to show GUI mode

    (7) Now GUI will open:



























    (8) Select source file (ISO file), OS Edition (SKU), VHD type, size, working directory, and then click on 'Make my VHD'.

      

    (9) Wait for few minutes until you get confirmation


















    (10) Your VHD is ready now. You can find it in the root directory/ working directory. In this case at C:\

















    Note: This script is tested with Windows 8, Windows 8.1, Windows Server 2012, and Windows Server 2012 R2.


    PART - II: Mounting VHD file and making it dual boot

    (1) Open disk management console (Run->diskmgmt.msc) click on Action and select Attach VHD

















    (2) Browse for VHD file (in this case C:\)




    (3) Now the VHD will be mounted on a drive (In this case K:\)




















    (4) Run command prompt as Administrator and create boot file for K:\Windows








    (5) To edit the boot options download EasyBCD2.2 and edit the boot option























    (6) Restart the system and you are done :)


    No comments:

    Post a Comment