Jump to content











Photo
- - - - -

SysLinux PXE boot direct to Win10?

pxe

Best Answer misty , 3 weeks ago

Maybe try setting bootmenupolicy as legacy in your bcd store entry/entries.
 
If memory serves, the standard bootmenupolicy displays a graphic menu and I often experienced a reboot when this menu setting was used and the non-default entry was selected. This is from memory and from some time ago and I may well be wrong. I do not have time to test/check - sorry.
 
See here (around step 18) for screenshots showing the difference between display of the legacy and standard bootmenupolicy.

Misty Go to the full post


  • Please log in to reply
10 replies to this topic

#1 David English

David English
  • Members
  • 4 posts
  •  
    Canada

Posted 3 weeks ago

First off... wow!   I stumbled on this site trying to solve a problem.  Wish that had happened a few years ago.

 

But, about that problem...

 

The goal is to PXE boot a grub (like) menu that lets me load a version of Linux via tFTP or boot to the local HD and run either Win10 as a base system or Win10 in a VHDX file (on said Win10 base system).  The point being to allow me to deploy via WDS (just the Win10 base system) but still meet instructor needs for all the other stuff they want to do. Linux, other versions of Win10, etc.. And, also, to avoid having some Win10 feature update blow grub away (if it were on the HD) and lose the option to boot to Linux.  If grub happens on the network, before the drive, Windows can't mess with it.  So the theory goes.

 

I have a system that is working but it's a bit clunky.  I'm PXE booting (from a Windows WDS server) to SysLinux and get a boot menu that I can define.  One option is to boot Linux and the default is to boot from the HD.  If it hits the HD, then it gets the Windows boot menu (which I can define via bcdedit) and make a choice there.  Then it reboots, goes through the PXE and Linux option, and then boots the chosen Windows.  Like I said, it works, but it's clunky.

 

What I was searching for is a way to have that SysLinux boot menu go directly to the particular install of Windows without dealing with the Windows boot manager.

 

Sort of like:

* Mint LiveCD (Linux)

* Slitaz (Linux minimal GUI)

* Windows 10 LTSB for Electronics

* Windows 10 CB Vanilla  (which is a VHDX)

 

Any hints on how to do that?

Any particular vocabulary that would help me search this site for hints?

 

I need to get a few hundred systems up and running for start of classes in September.  Like I said, I have a system that works... but I think I could do better.  So far, in browsing this site, I'm pretty sure I could do better, but I might run out of time.

 

David...


Edited by fixerdave, 3 weeks ago.


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14257 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 3 weeks ago

I am not sure to understand your setup, but it does seem more complex than needed.

 

If I get this right:

1) the "client" always boots to PXE
2) then, I don't understand what happens
3) there is a reboot in the middle that i don't understand.

 

To boot a Windows (BIOS) you *need* to go through:

1) BOOTMGR
2) \boot\BCD

 

The point might be *where* these files are.

Maybe you can get around the "middle reboot" issue using the so-called "Vista Boot Floppy" (an image of).

 

Personally I would use grub4dos (and not Syslinux/Pxelinux) as it seems (to me) more "flexible", but I believe also using Syslinux/Pxelinux is possible.

 

At the risk of having you (temporarily) derailed, check the original idea about the "Vista boot floppy":

http://www.multiboot....uk/floppy.html

and this (seemingly completely unrelated) topic:

http://reboot.pro/to...in-bios-to-gpt/

(it is actually unrelated, but it may give you an idea of the possibilities)

 

:duff:
Wonko



#3 David English

David English
  • Members
  • 4 posts
  •  
    Canada

Posted 3 weeks ago

I am not sure to understand your setup, but it does seem more complex than needed.

If I get this right:
1) the "client" always boots to PXE
2) then, I don't understand what happens
3) there is a reboot in the middle that i don't understand.

To boot a Windows (BIOS) you *need* to go through:
1) BOOTMGR
2) \boot\BCD

The point might be *where* these files are.
Maybe you can get around the "middle reboot" issue using the so-called "Vista Boot Floppy" (an image of).

Personally I would use grub4dos (and not Syslinux/Pxelinux) as it seems (to me) more "flexible", but I believe also using Syslinux/Pxelinux is possible.

