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

#776 matso

matso
  • Members
  • 9 posts
  •  
    Sweden

Posted 08 February 2018 - 07:46 PM

Just like to add that TFTPBlocksize is not implemented on some PXE solutions (for example Vmwares virtual PXE) 

 

Another nice feature to have in the MAP section would be a flag to do only first part of string replacement.

 

IE

/boot/=/demo/  would change

 

/boot/test/something into /demo/test/something but would not change anything in /test/boot/something


Edited by matso, 08 February 2018 - 07:49 PM.


#777 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 09 February 2018 - 11:14 AM

Also full Regular Expression support would be nice .... :whistling:

 

https://xkcd.com/208/

 

;)

:D

 

:duff:

Wonko


  • ZEE likes this

#778 erwan.l

erwan.l

    Platinum Member

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

Posted 11 February 2018 - 04:55 PM

Also full Regular Expression support would be nice .... :whistling:

 

https://xkcd.com/208/

 

;)

:D

 

:duff:

Wonko

 

I could but "simple" mortals struggle with regular expressions.

Which would mean I should implement some sort of extra logic to detect if the user is using regex or not.

 

For now, this is a very basic search and replace feature with 2 exceptions :

-if the old pattern (to the right of the "=" in [map] section) is contained in the new pattern (left of "=" in the [map] section, nothing will happen - see why in post.

-order (for now) in which the keys under [map] are read is random (which is not helping :) )

procedure TfrmDHCPServer.OnReadFile2 (Sender: TObject; var FileName: String) ;
var
i:byte;
keys:tstringlist;
begin
//here we can modify the requested filename on the fly
//before the request gets to the TFTPD
try
if (h_map<>nil) then //do we have entries in the map section
  begin
  keys:=h_map.Keys ;
  if keys.Count =0 then exit;
  for i:=0 to keys.Count -1 do  //lets loop thru map entries
    begin
    if pos(lowercase(keys [i]),lowercase(filename))>0 then //we have a match
      begin
      if pos(lowercase(h_map.GetString(keys [i])),lowercase(filename))=0 then //lets replace only if filename does not contain our new string
        begin
        filename:=StringReplace(filename,keys [i],h_map.GetString(keys [i]),[rfIgnoreCase]); //NOT rfReplaceAll
        end;//if pos(h_map.GetString(keys [i]),filename)=0 then
       break; //we stop it there as we had a match, whether we actually modified the filename or not
      end;//if pos(keys [i],filename)>0
    end;//for i:=0 to keys.Count -1 do
  end;//if (h_map<>nil) then
except
end;


#779 ktp

ktp

    Silver Member

  • Advanced user
  • 758 posts

Posted 11 February 2018 - 05:04 PM

@erwan.l
 
Latest TPS version:
pxesrv.exe 
1.0.0.22
11/02/2018 17:39 
8231A2C337A64F6B8D8597E7C2315682
 
looks fine for me:
- switching configuration file (right click): OK.
- optional configuration file on command line: OK.
 
Thank you for your time and effort. Keep up the good work!
 


#780 Alex Defo

Alex Defo
  • Members
  • 1 posts
  •  
    Poland

Posted 26 April 2018 - 12:28 PM

Hello, I'm very slowly booted by PXE image wim using Tiny PXE Server 1.0.0.22. Tell me how to set up? I will be glad to any help, thank you. p.s. Wim image WinPe8.1 224mb time load 1.50m lan 1gb.

#781 kodos

kodos
  • Members
  • 1 posts
  •  
    Greece

Posted 18 September 2018 - 10:34 AM

question about discover.exe (for x64 system)

 

i use ipxe , send discover.exe/startnet.cmd (it contains the commands from discover.cmd)

and then i get an error "the subsystem needed to support the image type is not present"

 

do i need to "load" something else ? 

 

edit i guess is this a x64 issue, so is there any way to get the ip and other infos from command ?


Edited by kodos, 18 September 2018 - 11:10 AM.


#782 ZEE

ZEE

    Member

  • Members
  • 99 posts
  •  
    Portugal

Posted 18 September 2018 - 11:31 AM

Also full Regular Expression support would be nice .... :whistling:

 

https://xkcd.com/208/

 

;)

:D

 

:duff:

Wonko

 

I'm for that too :rolleyes:



#783 ZEE

ZEE

    Member

  • Members
  • 99 posts
  •  
    Portugal

Posted 18 September 2018 - 01:08 PM

Really helpful also would be if the the window is resizable

(at least vertically)

