Jump to content











Photo

Bug Reports, Requests, HowTo's about Tiny PXE Server

pxe network boot

  • Please log in to reply
837 replies to this topic

#651 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 17 February 2017 - 08:56 PM

MS DHCP

I can use DHCP only options for legacy PXE BIOS boot just fine.

 

One of many I tried:

 

 

UEFI PXE boot does not seems to work at all (I simply do not believe the above from my experience, unless I am doing sometjiong very wrong!).

 

No ProxyDHCP = no boot!

 

As also stated here: http://henkhoogendoo...all-folder.html

 

sebus

 

 

In my lab, option 60 NEEDS to be empty or else the UEFI PXE Client will look for a ProxyDHCP.

 

PXE + UEFI in plain DHCP mode is possible/supported (i have experimented several times) provided that you remove option 60.

 

TPS automatically empty option 60 when unticking proxydhcp hence supporting UEFI PXE boot in either dhcp or proxydhcp.

 

Suprisingly the video does the opposite ?

 

Note that I am not using option 66/67 but plain dhcp boot filename.



#652 sebus

sebus

    Frequent Member

  • Advanced user
  • 355 posts

Posted 18 February 2017 - 11:02 AM

Note that I am not using option 66/67 but plain dhcp boot filename.

 

Got it in the end.

For UEFI Policy had to remove option 60 & ADD option 150 -TFTP Server IP Address as per

 

http://www.cisco.com...n2000-dhcp.html

 

Now my UEFI PXE client boots from what I tell it to boot from! And I still can access WDS from iPXE menu! (if I must, which I do not)

 

sebus



#653 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 18 February 2017 - 11:05 AM

In where?

 

TPS.

This thread being about TPS, I cannot comment on other softwares.

At best can I talk DHCP principles in general.

 

About UEFI, by design :

If DHCP Option 60 is defined, UEFI will go UDP:4011.

if DHCP Option 60 is empty, UEFI will go UDP:67.

 

About option 66/67, I only use them if I have to : most of the times, the DHCP bootfile achieves what I am looking for.

 

My DORA and UEFI on DHCP - option 60,66,67 empty, using "basic" boot filename field :

21:48:06 DHCPd:67 started...
21:48:06 TFPTd started...
21:48:06 HTTPd started...
21:48:22 DHCPd:DISCOVER received, MAC:00-0C-29-15-1D-03, XID:B4CE5BF6
21:48:22 DHCPd:OFFER sent, IP:192.168.1.124, XID:B4CE5BF6
21:48:26 DHCPd:REQUEST received, MAC:00-0C-29-15-1D-03, XID:B4CE5BF6
21:48:26 DHCPd:ACK sent, IP:192.168.1.124, XID:B4CE5BF6
21:48:26 TFTPd:DoReadFile:ipxe-x86_64.efi B:1468 T:0
21:48:34 DHCPd:DISCOVER received, MAC:00-0C-29-15-1D-03, XID:F4623451
21:48:34 DHCPd:iPXE user-class detected
21:48:34 DHCPd:OFFER sent, IP:192.168.1.125, XID:F4623451
21:48:35 DHCPd:DISCOVER received, MAC:00-0C-29-15-1D-03, XID:F4623451
21:48:35 DHCPd:iPXE user-class detected
21:48:35 DHCPd:OFFER sent, IP:192.168.1.126, XID:F4623451
21:48:37 DHCPd:REQUEST received, MAC:00-0C-29-15-1D-03, XID:F4623451
21:48:37 DHCPd:iPXE user-class detected
21:48:37 DHCPd:ACK sent, IP:192.168.1.126, XID:F4623451
21:48:37 TFTPd:DoReadFile:menu.ipxe B:1432 T:16123


#654 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 18 February 2017 - 11:35 AM

My DORA and UEFI on DHCP - option 60 empty - using option 66/67.

 

Note that with option 66/67, some clients require that the strings are null terminated (which is not mandatory in the RFC and not always implemented server side).

12:34:03 DHCPd:DISCOVER received, MAC:00-0C-29-15-1D-03, XID:AD92D9FE
12:34:03 DHCPd:OFFER sent, IP:192.168.157.2, XID:AD92D9FE
12:34:06 DHCPd:REQUEST received, MAC:00-0C-29-15-1D-03, XID:AD92D9FE
12:34:06 DHCPd:ACK sent, IP:192.168.157.2, XID:AD92D9FE
12:34:06 TFTPd:DoReadFile:ipxe-x86_64.efi B:1468 T:985600
12:34:10 TFTPd:DoReadFile:ipxe-x86_64.efi B:1468 T:985600
12:34:12 TFTPd:DoReadFile:ipxe-x86_64.efi B:1468 T:0
12:34:20 DHCPd:DISCOVER received, MAC:00-0C-29-15-1D-03, XID:F4623451
12:34:20 DHCPd:iPXE user-class detected
12:34:20 DHCPd:OFFER sent, IP:192.168.157.3, XID:F4623451
12:34:21 DHCPd:DISCOVER received, MAC:00-0C-29-15-1D-03, XID:F4623451
12:34:21 DHCPd:iPXE user-class detected
12:34:21 DHCPd:OFFER sent, IP:192.168.157.4, XID:F4623451
12:34:23 DHCPd:REQUEST received, MAC:00-0C-29-15-1D-03, XID:F4623451
12:34:23 DHCPd:iPXE user-class detected
12:34:23 DHCPd:ACK sent, IP:192.168.157.4, XID:F4623451
12:34:23 TFTPd:DoReadFile:menu.ipxe B:1432 T:16123



