Topic: Windows to USB - Windows to Go  (Read 26403 times)

Windows to USB - Windows to Go
« on: March 07, 2015, 01:04:34 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
KYHI,

Since you like to work on a project,
 Why not portable windows on iso :)
   Static .vhd creation available,
    Most people have 4gb or more ram,
     Maybe you can boot .vhd inside wim since it is writable etc....

If you like to work on such thing, lots of things already available   on projects. :smile:

After getting to know this project and windows 8.1 setup - the option is already here in 8.1 to boot external HDD or SSD
Using diskpart and dism and can be done on 16-32GB drives

The biggest issue is USB's are to slow.. Reading a 4GB Install.wim

What I am unsure of is how windows to go will react when booted to different pc hardware and the fact that windows to go uses a volume key

http://www.easyuefi.com/wintousb/faq/en_US/How-to-use-WinToUSB.html
« Last Edit: March 07, 2015, 01:37:25 PM by KYHI, Reason: Added a certain program as a script file »

Re: Windows to USB - Windows to Go
« Reply #1 on: March 07, 2015, 02:14:32 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
Using the wintousb program, I was able to create a bootable external 32GB HDD..

I used the latest win8.1 Pro Iso as my source - One of the biggest benefits of using the create media tool (http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media )  is the fact that the iso downloaded today - contains all the windows updates through Nov. 2014

I usually snag the decrypted winpayload.esd file and create my own setup ISO that has an install.wim and not an install.esd (as a wim file is more common to work with )

The install.wim found in sources\ folder within the setup ISO is basically your complete C:\  drive (ie windows)

That install.wim is applied to the windows partition and when first run goes through OOBE

Or you can convert that install.wim to a wimboot image and just have pointer files on your windows partition.. Thus windows partition is much smaller

Without knowing fully how it works WinNTsetup3 works in the same manner as of Appling images, not sure the process the program uses other then applying.. Although that program does allow for some useful to go windows tweaks during apply
« Last Edit: March 07, 2015, 02:44:58 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #2 on: March 07, 2015, 03:39:30 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
ila_rendered

Above is a shot of the windows to go partition using the winToUSB program, system has only my display driver added

Below is a shot of the windows to go partition using the WinSetupNT3 script and it has all 9 of the system drivers and I used the tweaks..

ila_rendered

Surprisingly the external HD preforms much better then I expected...  The USB Flash just does not cut it...

My (this) was setup with UEFI boot, GPT partitions and a 32GB HDD via external enclosure and unlike Windows-To-Go via MS (which I believe locks you out of the other drives) this allows access, but with the MS restrictions
« Last Edit: March 07, 2015, 06:58:46 PM by KYHI, Reason: added other testing results »

Re: Windows to USB - Windows to Go
« Reply #3 on: March 07, 2015, 07:08:15 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
What all this has to do with the project? I do not know for sure..

Is it what I was tasked to do? Most likely I failed there..

How this may help others or expanding this project? Just sharing some of my testing and wasting time..

For the second test using WinSetupNT3 - I used the ISO's install.wim and integrated my product key and system drivers (using an "Image Prep" .cmd script)

Re: Windows to USB - Windows to Go
« Reply #4 on: March 07, 2015, 10:13:15 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi KYHI,