and the "console window" textbox (where messages are displayed)

auto-resizes to fill the available space...

 

This can all be done only in the Delphi IDE designer

adjusting some main window and textbox properties...

 

1.png



#784 ZEE

ZEE

    Member

  • Members
  • 99 posts
  •  
    Portugal

Posted 19 September 2018 - 05:38 PM

Really helpful also would be if the the window is resizable

(at least vertically)

 

and the "console window" textbox (where messages are displayed)

auto-resizes to fill the available space...

 

This can all be done easy in the Delphi IDE designer

by adjusting some main window and textbox properties...

 

tinypxe1.png



#785 erwan.l

erwan.l

    Platinum Member

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

Posted 29 October 2018 - 02:10 PM

Really helpful also would be if the the window is resizable

(at least vertically)

 

and the "console window" textbox (where messages are displayed)

auto-resizes to fill the available space...

 

This can all be done easy in the Delphi IDE designer

by adjusting some main window and textbox properties...

 

tinypxe1.png

 

Let me give it some thoughts - because of the long history, tweaks and tricks, modifying the interface is not easy.



#786 erwan.l

erwan.l

    Platinum Member

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

Posted 29 October 2018 - 02:18 PM

New in latest version : some files served over the built-in HTTP daemon such as files with extension PHP, VBS and PY can be dynamically processed on the server side and not simply sent back as text/html files.

 

This gives one the ability to implement a logic on the server side thru php, vbscript or python, including parameters in the URL.

Other engines could be added later on such as node.js, perl, ...

 

Example of ipxe script file on the client side (more reading here).

chain http://${next-server}/boot.php?param1=value1&param2=value2

Example of a boot.php file server side.

<?php
//use $argv[1], $argv[2], etc to retrieve url parameters
echo "#!ipxe\n";
echo "kernel ${boot-url}/wimboot\n";
echo "initrd ${boot-url}/bootmgr                     bootmgr\n";
echo "initrd ${boot-url}/boot/BCD                    BCD\n";
echo "initrd ${boot-url}/Boot/boot.sdi               boot.sdi\n";
echo "initrd ${boot-url}/sources/boot.wim            boot.wim\n";
echo "boot\n";
?>  

The TinyPXE Server config.ini web section.

[web]
port=80
;php.exe file.php param1=value1
php=c:\_apps\php\php.exe
;cscript.exe file.vbs param1=value1 //nologo
vbs=C:\Windows\System32\cscript.exe
;python.exe file.py param1=value1
py=C:\Python27\python.exe

  • bothwellw likes this

#787 bothwellw

bothwellw
  • Members
  • 6 posts
  •  
    South Africa

Posted 29 October 2018 - 07:55 PM

Many thanks for adding this new feature will be very useful.



#788 erwan.l

erwan.l

    Platinum Member

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

Posted 30 October 2018 - 04:05 PM

question about discover.exe (for x64 system)

 

i use ipxe , send discover.exe/startnet.cmd (it contains the commands from discover.cmd)

and then i get an error "the subsystem needed to support the image type is not present"

 

do i need to "load" something else ? 

 

edit i guess is this a x64 issue, so is there any way to get the ip and other infos from command ?

 

TinyPXE Server now includes discover.exe in both x86 and x64 version.

Discover is a simple udp broadcast client looking for TPS over the network and querying values stored in TPS config.ini under the [dhcp] section.

This way, one does not have to hardcode values (like network path, password, etc) in his WinPE setup.

 

Example of a batch using discover.exe on the client side to automate windows installation :

@echo off
for /f %%i in ('discover.exe') do set ip=%%i
echo %ip%
for /f %%i in ('discover.exe share_name') do set share_name=%%i
echo %share_name%
for /f %%i in ('discover.exe share_username') do set share_username=%%i
echo %share_username%
for /f %%i in ('discover.exe share_password') do set share_password=%%i
echo %share_password%
rem net use * /delete
rem net use z: /delete
echo mounting \\%ip%\%share_name%
net use z: \\%ip%\%share_name% /user:%share_username% %share_password%
z:
setup.exe

  • kodos likes this

#789 yogie007

yogie007
  • Members
  • 2 posts
  •  
    Germany

Posted 13 November 2018 - 05:18 PM

Hello,
 
I'm a newcomer to Tiny PXE and would like to integrate the Microsoft Defender Offline.
 
I inserted the following entry in the menu.ipxe, and the client also boots
these entries, but then remains with a black screen.
Can someone give me the correct entry?
Many thanks for the help.
 