#655 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 18 February 2017 - 04:29 PM

Got it in the end.

For UEFI Policy had to remove option 60 & ADD option 150 -TFTP Server IP Address as per

 

http://www.cisco.com...n2000-dhcp.html

 

Now my UEFI PXE client boots from what I tell it to boot from! And I still can access WDS from iPXE menu! (if I must, which I do not)

 

sebus

 

Let me gently disaggree with option 150 which is a proprietary cisco option used for cisco phones.

 

On the other side, it is mentionned in RFC2132.

 

Option 60 was pretty obvious to me, option 150 is less.

It may be because a null char is missing in your option 66/67.



#656 sebus

sebus

    Frequent Member

  • Advanced user
  • 355 posts

Posted 18 February 2017 - 05:07 PM

Honestly no idea why, but it works. What can I say?



#657 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 02 March 2017 - 12:41 PM

I did not manage so far to rework the GUI : all my attemps failed (i.e I was not happy with the result).

I tried to rework it so that it would expand horizontally instead of vertically but no luck so far.

If you guys have any proposal (send me screenshots), I would look at it.

 

In the meantime a new version is out with some bug fixes or improvements.

 

I have added a new tool in the zip file : discover.exe.

It will look on the network for Tiny PXE Server and retrieve informations. 

See example lower in this post.

In the long term, idea is to have a "poor man's" distribution server : from a booted winpe, one could retrieve informations to trigger a windows network install.

Tiny PXE Server version 1.0.0.21
March 02, 2017 - 13:30
CRC32: 1317862F
MD5: 5EC71A784524C9374EB1A361862AAE23
SHA-1: 28C8DA26E7241C0B3181D3A08961F5178F4ABD3C
1.0.0.21
modified : dns proxy will read entries from config.ini (section=hostname,ident=ip), no more from hosts file
added : right click open config.ini
added : right click open root_path
fixed : share folder will now add everyone read-only on share permissions
added : share is created with STYPE_TEMPORARY flag, i.e will not survive a reboot
added : TPS will answer to specific 'discovery' messages (see discover.zip)

Example of a batch launched from a WinPe to trigger a windows install without having to hardcode any parameter in the winpe batch.

That batch could be added in winpeshl.ini to be triggerred automatically once winpe has booted up.

Thi way, one can build a generic winpe image to install windows over the network with all params handled on "server" side i.e thru Tiny PXE Server.

@echo off
rem default : will send back Tiny PXE Server IP
for /f %%i in ('discover.exe') do set remote_ip=%%i
echo remote_ip = %remote_ip%
rem will read share_name from remote config.ini
for /f %%i in ('discover.exe share_name') do set share_name=%%i
echo share_name = %share_name%
rem create the user on the server side with net user user password /add
rem will read share_username from remote config.ini
for /f %%i in ('discover.exe share_username') do set share_username=%%i
echo share_username = %share_username%
rem will read share_password from remote config.ini
for /f %%i in ('discover.exe share_password') do set share_password=%%i
echo share_password = ********
rem you can use symbolic link on your server, use unc paths : mklink /d \\server_ip\pxe\iso \\remote_ip\iso
echo mounting z: \\%ip%\%share_name%
net use z: \\%remote_ip%\%share_name% /user:%share_username% %share_password%
z:
cd iso
cd windows_8.1_x86
setup.exe


#658 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 02 March 2017 - 01:18 PM

Right click open root_path not work.



#659 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 02 March 2017 - 02:04 PM

Right click open root_path not work.

Try this : click online First then Try again.

#660 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 02 March 2017 - 03:09 PM

Try this : click online First then Try again.

 

New version uploaded : Right click open root_path will work even before clicking the online button (if a boot filename has been specified).

Tiny PXE Server version 1.0.0.21
March 02, 2017 - 16:06
CRC32: 1BDCA2E7
MD5: 0DA2B9B528A08037CC28E26B9B862641
SHA-1: 8DE9D40221180ACB12FE60F3AFD941F50669274D

  • ZEE likes this

#661 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 02 March 2017 - 06:40 PM

GUI needs a cosmetic fixes - move left 1 pixel TEdit: Option 1, 3, 6, 28, 17 & Extra option



#662 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 02 March 2017 - 07:35 PM

A quick video to illustrate the "discover" mode, i.e Winpe "talking" to Tiny PXE Server to launch the windows network install.