Thanks, I need to test, next weekend (sadly I don't have a lot free time)

What I try to achive:
Boot from a .vhd.
I had tested ms way to boot pe from usb, which worked fine  :thumbsup:
 but I did not like it  .....

Preparing a .vhd with WinNTSetup or another way for portable windows, or ms way for PE seems ok,
 I had followed some tutorials to add this .vhd to boot menu, followed lots of websites with tricks to uefi,I failed...
  ( I feel there is a change between Win7 and Win81 !)



Idea for such project is:
unlike PE projects around, which works with induction (add , add , add ...)
since Win8 has portable soul, there are already instructions to install to disks (usb, etc.)...

One can make a project even with deduction (remove remove remove ... to boot faster or smaller etc.)
"Finals" product to be .vhd
"WriteMedia" to be:
 Write VHD to USB
 Write Direct to USB
 Add VHD to Host

Why vhd: it is a good closed final product (like .iso),
 one can easly use as a second boot media for rescue or as pe or whatever.....
  and one can easly revert to initial vhd by copying back from a backup...


Well, such project would let to play with things more, by removing things (deduction) and by adding things......

I hope I could explain my goals with my bad english, sadly I don't have a lot free time  :smile:


I will follow your instructions next weekend..... :turtle:

Re: Windows to USB - Windows to Go
« Reply #5 on: March 07, 2015, 11:57:43 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
Seems to me you can the same with wim - we can also create an ISO of the mounted (target) directory..

We can also create a small recovery partition on the external drive (so everything works just like a factory setup)

Here are my esd helper and imageprep cmd scripts

My prepped install.wim is 3.58GB and the VHD is 8.24GB
« Last Edit: April 05, 2015, 08:53:47 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #6 on: March 08, 2015, 12:03:43 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
Quote
followed lots of websites with tricks to uefi,I failed...

Legacy supported boot options = Fat32 and NTFS - thus allowing the System partition and the Windows partition to be shared (so 1 shared NTFS partition instead of 2 separate partitions)

UEFI supported boot option = Fat32 Only - thus requiring a Fat32 system partition and a NTFS windows partition..

Tricking a Removable USB Flash Drive into accepting 2 partitions was a trick all within it self..

« Last Edit: March 08, 2015, 12:04:39 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #7 on: March 08, 2015, 01:13:29 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi KYHI,

btw, update your Plugin Creator  :wink:
link positions was from old Plugin Creator which was a winbuilder bug we noticed on win8host, workarounded with Plugin Creator updates....


creating 2 partitions with Windows Disk Management on ufd was easy here,
 I convert ufd to GPT,
  create first 300MB Fat32 (did not assign letter),
   rest NTFS


Than I made a trial with WinToUSB - using source Win81x64Ultimate
 (I use VHD , not Legacy -> attached pictures)
  ufd boots fine on my uefi host  :smile:
   (Testing is pain in ass since it takes a looooooooot time to restart and get to start booting from usb on host win81x64-uefi .... , I missed old days  :smile: , after it start to boot, booting is fine)

*
I copied WinToUSB.VHD on usb to my disk
D:\VHDs\WinToUSB.VHD
Adding this disk to my host bootmanager would be fine, well I had tried that some months before but failed...
let me know if you can figure out ???????

*
To test with VirtualBox,
 Since WinToUSB.VHD is not a bootable image,
  I decide to look around to convert usb to .vhd,
   Disk2vhd did not do the trick
   https://technet.microsoft.com/en-us/library/ee656415.aspx
   since it is in fact "Volume2vhd"

I tried WinImage "disk to vhd" option (which seems real disk to vhd ;))
http://www.winimage.com/download.htm
but I failed ....

*
Testing with Vmware - Physical Disk (selecting ufd) also failed -> I am sure I am missing something :)


ps:
maybe I should test WinToUSB on a newly created vhd  :wink: later ....



*****
As I wrote I don't have big time till summer, since I was the one with the idea, I decide to contribute you..
 Yes there are tools  :thumbsup: :thumbsup:
   well it would be fine one of these tools create a  .vhd on local disk (ex: D:) and add to my host bootmanager  :lol:
     to me there is a wide area to create a project, adding options (patching uxtheme ;) , adding user etc. automatically, removing some stuff to get smaller etc. etc.), yes many tools available besides project idea is gathering and improving things work nicely without manually (like SE, like Gena ;))
        well at least to me, maybe not to you, it was just an idea  :smile: :smile: :smile: :smile:


Sorry, I really do not have wide to do things more,
 I have a heavy schedule till the end of summer,
  All I can do is support forum (mostly from phone) and sometimes plugins (as long as not too long task)...
   I hope you understand my free time conditions.. I wish I had wide free time like you  :smile:

See You
:turtle:

Re: Windows to USB - Windows to Go
« Reply #8 on: March 08, 2015, 01:31:55 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
to add to your host system boot manager - (BCD)

Attach The VHD and it will be assigned a drive letter by the system. In this example it is drive F:.

Go to the Administrative Command Prompt and type the following command to add the VHD to the Boot Menu:

bcdboot F:\windows

If you want to remove the VHD boot option from your boot menu, use MSCONFIG (boot tab) to delete the unwanted entry.
« Last Edit: March 08, 2015, 01:33:00 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #9 on: March 08, 2015, 01:49:05 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
create your ufd partitions (1 Fat32 100MB system partition - 1 NTFS windows partition D:\ )
(I was using diskpart and would not allow commands for ufd removable media)

Mount your source ISO E:\

This is what the wintousb program does same as using dism command below

Dism /apply-image /imagefile:E:\sources\Install.wim /index:1 /applydir:D:\

What the wintousb does do that I have not figured out how to yet (well kinda) is create the System Boot Files in the system partition..

Usually you would run bcdboot command to do this - but running that command from within a host OS - modifies the Host OS System Files..

There has to be a switch for directing the bcdboot (but for now I do not know)

What I did was copy the system partition EFI folder to desktop and then just copied back to the new system partition, when needed..

----------------------
when you look at builder and how it works..

Install.wim is mounted by Extractwim script to (N)
xcopy all files from N to target folder
create target folder VHD
copy to usb - bcd bootmgr

Quote
creating 2 partitions with Windows Disk Management on ufd was easy here,
 I convert ufd to GPT,
  create first 300MB Fat32 (did not assign letter),
   rest NTFS

Wonder if it is your UFD - as I do not have those options through Disk management with my UFD

----------------------------------------------------------------------
Just another windows work-around to the wintousb program

Open Computer management and click on Disk management
Once the list of drives populates in the middle pane of disk management,
you should be able to right click Disk Management and select Create VHD.
Format and mount VHD and use dism command to apply install.wim to VHD

Quote
Testing is pain in ass since it takes a looooooooot time to restart and get to start booting from usb on host win81x64-uefi

Yes the OOBE phase(s) are slow to complete, but as said once completed, not bad..








« Last Edit: March 08, 2015, 02:31:22 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #10 on: March 08, 2015, 02:38:49 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
Boot to VHD (Native Boot): Add a Virtual Hard Disk to the Boot Menu

https://technet.microsoft.com/en-us/library/hh825691.aspx

this is more to your liking

https://technet.microsoft.com/en-us/library/hh825709.aspx
« Last Edit: March 08, 2015, 02:44:02 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #11 on: March 08, 2015, 02:41:01 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
yes WinToUSB.VHD boots fine, I tested with my old boot menu from my old tests

Code: [Select]
Windows Boot Loader
-------------------
identifier              {d6d2b76b-456e-11e4-bf43-6c71d9576734}
device                  vhd=[D:]\VHDs\VHD.vhd
path                    \Windows\system32\winload.efi
description             vhd boot (locate)
locale                  en-us
inherit                 {bootloadersettings}
integrityservices       Enable
isolatedcontext         Yes
allowedinmemorysettings 0x15000075
osdevice                vhd=[D:]\VHDs\VHD.vhd
systemroot              \Windows
resumeobject            {d6d2b769-456e-11e4-bf43-6c71d9576734}
nx                      OptIn
bootmenupolicy          Standard
detecthal               Yes
well, next things, trying WinNTSetup, Trying Win7x86 .... When I find time ....
ps: sometimes Win7x86 needed for old drivers that haven't updated for Win8 .... last year I had a case...
maybe later xp-gena-se on .vhd.......
and maybe much later a project :)