:defender
  cpuid --ext 29 && set arch amd64 || set arch x86
  kernel ${boot-url}/wimboot
  initrd ${boot-url}/${arch}/defender/bootmgr       bootmgr
  initrd ${boot-url}/${arch}/defender/boot/bcd      BCD
  initrd ${boot-url}/${arch}/defender/boot/boot.sdi boot.sdi
  initrd ${boot-url}/${arch}/defender/sources/boot.wim         boot.wim
  boot || goto failed
goto start 
 
greeting
yogie007


#790 erwan.l

erwan.l

    Platinum Member

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

Posted 13 November 2018 - 07:08 PM

 

Hello,
 
I'm a newcomer to Tiny PXE and would like to integrate the Microsoft Defender Offline.
 
I inserted the following entry in the menu.ipxe, and the client also boots
these entries, but then remains with a black screen.
Can someone give me the correct entry?
Many thanks for the help.
 
:defender
  cpuid --ext 29 && set arch amd64 || set arch x86
  kernel ${boot-url}/wimboot
  initrd ${boot-url}/${arch}/defender/bootmgr       bootmgr
  initrd ${boot-url}/${arch}/defender/boot/bcd      BCD
  initrd ${boot-url}/${arch}/defender/boot/boot.sdi boot.sdi
  initrd ${boot-url}/${arch}/defender/sources/boot.wim         boot.wim
  boot || goto failed
goto start 
 
greeting
yogie007

 

 

Hi Yogie,

 

Copy/paste the full script (how do you set  ${boot-url} for instance).

Copy/paste the log from TPS to see what files you are downloading.

About the "screen stays black", how does it look before it becomes black?

 

Regards,

Erwan



#791 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 13 November 2018 - 07:40 PM

Hello,

I'm a newcomer to Tiny PXE and would like to integrate the Microsoft Defender Offline.

I inserted the following entry in the menu.ipxe, and the client also boots these entries, but then remains with a black screen.
Can someone give me the correct entry?....

I would first recommend ruling out whether this is a Windows Defender Offline or wimboot issue.

It's been a while since I used Windows Defender Offline. If memory serves then it is/was a Windows 7 based WinPE (WinPE 3.*). On one of my newer systems in UEFI mode I have not been able to boot any Windows 7 based WinPE. I haven't tried that hard due to time constraints, however a Windows 7 based WinPE that boots fine on an older system is not working on the newer one - it hangs on a black screen.

To rule out your issue being Windows Defender Offline related, I would recommend that you first test it on your system using a local boot method - e.g. booting from USB or CD/DVD.

If a local boot works, then try chainloading the Windows PXE boot file - e.g. using ipxe -
chain ${boot-url}/pxeboot.0
(where pxeboot.0 is a renamed pxeboot.n12 from Windows source files (see here))

If both of these methods work, then you may need to play with your wimboot menu settings.

:cheers:

Misty

#792 yogie007

yogie007
  • Members
  • 2 posts
  •  
    Germany

Posted 14 November 2018 - 09:47 AM

Thanks Erwan + Misty, I tried to start the UEFI PC with the USB stick, and that did not work. I'm looking for a solution to launch a virus scanner on PXE, and thus scan all the PC's on the net ...

 

Regards

Yogie007



#793 Franz Ferdinand II.

Franz Ferdinand II.

    Newbie

  • Members
  • 13 posts
  •  
    Macedonia

Posted 10 December 2018 - 12:58 PM

HI everybody, trying to boot another compuiter in home network from LAN and prepared the root folder from ISO following this guide http://diddy.boot-la...files/winpe.htm.

Now my config is

 

Zy5SiCj.png

 

But still getting "PXE-E53: No boot filename received" errorz whatever parameters I set. As the log shows the guested computer tries to connect but doesn't get whet it wants

 

My TFTP root folder contains

 

./bootmgr.exe
./pxeboot.0

./boot/BCD

./boot/BOOT.SDI

./boot/boot.wim

./boot/<all Windows\Boot\ files from WIM>

 

Can I get some clue what's wrong, thanks..........



#794 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 10 December 2018 - 01:31 PM

That guide is rather old.

 

This one is more recent and explicitly about TinyPXE server:

http://mistyrebootfi...rver/index.html

 

I presume that the issue is the "TFTP root directory", at first sight it seems like you specified it in Option 17 (which is another thing).

 

Unless you have specified it in the .ini, the path of the TFTP root is relative to where the pxesrv.exe is running:

http://mistyrebootfi...esrv_config.htm

 

:duff:

Wonko



