Topic: Building in "Normal" (not boot.wim) model fails to boot  (Read 2262 times)

0 Members and 1 Guest are viewing this topic.

Building in "Normal" (not boot.wim) model fails to boot
« on: December 01, 2016, 07:40:00 PM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
So I'm building using build 10.0.10240.16384, building works absolutely splendidly when using the InRam (boot.wim) mode, but if I switch it to Normal the boot just hangs forever at the swirling circles (I'm assuming it's waiting for the boot device to appear).

Does this happen to anyone else? How can I help fix it?

My end goal is to actually apply the PE results to a VHD image (because apparently cloud hosting providers don't support ISO images in a virtual CD drive  :ohmy: ).
Previous attempts to dism /Apply-Image the boot.wim file have met with... poor results, so I'm not sure if I'm just doing it wrong or what.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #1 on: December 01, 2016, 08:42:22 PM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
Oops, forgot to attach logs.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #2 on: December 11, 2016, 10:40:37 AM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 116
I'm not a guru of WinpeSE, I do not understand English and I use extensively bing.translator. Also, my information may be irrelevant.
If I understand correctly, you used Dism/apply-image to put Boot.wim of WinPeSe inside a VHD disk.
For my tests, I very often use a VHD disk.
To place a Boot.wim file (from an ISO) in the VHD, I abandoned DISM and I use 7Z version 15.10 or above.
Then you must create the BCD with BCDBOOT that copy useful files.
I've never had problems with the WinPeSe's Boot.wim. I did very often this operation when I analyzed the differences with my MicroWinpeBuilder.

If I didn't understand your request, forget my answer.
Greetings.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #3 on: December 11, 2016, 12:42:48 PM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
This almost works, except when booting after doing that Windows treats the drive as Drive C:, which breaks almost everything.

I once got it to assign the drive as X: by using registry hacks, but even then, it didn't work right, not detecting the network card for example.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #4 on: December 12, 2016, 02:47:34 AM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 116
Because of my bad English, need to hear as a baby, with very short sentences and browned the various scenarios if necessary.

Your observation:
-If I understand the first "post", your WinpeSE does not start (.. .the swirling circles...)
Your goal:
-put Boot.wim in a vhd and boot ( MS give the name "Winpe mode Flat" in the documentation )
Your tests:
-you use two options of winbuilder, "inram" and "normal"
-for each file, you have completed the vhd with DISM
My hypothesis:
-The BCD into your VHD is not properly rebuilt. I guess that DISM does not rebuild entierely ( from scratch ).

Note1: I've never used the "normal" option because I understand little English in the help of WinBuilder
Note 2 : mode flat and VHD.
         See https://technet.microsoft.com/en-us/library/dn293200.aspx
         they use the script MakeWinPEMedia.cmd ( in ADK )

What I did very often to put "my" boot.wim file in a VHD:
1 - created a VHD with disk management (right click "disk management" + creation + boot + activation...)
2 - unzipped the boot.wim with 7Z v15 (I sometimes used DISM but the command line is longer ;-)
3 - copy system file with "BCDBOOT. EXE /S..." (see bcdboot settings)
             from my memory, and if G: is your VHD : "bcdboot G:\windows /s G: /f all"
4 - sometime ( not always ) rebuilt the BCD with bcdedit /store ( see below... )
        from my memory, and if G: is your VHD :
             to view bcd  : "bcdedit /store g:\boot\bcd" ( see below ...)
             to modify the property "device"   : "bcdedit /store g:\boot\bcd /set {default} device [boot]"
             to modify the property "osdevice" : "bcdedit /store g:\boot\bcd /set {default} osdevice [boot]"

For you, one last point to confirm:
-can you check the BCD to your VHD with the command "bcdedit /store..."?
and one other test :
-perhaps try your VHD with the "basic" boot.wim from ADK

annexes:
1 - The file BCD in my VHD during my tests with WinPeSe boot.wim:

C:\WINDOWS\system32>bcdedit /store G:\Boot\bcd

Gestionnaire de démarrage Windows
---------------------------------
identificateur          {bootmgr}
description             Windows Boot Manager
locale                  fr-fr
inherit                 {globalsettings}
default                 {default}
displayorder            {default}
toolsdisplayorder       {memdiag}
timeout                 30

Chargeur de démarrage Windows
-----------------------------
identificateur          {default}
device                  boot
path                    \windows\system32\boot\winload.exe
description             MicroWinpeBuilder
locale                  fr-fr
inherit                 {bootloadersettings}
testsigning             Yes
osdevice                boot
systemroot              \windows
detecthal               Yes
winpe                   Yes
bootlog                 Yes
debug                   Yes
ems                     No
"

2 - This morning, to verify before i reply, i do :
- create a VHD file ( make a volume H:, activation ...)
- mount this vhd
- 7Z a file boot.wim ( from my microWinpeBuilder ) in this VHD H:
- bcdboot h: ...
- create a VM in hyper V on my windows10 PRO
- use the VHD in the VM
- boot this vm
- and it's OK

some comands i use :

C:\WINDOWS\system32>bcdboot  h:\windows /s h: /f all
Les fichiers de démarrage ont bien été créés.

C:\WINDOWS\system32>bcdedit /store h:\boot\bcd

Gestionnaire de démarrage Windows
---------------------------------
identificateur          {bootmgr}
device                  unknown
description             Windows Boot Manager
locale                  en-us
inherit                 {globalsettings}
default                 {default}
displayorder            {default}
toolsdisplayorder       {memdiag}
timeout                 30

Chargeur de démarrage Windows
-----------------------------
identificateur          {default}
device                  unknown
path                    \windows\system32\winload.exe
description             Windows PreInstallation Environment
locale                  en-us
inherit                 {bootloadersettings}
allowedinmemorysettings 0x15000075
osdevice                unknown
systemroot              \windows
nx                      OptOut
winpe                   Yes

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #5 on: December 14, 2016, 08:51:46 PM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
You know, I didn't try just using 7Zip to extract boot.wim, I've always used Dism.

So, I rebuilt in the InRam (boot.wim), and extracted that into the VHD file.
For some reason the Win10PE SE project doesn't seem to build the image with full boot catalog/fonts, which bcdboot will complain about. This time I did not fix that, and just copied straight-out what was in the ISO, and added a second entry

The BCD looks like this afterward:

Code: [Select]
Windows Boot Manager
--------------------
identifier              {bootmgr}
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
displayorder            {default}
                        {4ff628a4-c28d-11e6-9bd8-30f9eda66728}
                        {8f128ee5-c28d-11e6-9bd8-30f9eda66728}
toolsdisplayorder       {memdiag}
timeout                 1

Windows Boot Loader
-------------------
identifier              {default}
device                  ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path                    \windows\system32\boot\winload.exe
description             Win10PESE x64
locale                  en-US
inherit                 {bootloadersettings}
osdevice                ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot              \windows
bootmenupolicy          Legacy
detecthal               Yes
winpe                   Yes
ems                     No

Windows Boot Loader
-------------------
identifier              {4ff628a4-c28d-11e6-9bd8-30f9eda66728}
device                  boot
path                    \Windows\System32\Boot\winload.exe
description             Win10PE(boot)
locale                  en-US
osdevice                boot
systemroot              \Windows
detecthal               Yes
winpe                   Yes

Windows Boot Loader
-------------------
identifier              {8f128ee5-c28d-11e6-9bd8-30f9eda66728}
device                  boot
path                    \Windows\system32\winload.exe
description             Win10PE (id)
locale                  en-US
osdevice                boot
systemroot              \Windows

Of course the first entry was broken, but the second entry did seem to work properly on the first boot.

On second boot, the Desktop's shortcuts were broken (for Command Prompt and PE Network, Computer and Recycle Bin were fine), but I think that's just a symptom of some kind of weird icon cache issue.

So,  :great: on the flat-out extraction method, seems DISM is doing some weird behind-the-scenes junk.

Maybe I'll spend time to figure out why the "Normal" build mode doesn't work.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #6 on: December 15, 2016, 04:39:59 AM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 116
@Tsaukpaetra
Excuse me to insist.
I'm a baby in English....
May i undestand that "inram" in a vhd is OK for you with 7Z and BcdBoot.exe ? ( "bing.com/translator/" of your text says not !!! )
Please, can you explain to me the difference between "inram" and "normal" ?
Note : it seems to me that, in the projet directory, the directory "target" contains all files to copy to VHD, like a complete flat tree. Only need bcdboot  after the copy ( adm rights for copy?)
Merci.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #7 on: December 15, 2016, 10:54:25 AM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
May i undestand that "inram" in a vhd is OK for you with 7Z and BcdBoot.exe ? ( "bing.com/translator/" of your text says not !!! )
Please, can you explain to me the difference between "inram" and "normal" ?
Note : it seems to me that, in the projet directory, the directory "target" contains all files to copy to VHD, like a complete flat tree. Only need bcdboot  after the copy ( adm rights for copy?)
Merci.

InRam = The standard method of making PE. It packs most of the files (Program Files, Windows, etc) into boot.wim, and instructs in the BCD to load boot.wim into Ram.
Normal = The "old" way of making PE. It doesn't pack files into boot.wim. It instructs BCD to load Windows directly from the disk.

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #8 on: December 15, 2016, 11:58:04 AM »

cdob

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 36
The running circles indicates a driver or hardware issue. No idea about real reason.
Does works a default Windows 10 DVD boot.wim with extracted files?

My end goal is to actually apply the PE results to a VHD image
How is the VHD image used?
Is it used by a virtual machine, hence a internal disk at the running virtual machine?
Then you may use InRAM approach still.
How much RAM is available at the virtual machine?

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #9 on: December 15, 2016, 10:44:55 PM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 116
@Tsaukpaetra

A said cdob, my VM needs more 512Mo ( near 1024Mo)  to boot with my miroWinpeBuilder ( with dotnet4, PowerShell... )

Perhaps ...
Are you sure you have the time to select the second BCD entry from keboard  when you boot virtual hard disk? I see in your BCD :
" default                 {default}
timeout                 1
...
identifier              {default}
device                  ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}"

