Experiment 2 - Clone Windows to FILEDISK/RAMDISKTo avoid pagefile issues/conflicts I recommend moving the pagefile to make sure it's not on the same partition as the running operating system. This step may not be required, however moving my pagefile to my data drive avoided some potential issues and conflicts, and increases space available in my RAM booted OS.
Lets install the SVBus driver to the Windows system we will be cloning. Assuming the system is booted and running, enter the following commands (command prompt - Run as Administrator) -
bcdedit /set {current} testsigning on
bcdedit /set {current} advancedoptions yes
These settings are covered in more detail in my SVBus guide - see
http://mistyprojects...r-signature.htm.
Reboot the PC and when the Advanced Boot Options menu is displayed, select
Disable Driver Signature Enforcement - this is required to install the SVBus driver.
A watermark stating Test Mode should be displayed to the bottom right of the desktop - this is nothing to do with the disabling driver signature enforcement in the previous step but is required for running the unsigned SVBus after it is installed.
Lets use the Add Hardware Wizard to install SVBus (Run > hdwwiz). Follow the instructions in my SVBus guide - see
http://mistyprojects...iles/hdwwiz.htmSummary of steps -
- Welcome to the Add Hardware Wizard - click on Next
- Select Install the hardware that I manually select from a list (Advanced), then click on Next
- Select Storage controllers from the list, then click on Next
- When prompted to Select the device driver you want to install for this hardware, select Have Disk...
- Install from Disk > Browse... (and browse to svbus.inf) > OK
- The SVBus Virtual SCSI Host Adapter should be displayed in the Model area > Next >
- Hardware to install: - SVBus Virtual SCSI Host Adapter should be displayed > Next >
- A warning will be displayed as the SVBus driver is unsigned. Select Install this software anyway
Let prepare a new VHD file. The steps are similar to my previous post where Installing Windows to FILEDISK and boot from RAMDISK is covered.
Notes on files/paths -
- Drive C: = Windows OS (Disk 0, partition 3)
- Drive D: = Data (Disk 0, partition 3)
- Drive R: = VHD file (Disk 1, partition 1) - refer to the steps below
- Drive S: = VHD file (Disk 1, partition 2) - refer to the steps below
Lets create a VHD file with 2 partitions - one for the EFI and Windows boot loader files (drive R:) and one for the Operating System files (Drive S:). Diskpart commands -
create vdisk file=D:\svbus2.vhd maximum=20480 type=fixed
select vdisk file=D:\svbus2.vhd
attach vdisk
create partition primary size=100
format fs=fat label=vhdboot2 quick
create partition primary
format fs=ntfs label=vhd_os2 quick
detach vdisk
Now lets make sure that SVBus is installed properly and is working. Add menu enties - open a command prompt (run as administrator) and enter the following commands (the first command will mount the EFI system partition as drive T: - use a different letter as required. The second command will open T:\efi\grub\menu.lst in notepad.exe) -
mountvol t: /S
notepad T:\efi\grub\menu.lst
Lets add grub4efi menu entries for \svbus2.vhd
title Load /svbus2.vhd (FILEDISK) then boot /efi/microsoft/boot/bootmgfw.efi
find --set-root /svbus2.vhd
map /svbus2.vhd (hd)
find --set-root /efi/grub/menu.lst
chainloader /efi/microsoft/boot/bootmgfw.efi
Let's reboot the PC and test that the SVBus driver is installed and working. Select the grub4efi menu option
Load /svbus2.vhd (FILEDISK) then boot /efi/microsoft/boot/bootmgfw.efiOnce Windows has booted you should hopefully see the vhd partitions mounted in Windows. Optionally, check diskpart by running the following commands (editing the disk number as required) -
select disk 1
Output from running the above command on my system - note the
SVBus Virtual Hard Disk SCSI Disk DeviceNow lets boot to WinPE, capture Windows on Disk 0 Partition 3 to a wim file, mount D:\svbus2.vhd, apply the wim to partition 2 on the mounted VHD file, create boot files on partition 1 on the mounted VHD file, add a grub4efi menu entry and boot to RAMDISK or FILEDISK.
Notes on files/paths in WinPE (they remain the same as in the running Windows installed to Disk 0, partition 3) -
- Drive C: = Windows OS (Disk 0, partition 3)
- Drive D: = Data (Disk 0, partition 3)
- Drive R: = VHD file (Disk 1, partition 1) - refer to the steps below
- Drive S: = VHD file (Disk 1, partition 2) - refer to the steps below
WinPE - mount D:\svbus2.vhd (adjust path as required) using DiskPart (adjust disk number as required) -
select vdisk file=D:\svbus2.vhd
attach vdisk
select partition 1
assign letter=r
select partition 2
assign letter=s
WinPE - capture Windows OS (Disk 0, partition 3) to D:\win10svbus.wim (I'd recommend using DISM for this due to errors when using wimblib) -
Dism /Capture-Image /ImageFile:D:\win10svbus.wim /CaptureDir:C: /Name:Windows10svbus /Compress:fast
WinPE - Now lets apply the Windows 10 operating system files captured in the preceeding step to drive S: -
DISM.exe /Apply-Image /ImageFile:D:\win10svbus.wim /ApplyDir:s: /Index:1
WinPE - Now lets create/apply the required boot files in/to drive R:
bcdboot S:\windows /s r:
WinPE - Now lets modify the BCD store on drive R: (created in the preceeding step).
bcdedit /store R:\EFI\microsoft\boot\bcd /set {default} bootmenupolicy legacy
bcdedit /store R:\EFI\microsoft\boot\bcd /set {default} testsigning on
bcdedit /store R:\EFI\microsoft\boot\bcd /set {default} advancedoptions yes
As mentioned in one of my previous posts -
- testsigning is required for the unsigned SVBus driver. I have not tested the signed version of SVBus.
- bootmenupolicy legacy - my own preference as I detest the graphic boot menu. You probably won't see any menu anyway as the BCD has only one OS entry and shouldn't be displayed.
- advancedoptions yes - I have found this useful as I know when it's displayed that Windows has started booting and I can use safemode to troubleshoot if required.
WinPE - OPTIONAL - edit the MountedDevices registry key in the S:\Windows\System32\config\SYSTEM registry hive. Remove (or rename) the entry for the C: drive (\DosDevices\C:). Adjust other letters as required. The steps are covered in more detail at
http://mistyprojects...files/clone.htmWinPE - Unmount/detach the VHD disk
select vdisk file=D:\svbus2.vhd
detach vdisk
To add menu grub4efi enties - open a command prompt (run as administrator) and enter the following commands -
mountvol t: /S
notepad T:\efi\grub\menu.lst
Lets add grub4efi menu entries for \svbus2.vhd
title Boot /svbus2.vhd - SVBus RAMDISK
find --set-root /svbus2.vhd
map --mem --top /svbus2.vhd (hd)
chainloader (hd-1)
title Boot /svbus2.vhd - SVBus FILEDISK
find --set-root /svbus2.vhd
map /svbus2.vhd (hd)
chainloader (hd-1)
Reboot the PC and select your preferred menu entry.