#795 Franz Ferdinand II.

Franz Ferdinand II.

    Newbie

  • Members
  • 13 posts
  •  
    Macedonia

Posted 10 December 2018 - 02:23 PM

Thanks, I've reset config.ini and started from scratch. I use the settings for proxy DHCP:

root=files
filename=ipxe.pxe
altfilename=ipxe_menu.txt

My ipxe_menu.txt now is

#!ipxe
#============== Set Variables ===============
set boot-url http://192.168.137.2

#================ Main Menu =================
menu iPXE boot menu
item winpe_iso1    WinPE (Memdisk)
item winpe_iso2    WinPE (SANBOOT)
choose target && goto ${target}

#============ Main Menu Options =============
:winpe_iso1
kernel ${boot-url}/memdisk iso raw
initrd ${boot-url}/iso/WinPE.iso
boot

:winpe_iso2
sanboot --no-describe ${boot-url}/iso/WinPE.iso
boot

 

and ISO copied to files\iso\WinPE.iso

 

But still PXE-E53: No boot filename received

 

It seems whatever I set I always get No boot filename error.

Any further diagnostic?

 

This shows in log window when I boot the guested computer

 

15:17:43 DHCPd:DISCOVER received, MAC:90-E6-BA-11-18-09, XID:BB111809
15:17:43 DHCPd:OFFER sent, IP:0.0.0.0, XID:BB111809
15:17:43 DHCPd:DISCOVER received, MAC:90-E6-BA-11-18-09, XID:BC111809
15:17:43 DHCPd:OFFER sent, IP:0.0.0.0, XID:BC111809
15:17:43 DHCPd:DISCOVER received, MAC:90-E6-BA-11-18-09, XID:BD111809
15:17:44 DHCPd:OFFER sent, IP:0.0.0.0, XID:BD111809
15:17:44 DHCPd:DISCOVER received, MAC:90-E6-BA-11-18-09, XID:BE111809
15:17:44 DHCPd:OFFER sent, IP:0.0.0.0, XID:BE111809



#796 reboot12

reboot12

    Frequent Member

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

Posted 10 December 2018 - 02:35 PM

Fix ipxe script:

#!ipxe

dhcp

#============== Set Variables ===============
set boot-url http://${dhcp-server}

#================ Main Menu =================
menu iPXE boot menu
item winpe_iso1    WinPE (Memdisk)
item winpe_iso2    WinPE (SANBOOT)
choose target && goto ${target}

#============ Main Menu Options =============
:winpe_iso1
kernel ${boot-url}/memdisk iso raw
initrd ${boot-url}/iso/WinPE.iso
boot

:winpe_iso2
sanboot --no-describe ${boot-url}/iso/WinPE.iso
boot


#797 Franz Ferdinand II.

Franz Ferdinand II.

    Newbie

  • Members
  • 13 posts
  •  
    Macedonia

Posted 10 December 2018 - 02:45 PM

Script is fixed, but still getting PXE-E53. My current config is now

 

tOKgO4I.png



#798 reboot12

reboot12

    Frequent Member

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

Posted 10 December 2018 - 03:08 PM

Connect computers directly with a cable without using a LAN and disable ProxyDhcp.



#799 erwan.l

erwan.l

    Platinum Member

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

Posted 10 December 2018 - 03:24 PM

if you use proxydhcp, try ${next-serverinstead of ${dhcp-server}.

 

indeed, in your case, dhcp-server could be your actual dhcp-server and not the host where TPS is running (and acting an http server).

 

whenever possible, i would stick to procy-dhcp so that you dont mess/interfere with your dhcp on your network but rather nicely co-exist.

 

there are many ipxe scripts actually using ${dhcp-server} which may be tricky in some scenarios.



#800 Franz Ferdinand II.

Franz Ferdinand II.

    Newbie

  • Members
  • 13 posts
  •  
    Macedonia

Posted 11 December 2018 - 10:36 AM

Ok, can I make clear what exactly should I use in GUI setting for the Next server, and do I need to use BINL and ProxyDhcp?

 

The computer where pxesrv is running is at IP 192.168.137.5

The machine which I network boot is a VirtulBox guest on computer with IP 192.168.137.2 (bridged to VM)

The router runs own DHCP server at IP 192.168.137.1

 

Is http://${dhcp-server} the correct value?

 

Actually this constellation already boots but gets halted on ipxe_menu.txt load:

 

nkVGyvm.png


Edited by Franz Ferdinand II., 11 December 2018 - 10:40 AM.






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

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users