In my VM under HyperV on my old AMD E1, i can't get time to choose the entry with "timeout =1"
Perhaps also ...
You can active the log when OS load the drivers with "Bcdedit /store ...\boot.bcd /set {your entry} bootlog Yes". During boot,  log file is created in "your vhd":\windows\NtBtLog.txt. It will visible, if created, when you mount the vhd. It's only for knowing if boot phase arrive to this step
« Last Edit: December 15, 2016, 11:09:55 PM by noelBlanc »

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #10 on: December 16, 2016, 11:07:41 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7187
InRam = The standard method of making PE. It packs most of the files (Program Files, Windows, etc) into boot.wim, and instructs in the BCD to load boot.wim into Ram.
Normal = The "old" way of making PE. It doesn't pack files into boot.wim. It instructs BCD to load Windows directly from the disk.
Following old experience of years,
 Long story to short,
   Passing time proved, The "old" way of making PE (ex: Gena Default) is better with "new" way when using "disk boot" (real disk, usb disk, .vhd ).

On Gena we have no instruction for such thing on relevant plugins to avoid complexity .....
 Instead instructions are there for .iso boot on disk. (which works like normal boot of SE on disk)


I advice,
Instead of using SE - Normal,
use
SE "InRam"

than put result into InRam.vhd  :wink:

and make this InRam.vhd bootable.......... --> this is the point to play with BCD and figure out proper way

Once you success, you will figure out all advantages of this way in passing time.
And
When you success, create a step by step tutorial for ALL users at Tutorial section http://theoven.org/index.php?board=35.0


Good Luck.
:turtle:
« Last Edit: December 16, 2016, 11:08:11 PM by Lancelot »

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #11 on: December 17, 2016, 08:58:47 PM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
The running circles indicates a driver or hardware issue. No idea about real reason.
Does works a default Windows 10 DVD boot.wim with extracted files?

My end goal is to actually apply the PE results to a VHD image
How is the VHD image used?
Is it used by a virtual machine, hence a internal disk at the running virtual machine?
Then you may use InRAM approach still.
How much RAM is available at the virtual machine?


I realized that missing the pe flag is what caused the boot drive not to be X: and broke registry after a reboot, so only using bcdboot to regenerate the BCD is insufficient.

The idea is that I can theoretically free up 500 Mb of RAM by using the traditional (non-boot.wim) mode. This PE is being used in Azure VMs with 2 Gb of RAM to run game servers. ;)
I'll probably stick with InRam simply because it seems to work more reliably and results in smaller disk sizes, which is a smaller concern but still valid.


InRam = The standard method of making PE. It packs most of the files (Program Files, Windows, etc) into boot.wim, and instructs in the BCD to load boot.wim into Ram.
Normal = The "old" way of making PE. It doesn't pack files into boot.wim. It instructs BCD to load Windows directly from the disk.
Following old experience of years,
 Long story to short,
   Passing time proved, The "old" way of making PE (ex: Gena Default) is better with "new" way when using "disk boot" (real disk, usb disk, .vhd ).