The interesting bits are towards second 30.

 



#663 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 02 March 2017 - 07:41 PM

GUI needs a cosmetic fixes - move left 1 pixel TEdit: Option 1, 3, 6, 28, 17 & Extra option

 

You have a sharp eye !

Now fixed.



#664 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 02 March 2017 - 08:01 PM

You have a sharp eye !

Now fixed.

I do not see changes :mellow:



#665 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 02 March 2017 - 08:05 PM

I do not see changes :mellow:

 

you are sharp and fast (or at least quicker than I am) :)

 

New version uploaded.

Tiny PXE Server version 1.0.0.21
March 02, 2017 - 20:41
CRC32: 0CE86022
MD5: 7587EDA0862216FC13CCF326C96D111B
SHA-1: BE61EA8EA20BA93386A96ACF5B4E5E00338F8C94


#666 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 02 March 2017 - 08:38 PM

New version uploaded.

Yes, now is OK ^_^



#667 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 03 March 2017 - 04:06 PM

Latest version contains a link to the online guide (in the about box).

The zip also contains a url file pointing to the online guide.

 

All credits goes to Misty for his fantastic work there.

 

Tiny PXE Server version 1.0.0.21
March 03, 2017 - 16:54
CRC32: BB131C32
MD5: 5D7CA5B86A12958FCE89AD8BECF21077
SHA-1: 2472D784C3244CB5F232796EFE3FF5D55E6B9855


#668 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 03 March 2017 - 05:24 PM

Sorry, but not understand how use discover.exe



#669 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 03 March 2017 - 05:34 PM

Sorry, but not understand how use discover.exe

 

discover will locate/find TinyPXE Server on the network.

 

 

if you execute "discover.exe" (without any extra parameter), it will report the IP of Tiny PXE Server.

 

If you execute "discover.exe something", it will report the value of "something" in config.ini under dhcp section.

In the example below, discover would report "whatever".

[dhcp]
something=whatever

With this little executable, you can build a generic batch for winpe, no need to hardcode values in a batch (ip of your distribution server, sharename, username, password, etc ...)

One possible batch is given in post 661 and illustrated in a video in post 666.

 

Let me know if it answers your question.



#670 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 03 March 2017 - 05:43 PM

1. Where copy files discover.exe and discover.cmd?

2. How do I start discover.exe?



#671 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 03 March 2017 - 05:50 PM

I would copy discover.exe and discover.cmd in \windows\system32.

Then I would modify winpeshl.ini (also in \windows\system32) like below.

[LaunchApps]
%SYSTEMDRIVE%\Windows\system32\startnet.cmd
%SYSTEMDRIVE%\Windows\system32\discover.cmd

You may want to review the last 3 lines of discover.cmd depending on the content of your network share containing windows install files.

Actually that part of the batch could also be using values coming from discover.exe : at this point, one is free to imagine/introduce all sort of modifications/ideas.

cd iso
cd windows_8.1_x86
setup.exe


#672 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 03 March 2017 - 06:07 PM

I would copy discover.exe and discover.cmd in \windows\system32.

Then I would modify winpeshl.ini (also in \windows\system32) like below.

[LaunchApps]
%SYSTEMDRIVE%\Windows\system32\startnet.cmd
%SYSTEMDRIVE%\Windows\system32\discover.cmd

But these files have to put in the .wim image ?



#673 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 03 March 2017 - 06:25 PM

But these files have to put in the .wim image ?

 

Yes.

Mount the wim file and add/modify files.



#674 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 231 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, EFI, Coreboot, MS VirtualPC, VMware
  •  
    European Union

Posted 03 March 2017 - 06:32 PM

Yes.
Mount the wim file and add/modify files.

But why do I use discover.exe? If I need edit the file boot.wim I do not need any program to run setup.exe - simply need only the script install.bat e.g.:
wpeinit
net use z: \\192.168.1.10\DVD /user:reboot12 testpass
z:
sources\setup /unattend:z:autounattend.xml


#675 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2783 posts
  • Location:Nantes - France
  •  
    France

Posted 03 March 2017 - 06:34 PM

But for what I need use discover.exe? If I need edit the file boot.wim I do not need any program to run setup.exe - simply need only the script install.bat e.g.:

wpeinit
net use z: \\192.168.1.10\DVD /user:reboot12 testpass
z:
sources\setup /unattend:z:autounattend.xml

 

Correct, with one exception there : you currently need to hard code the ip, the username, password, etc ...

If you change any of these items in your environement, or move to another computer, go to a friend, etc, you have to redo your image.

 

If you use discover.exe, you can make all this transparent and dynamic : these parameters will be retrieved thru discover.exe.

 

The below line for example ill get the ip dynamically.

for /f %%i in ('discover.exe') do set remote_ip=%%i
net use z: \\%remoteip%\DVD /user:reboot12 testpass






Also tagged with one or more of these keywords: pxe, network boot

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users