Jump to content











Photo
- - - - -

Usage Impressions and How to Build Your Own "To Go" Drive

windows on usb recommended hardware recommended software

  • Please log in to reply
10 replies to this topic

#1 alacran

alacran

    Gold Member

  • .script developer
  • 1347 posts
  •  
    Mexico

Posted 11 December 2019 - 01:07 AM

I found this article on TechSpot written on November 28, 2018, and wanted to share it: https://www.techspot...-windows-to-go/

 

Even if we know how to make a Windows install from and also to a USB drive, or a VHD located on a USB device manually or using free tools available on the forum to make it, or better to make a Wimboot VHD capable to boot from Ram, the article has some good info.

 

I started reading it just by curiosity, but it has some interesting recommendations about several USB drives.

 

I also found it very informative about additional free options/tools available for this task.

 

alacran


  • wimb and ReTokener like this

#2 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 247 posts

Posted 11 December 2019 - 02:07 AM

interesting indeed, thanks for sharing.

 

value is 4 instead of 1 to prevent the virtual disk from expanding when mounted.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\FsDepends\Parameters] 

 

"VirtualDiskExpandOnMount"=dword:4

 

 

if the disk doesnt expand on boot, how can data be written to it?

 

regards   t.



#3 wimb

wimb

    Platinum Member

  • Developer
  • 2849 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 11 December 2019 - 07:30 AM

I found this article on TechSpot written on November 28, 2018, and wanted to share it: https://www.techspot...-windows-to-go/

 

 

Thanks for sharing this info.

 

Strange that WinNTSetup is not mentioned in this article on TechSpot .....

 

Install Windows 10 from USB after booting with WIM or VHDX

 

  PE  RAMDISK   ==   FILEDISK 50 GB VHD Win10 x64

Win10XPE-2019-11-25_102142.png == WinToGo-2019-12-11_141811.png ==

 



#4 alacran

alacran

    Gold Member

  • .script developer
  • 1347 posts
  •  
    Mexico

Posted 11 December 2019 - 06:28 PM

Quote

 

value is 4 instead of 1 to prevent the virtual disk from expanding when mounted.

Quote

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\FsDepends\Parameters] 

 

"VirtualDiskExpandOnMount"=dword:4

 


if the disk doesnt expand on boot, how can data be written to it?

 

regards   t.

 

This is from the part of the article related to WinToUSB

On a previous paragraph it says:

 

 

However, our Windows To Go drive loaded to a blue screen error that read "VHD Boot Host Volume Not Enough Space" and required a registry modification to the system inside the virtual hard drive, making as much or more work out of the WTG creation process than our manual method above.

 

It seems to me for some reason the expandable VHD size is bigger than the space available on the drive where it was created, then the need to apply that setting on the registry.

 

I don't know how the VHD is created since I haven't tested the mentioned tool yet, but it comes to my mind Hyper-V standard (preselected) size when creating a new VHD or VHDX (fixed or expandable) is 128 MB and this may be the cause if the host drive is not big enought to hold this expandable VHD.

 

Then it seems to me to use this tool we need a big size USB device with plenty free space, as a USB SSD or HDD not a limited USB stick.

 

alacran


  • ReTokener likes this

#5 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 247 posts

Posted 11 December 2019 - 07:01 PM

Thank you alacran for hints.

I guess "how the VHD is created" is not so important but to create an expandable disk not larger than available space in the partition.

"VHD Boot Host Volume Not Enough Space" can appeare if you copied extra data to the mentioned partition without considering that the offline-vhd has to expand on boot.

Interesting is, by setting "VirtualDiskExpandOnMount"=dword:4 the vdisk size might increase only if data is written to it.

T.


  • alacran likes this

#6 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 247 posts

Posted 11 December 2019 - 07:26 PM

Just tested setting: "VirtualDiskExpandOnMount"=dword:4

Yes, it works as expected, you can watch the vDisk size increase while data is written.

T.


  • alacran likes this

#7 alacran

alacran

    Gold Member

  • .script developer
  • 1347 posts
  •  
    Mexico

Posted 11 December 2019 - 08:09 PM

If I understood clearly what you said, and just to resume it:

 

When using "VirtualDiskExpandOnMount"=dword:4 the virtual disk will not expand during boot to its full size, but you are still able to add new data to it, and then it will expand only the necessary to hold the new datas.

 

I think we could call this setting: Controlled Expansion

 

alacran


  • ReTokener likes this

#8 alacran

alacran

    Gold Member

  • .script developer
  • 1347 posts
  •  
    Mexico

Posted 11 December 2019 - 08:49 PM

Then when creating an expandable VHD and applyng to it a WIM (index: X) image file by means of WinNTSetup, to control the expansion of the VHD, only thing we need to do is on WinNTSetup  >>> Tricks select a folder with the attached reg file located into it.  And WinNTSetup will take care to apply it to the registry of the OS into the VHD.

 

alacran

Attached Thumbnails

  • RegTricks.png

Attached Files



#9 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 247 posts

Posted 11 December 2019 - 10:18 PM

Controlled Expansion :thumbsup: you name it.



#10 alacran

alacran

    Gold Member

  • .script developer
  • 1347 posts
  •  
    Mexico

Posted 12 December 2019 - 10:32 PM

I commented on WinNTSetup page on MSFN Forum about the Controlled-Expansion-VHD.reg file on my previos post, and JFX (the author) commented this:

 

 

@alacran

This tweak was already added with RC2 under the following condition.

Free space is smaller than max vhd expanded size - 5%.
Without disabled pagefile additional 6GB free space are expected.

 

Then when appling your WIM image file using WinNTSetup there is no need to add the mentioned reg file.

 

alacran



#11 alacran

alacran

    Gold Member

  • .script developer
  • 1347 posts
  •  
    Mexico

Posted 22 December 2019 - 09:40 AM

In case you already have a VHD made with WinNTSetup using a version before v4RC2, or you made it by other means as Dism or wimlib, etc., and want to add this Controlled-Expansion-VHD.reg  you may use the Great Tool offlinereg from erwan.l, and only things you need to do is attach the VHD, put the .reg file on same folder where offlinereg is, and run from that location on an elevated command prompt the following command:

 

offlinereg-win64 "C:\temp\Windows\System32\config\system" " " import Controled-Expansion-VHD.reg

 

Or offlinereg-win32 "C:\temp\Windows\System32\config\system" " " import Controled-Expansion-VHD.reg in accordance with your running OS or WinPE, then you can dettach the VHD and next time you run it the edition to the VHD will take effect.

 

alacran






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users