At the risk of having you (temporarily) derailed, check the original idea about the "Vista boot floppy":
http://www.multiboot....uk/floppy.html
and this (seemingly completely unrelated) topic:
http://reboot.pro/to...in-bios-to-gpt/
(it is actually unrelated, but it may give you an idea of the possibilities)

:duff:
Wonko


Hi,

Thanks for the reply, and links.

Yes, overly complicated, though "needed" is an argument I'd lose with instructors. Always do. Of course, there might be a better way... which is why I'm here :)

The Syslinux boot menu lets me PXEboot into a Linux environment (in RAM, like a LiveCD) or drop to the HD. It's Bootmgr on the HD that, when I choose the "other" OS, that then causes the reboot though the PXE boot again, which drops to the HD, which then immediately goes into said chosen OS. It's that second reboot that Bootmgr is causing that I'd like to get rid of. If I could get the Syslinux boot menu to "tell" the HD Bootmgr to do something specific rather than asking... that might work.

Reading that Vista Floppy thread some, which I presume is some kind of WinPE environment, and getting it to use it's own Bootmgr that then points to specific HD installs might work. But, they mention a 25 sec loading delay which is likely going to be more annoying than the problem I'm trying to solve.

In thinking about it, there's probably some fundamental reason the Windows Bootmgr reboots the system when I pick the other OS (that's located inside a VHDX file) on the HD. It's got to switch something and then reboot before that setting takes hold. If that weren't necessary, then I suspect Windows wouldn't do that reboot in the first place, so I'm probably not going to get around it. Maybe that line of thinking is being too charitable to Microsoft... don't know, but whatever.

Probably the best I could do is to script some kind of bypass on the PXE boot (for the second go round). Another avenue to explore. Or, maybe bite the bullet and go EFI. Might have a few more options there.

Again, thanks for the response, and the links. And thanks for everyone else that's contributing to this site. I expect I'll be here quite a bit.

David...


Edited by David English, 3 weeks ago.


#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14257 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 3 weeks ago

No, the delay you read about doesn't exist in the real world for a "pure" chainloading.

 

The "Vista boot floppy" is a generic name for allowing to have a BOOTMGR and \boot\BCD *somehwere else* from internal hard disk, nothing really connected with Windows PE.

 

Anyway, there is no reason why you should have that reboot even in your current syslinux setup.

 

Post your current Syslinux/PXE linux menu, maybe you have some "queer" settings in it or maybe you installed "wrongly" (no offence intended) the Syslinuc/PXElinux and/or the BOOTMGR.

 

:duff:

Wonko



#5 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 3 weeks ago

It's that second reboot that Bootmgr is causing that I'd like to get rid of.

I guess: at first boot bootmgr dosn't find /boot/bcd at bios disk 0x80 active partiton.

As Wonko the Sane indicated already: can you post the sylinux menu?

In addition:
Can you post the output 'bcdedit.exe /enum all'?
Does device shows a partition letter or a generic [boot]?

Do you use BIOS or UEFI boot?

As for debug:
can you add grub4dos at local hard disk MBR? And add grldr file. Don't add a file menu.lst.
Does PXE boot to local hard disk launches grub4dos?

#6 David English

David English
  • Members
  • 4 posts
  •  
    Canada

Posted 3 weeks ago

The "default" SysLinux menu, as given by Syslinux, has:

 

#---

LABEL local

MENU DEFAULT

MENU LABEL Boot from Harddisk

LOCALBOOT 0

Type 0x80

 

 

LOCALBOOT 0  just says "perform a normal HD boot"

The Type 0x80 says "boot to primary hard drive"

 

And, trying to not look like a fool and doing my googling before asking stupid questions... it seems what I want to use is chain.c32, rather than localboot, as it allows me more options.  Still have to wrap my head around those, but they might give me what I want.

 

In BCDedit, things are a bit messed up through testing... seems running bcdboot on the mounted drive (seems I need to do this to make a vhdx from hyper-v bare-metal bootable) set itself as default.  Not sure what else it did... so the following may not accurately reflect what will be.  Also, this system has a second HD that I might not have to worry about on the final install clients.  Having a lot of issues with Drive Numbers flipping about between local and PXE -> WinPE boots for imaging, but that's another problem separate from this one.  No shortage of problems this time of year at a college.

 

Oh, and that /enum all shows a wee bit more stuff.  Thanks for that.

 

Oh, and yes, BIOS for now, though there's a push for UEFI.

 

