Jump to content











Photo

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

pxe network boot

  • Please log in to reply
790 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
  • 14323 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

    Gold Member

  • Developer
  • 2320 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

    Gold Member

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

Posted 2 weeks ago

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

    Gold Member

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

Posted 2 weeks ago

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
  • 5 posts
  •  
    South Africa

Posted 2 weeks ago

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



#788 erwan.l

erwan.l

    Gold Member

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

Posted 2 weeks ago

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
  • 1 posts
  •  
    Germany

Posted 13 hours ago

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

    Gold Member

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

Posted 11 hours ago

 

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

    Silver Member

  • Developer
  • 885 posts
  •  
    United Kingdom

Posted 11 hours ago

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





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