++
I checked, you are right  :thumbsup:, this ufd (sandisk extreme) is not flagged removable on diskmanagement (like my ufd harddisk), I forgot ....
 I remember now, this is about chipset inside this sandiskextreme etc. etc.... I initially used that to test faster ;)
   that is the reason there are the options...

++
btw, I guess using WinToGo revert my 5 second timeout to default 30 second ;) (not retested ...)


+++
as you see there are lots of stuff to discover and get in order as a project, well it was just an idea  :thumbsup:

no more time to test,
 See You
  :turtle:

Re: Windows to USB - Windows to Go
« Reply #12 on: March 08, 2015, 10:55:11 PM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
to save yourself a little time (instead of now using source install.wim for testing) mount the vhd and recapture the windows partition (after it has gone through all the oobe/user phases) and use that as your new source install.wim (Not needed if using already phased vhd file) but also gives you the smaller wim file

VHD=D:\   save in  C:\Image > using cmd

Dism /Capture-Image /CaptureDir:D:\ /ImageFile:C:\Image\Install.wim /Name:"Windows" /CheckIntegrity


« Last Edit: March 08, 2015, 11:00:03 PM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #13 on: March 09, 2015, 07:44:42 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
well most time lost is boot time ;) win81 bootmanager is not fast,
 restarting pc and getting to win81 bootmanager requires a significant time (some minutes !)
  after at last selecting vhd, it again takes a significant time till it starts booting .vhd,
   after that it is ok....
    than back to my normal hostos again lots of time ......
      each trial becomes 5 - 10 minutes, very time consuming and very boring with failures .....


Anyway, I tested Win7x86, on ufd it is ok, but adding to my disk and bootmanager I failed, Win7x86 could not boot with failure...

Here are bcdedit lines I use for both
 Winx64efi (working) and
 Winx86 (not working)
on my host Win81x64

it is a simple .cmd, to be used after getting a guid and simple editing the way one likes
 (I have automatic batches from internet, but I like to see what I am doing at this stage)
  There have to be a way to boot none efi vhd with chs enabled with bcdedit ....

Anyway, I hope you like .cmd
Code: [Select]
:: bcdedit /create /application osloader

Set guid={d6d2b76f-456e-11e4-bf43-6c71d9576734}
Set guid={d6d2b770-456e-11e4-bf43-6c71d9576734}
Echo %guid%

Cmd.exe
Exit

:: goto :win7
:: goto :win8efi

Cmd.exe
Exit

:win7
bcdedit /set %guid% device vhd=[D:]\VHDs\Win7x86.VHD
bcdedit /set %guid% path \Windows\system32\winload.exe
bcdedit /set %guid% osdevice vhd=[D:]\VHDs\Win7x86.VHD
bcdedit /set %guid% systemroot \Windows
bcdedit /set %guid% description "Windows 7 VHD x86"
bcdedit /displayorder %guid% /addlast
Cmd.exe
Exit

:win8efi
bcdedit /set %guid% device vhd=[D:]\VHDs\Win8x64Efi.VHD
bcdedit /set %guid% path \Windows\system32\winload.efi
bcdedit /set %guid% osdevice vhd=[D:]\VHDs\Win8x64Efi.VHD
bcdedit /set %guid% systemroot \Windows
bcdedit /set %guid% description "Windows 8 VHD x64 Efi"
bcdedit /displayorder %guid% /addlast
Cmd.exe
Exit

life goes heavy here, lots of things to do, See You
:turtle:

Re: Windows to USB - Windows to Go
« Reply #14 on: March 09, 2015, 09:39:05 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I had to test WinNTSetup   :cool:

Which suits me much much more now, attached pictures
E: -> ufd
Y: -> vhd

only missing, I don't know how to add Win71x86 to my D:  :smile:

:turtle:

Re: Windows to USB - Windows to Go
« Reply #15 on: March 09, 2015, 10:28:52 AM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
Notice the yellow triangle - UEFI uses GPT not MBR