And, yes, I suspect (though I've not yet tested) that putting grub on the local HD would boot to grub after the PXE boot menu went to local drive.  At this point, I'm hoping I can tame that chain.c32 enough to target individual boots.  If I can do that, I win :) 

 

David...


Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=C:
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
resumeobject            {cd1fe16c-a5ad-11e8-8553-002324bc0d42}
displayorder            {default}
                        {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 10
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {cd1fe16a-a5ad-11e8-8553-002324bc0d42}
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \Windows
resumeobject            {cd1fe168-a5ad-11e8-8553-002324bc0d42}
nx                      OptIn
bootmenupolicy          Standard

Windows Boot Loader
-------------------
identifier              {cd1fe16a-a5ad-11e8-8553-002324bc0d42}
device                  ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{cd1fe16b-a5ad-11e8-8553-002324bc0d42}
path                    \windows\system32\winload.exe
description             Windows Recovery Environment
locale                  en-US
inherit                 {bootloadersettings}
displaymessage          Recovery
displaymessageoverride  Recovery
osdevice                ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{cd1fe16b-a5ad-11e8-8553-002324bc0d42}
systemroot              \windows
nx                      OptIn
bootmenupolicy          Standard
winpe                   Yes

Windows Boot Loader
-------------------
identifier              {default}
device                  vhd=[C:]\vhdx\W10CB.vhdx
path                    \Windows\system32\winload.exe
description             Windows 10
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {cd1fe16e-a5ad-11e8-8553-002324bc0d42}
displaymessageoverride  Recovery
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                vhd=[C:]\vhdx\W10CB.vhdx
systemroot              \Windows
resumeobject            {cd1fe16c-a5ad-11e8-8553-002324bc0d42}
nx                      OptIn
bootmenupolicy          Standard

Windows Boot Loader
-------------------
identifier              {cd1fe16e-a5ad-11e8-8553-002324bc0d42}
device                  ramdisk=[\windows\system32\winload.exe]\Recovery\WindowsRE\Winre.wim,{cd1fe16f-a5ad-11e8-8553-002324bc0d42}
path                    \windows\system32\winload.exe
description             Windows Recovery Environment
locale                  en-us
inherit                 {bootloadersettings}
displaymessage          Recovery
osdevice                ramdisk=[\windows]\Recovery\WindowsRE\Winre.wim,{cd1fe16f-a5ad-11e8-8553-002324bc0d42}
systemroot              \windows
nx                      OptIn
bootmenupolicy          Standard
winpe                   Yes

Resume from Hibernate
---------------------
identifier              {cd1fe168-a5ad-11e8-8553-002324bc0d42}
device                  partition=C:
path                    \Windows\system32\winresume.exe
description             Windows Resume Application
locale                  en-US
inherit                 {resumeloadersettings}
recoverysequence        {cd1fe16a-a5ad-11e8-8553-002324bc0d42}
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
filedevice              partition=C:
filepath                \hiberfil.sys
bootmenupolicy          Standard
debugoptionenabled      No

Resume from Hibernate
---------------------
identifier              {cd1fe16c-a5ad-11e8-8553-002324bc0d42}
device                  vhd=[C:]\vhdx\W10CB.vhdx
path                    \Windows\system32\winresume.exe
description             Windows Resume Application
locale                  en-US
inherit                 {resumeloadersettings}
recoverysequence        {cd1fe16e-a5ad-11e8-8553-002324bc0d42}
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
filedevice              vhd=[C:]\vhdx\W10CB.vhdx
filepath                \hiberfil.sys
bootmenupolicy          Standard
debugoptionenabled      No

Windows Memory Tester
---------------------
identifier              {memdiag}
device                  partition=C:
path                    \boot\memtest.exe
description             Windows Memory Diagnostic
locale                  en-US
inherit                 {globalsettings}
badmemoryaccess         Yes

EMS Settings
------------
identifier              {emssettings}
bootems                 No

Debugger Settings
-----------------
identifier              {dbgsettings}
debugtype               Local

RAM Defects
-----------
identifier              {badmemory}

Global Settings
---------------
identifier              {globalsettings}
inherit                 {dbgsettings}
                        {emssettings}
                        {badmemory}

Boot Loader Settings
--------------------
identifier              {bootloadersettings}
inherit                 {globalsettings}
                        {hypervisorsettings}

Hypervisor Settings
-------------------
identifier              {hypervisorsettings}
hypervisordebugtype     Serial
hypervisordebugport     1
hypervisorbaudrate      115200

Resume Loader Settings
----------------------
identifier              {resumeloadersettings}
inherit                 {globalsettings}

Device options
--------------
identifier              {cd1fe16b-a5ad-11e8-8553-002324bc0d42}
description             Windows Recovery
ramdisksdidevice        partition=C:
ramdisksdipath          \Recovery\WindowsRE\boot.sdi

Device options
--------------
identifier              {cd1fe16f-a5ad-11e8-8553-002324bc0d42}
description             Windows Recovery
ramdisksdidevice        vhd=[C:]\vhdx\W10CB.vhdx
ramdisksdipath          \Recovery\WindowsRE\boot.sdi


#7 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 3 weeks ago

The configuration seem good at first glance.

Given a dual boot:
Did you disable Windows 10 fast startup?

#8 misty

misty

    Silver Member

  • Developer
  • 881 posts
  •  
    United Kingdom

Posted 3 weeks ago   Best Answer

Maybe try setting bootmenupolicy as legacy in your bcd store entry/entries.
 
If memory serves, the standard bootmenupolicy displays a graphic menu and I often experienced a reboot when this menu setting was used and the non-default entry was selected. This is from memory and from some time ago and I may well be wrong. I do not have time to test/check - sorry.
 
See here (around step 18) for screenshots showing the difference between display of the legacy and standard bootmenupolicy.

Misty

#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14257 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 3 weeks ago

As cdob and misty suggested above, the issue is likely to be in the (stupid) Windows 10 bootmgr (and in settings in the BCD), bootmenupolicy and/or "fast startup" .

 

At first sight the \boot\BCD does look like messed up with duplicates, but that in itself should not be a problem, and anyway it can be re-built "clean".

 

In case you can try using BootICE:

https://sites.google...otice-downloads

to edit the settings/descriptions.
 
If you want to try the chain.c32, though your localboot option should work, I am perplexed (but very likely it is just me) by your "Type 80" line as it doesn't seem like a valid command. :dubbio:
 
Do go through:
https://www.syslinux...title=Doc/chain
besides the "main":
https://www.syslinux...mboot/chain.c32
 
The issue - as often happens (it is years that I wonder why exactly :unsure:) with most Linux (or Linux derived) tools is that there is a lot of documentation BUT never or rarely a full set of meaningful examples  :( .
 

 
Anyway try:
 

LABEL Local Windows bootmgr
MENU LABEL Local Windows bootmgr
COM32 /chain.c32
APPEND hd0,1 ntldr=/BOOTMGR

The hd0,1 there means first partition of first (local) hard disk.
 
Or try (as last line): APPEND ntldr=/bootmgr hd0 1
 
:duff:
Wonko



#10 misty

misty

    Silver Member

  • Developer
  • 881 posts
  •  
    United Kingdom

Posted 3 weeks ago

https://winaero.com/...-in-windows-10/



"...If you switched to Windows 10 from Windows 7, you probably noticed the new bootloader of Windows 10. It looks completely different, acts completely different and performs an additional reboot every time you select Windows 7 in the boot menu if you have it in a dual boot configuration...."

And some more information about reboots in a multi boot configuration here

:cheers:

Misty

P.s. At the risk of adding further complications, ipxe is an alternative to pxelinux. Ipxe has menu configuration support and some great features including booting from SAN using iscsi or aoe.

#11 David English

David English
  • Members
  • 4 posts
  •  
    Canada

Posted 3 weeks ago

Thanks for all the replies, and sorry for the delay in responding to them. Been one of those days... be a few more before this start-up is done.

 

I've not had time to test but I suspect that "legacy" bootmenupolicy thing is exactly what I need right now.  Thank you for that... it was the answer to the primary issue.  Problem marked as solved (or will be after I post).

 

For now, I'll keep the existing bootmgr and just not have it do that weird reboot after making a choice.  I may still get fancy later, moving all the choices off the hd and onto a PXE response, but I don't have time to figure out how to get that extra step of pointing to the right vhdx file.  I'm sure it's possible, but there are other battles at the moment and the clock is ticking. 

 

Might even start another thread on drive ID numbering... seems to be a lot of expertise here.

 

Thanks again,

 

David...







Also tagged with one or more of these keywords: pxe

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users