On Gena we have no instruction for such thing on relevant plugins to avoid complexity .....
 Instead instructions are there for .iso boot on disk. (which works like normal boot of SE on disk)


I advice,
Instead of using SE - Normal,
use
SE "InRam"

than put result into InRam.vhd  :wink:

and make this InRam.vhd bootable.......... --> this is the point to play with BCD and figure out proper way

Once you success, you will figure out all advantages of this way in passing time.
And
When you success, create a step by step tutorial for ALL users at Tutorial section http://theoven.org/index.php?board=35.0


Good Luck.
:turtle:

TBH instead I'd rather focus on figuring out why it's not building correctly, that would be more useful in the long run, as the end result of building in the Normal mode should theoretically be identical to the results of what I'm doing anyways. :)

Unfortunately I didn't have time to set up a differencing environment this weekend, maybe next weekend.  :thumbsup:

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #12 on: December 18, 2016, 12:11:34 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7187
Tsaukpaetra,

In all way, I expect step by step tutorial from you http://theoven.org/index.php?board=35.0

So anyone can easily reproduce your way of "SE boot vhd"  :great:

:turtle:

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #13 on: February 15, 2017, 08:19:01 AM »

lqbweb

  • Apprentice
  • *
  • Date Registered: Feb 2017
  • Posts: 6
I am trying to achieve the same thing. And I am facing the same problems (Windows stuck in normal mode, and problems with drive letters)

What I tried:

a) Changing all the Windows registry from the result Hive, from X: to C:. This does not work, I get an error "interactive login process initialisation has failed". I dont know why.

b) Change all the scripts from Win10PESE from X: to C:. Still mapped to X: (probably the install.wim and so on, are already mapped to X: right?)

 

Re: Building in "Normal" (not boot.wim) model fails to boot
« Reply #14 on: February 18, 2017, 10:11:37 AM »

Tsaukpaetra

  • Jr. Chef
  • **
  • Date Registered: Dec 2016
  • Posts: 13
Yeah I think it's a special "mode" Windows detects whether it's booted as PE or not and breaks after that. If you can get away with leaving your boot (OS) drive as X: it shouldn't be too big an issue I think.

 

Powered by EzPortal