To boot MBR you need to enable Legacy support in firmware..

And or Also your win7 version is x86 it needs to be x64 >  X86 does not support UEFI-GPT Bootmgr.efi > unless using windows 8.1 WimBoot Images or have ATOM processer..

When using w7x86 to UFD > UFD is MBR Bootmgr (Works) when host  GPT Bootmgr.efi (fail)

Once you get through the first windows boot up phase with your Win7 and Win8 recapture you a new source image of both..

Initial config from > Win7\sources\install.wim
boot UFD / VHD and process until in OS desktop..
Shut down and boot host OS
Capture UFD / VHD windows partition into New Source Wim

Now when testing the New Source Wim is your point to file. No need to use MS Media or wait to process oobe anymore

Got to remember when booting VHD > the VHD file has to be expanded and mounted before you can actually load windows..
For now during testing and on D secondary HDD - create partitions - then after testing - capture partition to wim and then apply wim to VHD

All in all the VHD is a file - doing the same thing as a partition - so it is just a virtual partition anyway - GPT support 128 partitions - MBR only 4 thus VHD more so required
« Last Edit: March 09, 2015, 12:12:24 PM by KYHI, Reason: add bootmgr - bootmgr.efi »

Re: Windows to USB - Windows to Go
« Reply #16 on: March 09, 2015, 11:07:29 AM »

was_JFX

  • Code Baker
  • Grand Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 1074
yellow triangle, just means the boot code in the MBR looks unusual.

Re: Windows to USB - Windows to Go
« Reply #17 on: March 09, 2015, 11:19:57 AM »

KYHI

  • Code Baker
  • Sr. Chef
  • ****
  • Location: Kentucky
  • Date Registered: Jan 2015
  • Posts: 909
I assume it looks unusual because it is in GUID format

Question is will it write the MBR code in GUID format??

As far as I believe it is one or the other on the HDD..

edit - question regards more HDD failure then yellow triangle
as udf works

JFX,
nother question while your here.. Does ntsetup write the system boot files to a blank 100MB system partition after appling install.wim to windows partition? separate partitions.. Have not tested.. Unsure how it worked..
Used it to re-apply image to windows partition - boot partition gpt and boot code green already
« Last Edit: March 09, 2015, 11:33:59 AM by KYHI »

Re: Windows to USB - Windows to Go
« Reply #18 on: March 09, 2015, 11:33:59 AM »

was_JFX

  • Code Baker
  • Grand Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 1074
don't confuse GUID and GPT

GPT is partition scheme like MBR
GUID is an identifier for partitions in GPT or entries in BCD store.

If WinNTSetup calls it MBR that it's a MBR.

For GPT you have to create the 100MB system partition yourself and select this one a boot drive.

Re: Windows to USB - Windows to Go
« Reply #19 on: March 09, 2015, 12:03:58 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Yellow triangle lost after Setup...  :thumbsup:

I have Legacy Mode enable (with Asus bios terms: CSM Enabled - Secure Boot Disabled)

That is the reason I can boot Win7x86 from other devices (ufd-usb hd)

Problem is "my Win81x64 boot manager" does not let Win7x86 boot fine,

++
To workaround,
Since I have internal card reader, I tried (with a 1GB :) card,
 but figured out Asus bios does not let internal card as boot device (updated bios to 2.17 without change)
 Also "my Win81x64 boot manager" do not provide such device to boot. (other devices list...)
   --> ps: with legacy mode, other devices list there is ufd etc. which I can boot from...

ps: Asus N56VZ S4402H http://www.asus.com/Notebooks_Ultrabooks/N56VZ/HelpDesk_Download/

+++
I feel there need to be way to say "my Win81x64 boot manager" not to boot uefi on selected os !!!
 so far only adding "Win81x64 vhd" to the list worked....

+++
Since JFX confirmed, I will let WinNTSetup add things to "my Win81x64 boot manager" for vhd and report back here...

:turtle:

 

Powered by EzPortal