Jump to content











Photo

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

pxe network boot

  • Please log in to reply
779 replies to this topic

#151 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 05 May 2014 - 01:00 PM

How can i use Tiny PXE to surport EFI client to boot? and in the same time surport normal BIOS client to boot also.

 

in my HaneWin dhcp server config like this:

BootFile=pxelinux.0
VendorClassId=PXEClient:Arch:00007:
BootFile2=efi\boot\bootx64.efi
.....

then it surport EFI and BIOS client in same time.



#152 erwan.l

erwan.l

    Gold Member

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

Posted 05 May 2014 - 02:05 PM

How can i use Tiny PXE to surport EFI client to boot? and in the same time surport normal BIOS client to boot also.

 

in my HaneWin dhcp server config like this:

BootFile=pxelinux.0
VendorClassId=PXEClient:Arch:00007:
BootFile2=efi\boot\bootx64.efi
.....

then it surport EFI and BIOS client in same time.

 

For now Tiny PXE Server can adapt the boot file based the user-class (to send a different boot file to ipxe) but also on the mac-address or ip-address (using @mac or $ip in the boot filename).

 

I guess it should be easy enough to add an extra filter based on the vendorclass id.

 

Would you have example of vendorclass based on bios vs efi client?

 

Regards,

Erwan

 

Edit : for PXE boot over a UEFI computer, I wrote this article.



#153 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 26 July 2014 - 07:32 AM

I have released a ISO,based on chinese:http://pan.baidu.com...62&uk=622348759

boot a pe to desk,then install NIC driver,then install HaneWin dhcp,then ok! it surport EFI or BIOS client to boot in the same time.



#154 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 26 July 2014 - 07:36 AM

I have released a ISO,based on chinese:http://pan.baidu.com...62&uk=622348759

boot a pe to desk,then install NIC driver,then install HaneWin dhcp,then ok! it surport EFI or BIOS client to boot in the same time.



#155 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 26 July 2014 - 07:49 AM

In HaneWin dhcp,can pre-defined two boot file:BootFile=pxelinux.0(for bios client) BootFile2=efi\boot\bootx64.efi(for EFI client)

like that,In your Tiny PXE server,i have not found where to define two boot file.



#156 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 26 July 2014 - 08:02 AM

this is my DHCP.BAT

@ECHO OFF
PUSHD %~dp0
SET HK_ENV=HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

:Start
Title PXE网启服务器选择及安装
CLS
Echo 第一步,网启服务器及启动方式选择:
Echo.
Echo   --------PXE/HTTP/EFI三支持网启,内网有其他DHCP不方便(1-4)---------
Echo         [1] BIOS PXELinux+UEFI 64自适应方式
Echo         [2] BIOS Grub4DOS+UEFI 64自适应方式
Echo         [3] BIOS PXELinux+UEFI 32自适应方式
Echo         [4] BIOS Grub4DOS+UEFI 32自适应方式
Echo.
Echo   --------PXE/HTTP 两支持网启,内网有其他DHCP时较方便 (5-6)---------
Echo         [5] BIOS PXELinux 方式
Echo         [6] BIOS Grub4DOS 方式
Echo         [Q] 退出本程序
Echo.
SET Choice=
SET BootFile2=
SET /P Choice=请选择 1/2/3/4/5/6/Q ,然后按回车(直接回车代表1):
rem IF "%Choice%"=="" Goto Start
IF Not "%Choice%"=="" SET Choice=%Choice:~0,1%
IF "%Choice%"=="" SET BootFile=pxelinux.0&SET BootFile2=efi\boot\bootx64.efi&SET Arch=00007&Goto INSTALL
IF "%Choice%"=="1" SET BootFile=pxelinux.0&SET BootFile2=efi\boot\bootx64.efi&SET Arch=00007&Goto INSTALL
IF "%Choice%"=="2" SET BootFile=grldr&SET BootFile2=efi\boot\bootx64.efi&SET Arch=00007&Goto INSTALL
IF "%Choice%"=="3" SET BootFile=pxelinux.0&SET BootFile2=efi\boot\bootia32.efi&SET Arch=00006&Goto INSTALL
IF "%Choice%"=="4" SET BootFile=grldr&SET BootFile2=efi\boot\bootia32.efi&SET Arch=00006&Goto INSTALL
IF "%Choice%"=="5" SET BootFile=pxelinux.0&Goto INSTALL
IF "%Choice%"=="6" SET BootFile=grldr&Goto INSTALL
IF /I "%Choice%"=="Q" GOTO END
Goto Start

:INSTALL
ECHO 第二步,文件合法性检查.......
IF "%IniDrv%"=="" For /F "tokens=3" %%i In ('REG QUERY "%HK_ENV%" /V IniDrv^|find /I "IniDrv"') do SET IniDrv=%%i
REM PECMD.EXE PXEFILE.INI
REM 设置HAneWin DHCP-----------------
rem IF "%BootFile%"=="" For /F "tokens=3" %%i In ('REG QUERY "%HK_ENV%" /V BootFile^|find /I "BootFile"') do SET BootFile=%%i
rem IF "%BootFile%"=="" SET BootFile=pxelinux.0
IF EXIST %IniDrv%\%BootFile% goto FindBootFile
for %%i in (z y x w v u t s r q p o n m l k j i h g f e d c b a) do IF exist %%i:\%BootFile% set IniDrv=%%i:&&GOTO FindBootFile
PECMD.EXE MESS 不存在网启文件:%IniDrv%\%BootFile%,请准备好该文件后后再运行本程序!@提示:缺少网启文件 #OK *10000
GOTO END

:FindBootFile
ECHO 第三步,安装网启服务.......
set system32=%Windir%\System32
IF /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" set system32=%Windir%\SysWOW64
IF NOT EXIST %System32%\dhcpsrv.cpl 7z.exe x DHCP.7z -y -aos -o"%System32%"
For /F "tokens=3" %%i In ('REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /V ComputerName') do SET ComputerName=%%i
setlocal
for /f "usebackq tokens=2 delims=[]" %%i in (`ping -n 1 -4 %Computername%`) do set myip=%%i
for /f "tokens=1-3,4 delims=." %%i in ("%myip%") do set mynet=%%i.%%j.%%k
if "%BootFile2%"=="" goto DefPXESRV
:DefHaneWin
>%System32%\DHCPsrv.ini echo.[License]
>>%System32%\DHCPsrv.ini echo.Key=BBLZ26803UBBCAT9
>>%System32%\DHCPsrv.ini echo.Name=Free User
>>%System32%\DHCPsrv.ini echo.[DHCPsrv]
>>%System32%\DHCPsrv.ini echo.Profile0=本地连接
>>%System32%\DHCPsrv.ini echo.Include=%myip%
>>%System32%\DHCPsrv.ini echo.TFTPDirectory=%IniDrv%\
>>%System32%\DHCPsrv.ini echo.Multicast=0
>>%System32%\DHCPsrv.ini echo.TestIP=1
>>%System32%\DHCPsrv.ini echo.TFTPEnable=1
>>%System32%\DHCPsrv.ini echo.TFTPMode=0
>>%System32%\DHCPsrv.ini echo.Log=0
>>%System32%\DHCPsrv.ini echo.[本地连接]
>>%System32%\DHCPsrv.ini echo.SubnetMask=255.255.255.0
>>%System32%\DHCPsrv.ini echo.BaseIP=%mynet%.100
>>%System32%\DHCPsrv.ini echo.Range=101
>>%System32%\DHCPsrv.ini echo.NextIP=%myip%
>>%System32%\DHCPsrv.ini echo.BootFile=%BootFile%
rem >>%System32%\DHCPsrv.ini echo.RootPath=%computername%
>>%System32%\DHCPsrv.ini echo.RootPath=iscsi:%myip%::3268::H3PE
>>%System32%\DHCPsrv.ini echo.UseOpt=1
>>%System32%\DHCPsrv.ini echo.DNSUpdate=0
>>%System32%\DHCPsrv.ini echo.InterfaceIP=%myip%
>>%System32%\DHCPsrv.ini echo.Alternate=1
>>%System32%\DHCPsrv.ini echo.VendorClassId=PXEClient:Arch:%Arch%:
>>%System32%\DHCPsrv.ini echo.BootFile2=%BootFile2%
>>%System32%\EasyWebSvr.ini echo.RootDir=%IniDrv%\
goto InsServer
:DefPXESRV
>>%System32%\config.ini echo.Root=%IniDrv%
>>%System32%\config.ini echo.Opt17=%IniDrv%\
>>%System32%\config.ini echo.Filename=%BootFile%

:InsServer
ECHO 第四步,关闭防火墙并启动服务.......
endlocal

rem Share PEROOT
set ExtDrv=%IniDrv%
IF NOT Exist %IniDrv%\H3PE\WINPE.INI for %%i in (z y x w v u t s r q p o n m l k j i h g f e d c b a) do IF exist %%i:\H3PE\WINPE.INI set ExtDrv=%%i:
net share PEROOT /d >nul 2>nul
IF "%BootOS%"=="" (
	net share PEROOT=%ExtDrv%\ /unlimited
) ELSE net share PEROOT=%ExtDrv%\ /grant:Everyone,read /unlimited
NET LOCALGROUP Administrators Guest /ADD

rem Stop FireWall
IF /I "%BootOS%"=="W8" (
net stop ikeext
net stop bfe
)
IF /I "%BootOS%"=="W81" net stop bfe
PECMD.EXE FILE "%%Programs%%\网络\网络组件安装\安装 (i)PXE 网启服务.LNK"

if "%BootFile2%"=="" goto RunPXESRV
%System32%\dhcp4nt.exe -install
PECMD.EXE LINK %%Programs%%\网络\网络启动服务器\EasyWebSvr HTTP网启服务端,%System32%\EasyWebSvr.exe
PECMD.EXE LINK %%Programs%%\网络\网络启动服务器\HaneWin 网启服务端,%System32%\dhcpsrv.cpl,,%System32%\dhcp.ico
PECMD.EXE LINK %%Programs%%\网络\网络启动服务器\中止 HaneWin 网启服务,%System32%\dhcp4nt.exe,-remove,shell32.dll#10
PECMD.EXE LINK %%Programs%%\网络\网络启动服务器\重启 HaneWin 网启服务,%System32%\dhcp4nt.exe,-install,shell32.dll#9
PECMD.EXE LINK %%Desktop%%\HaneWin 网启服务端,%System32%\dhcpsrv.cpl,,%cd%\dhcp.ico
START %System32%\dhcpsrv.cpl
START %System32%\EasyWebSvr.exe
goto end

:RunPXESRV
PECMD.EXE LINK %%Programs%%\网络\网络启动服务器\PXESRV 网启服务端,%System32%\pxesrv.exe
START %System32%\pxesrv.exe

:END


#157 erwan.l

erwan.l

    Gold Member

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

Posted 26 July 2014 - 12:02 PM

Hier hhh333,

Please note that TinyPxe Server can share the root folder for you.
That would simplify the batch.

Also soon TinyPxe will handle the arch variable.

Cheers,
Erwan.

#158 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 27 July 2014 - 10:57 PM

oh,thanks

I'm very glad to expect to TinyPxe can handle the arch variable,then,can pre-defined two boot file:BootFile or more.



#159 erwan.l

erwan.l

    Gold Member

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

Posted 24 August 2014 - 05:15 PM

Version 1.0.0.18 out.
added : @arch variable can be used in the filename (next to @mac and @ip). 00000 = bios, 00006=efi32, etc ... see https://www.rfc-edit...rfc/rfc4578.txt
fixed : tftpd will also bind to the specificied interface if option is checked
modified : if the root folder in config.ini is incorrect, it will be set to the exe current directory
modified : if the filename cannot be resolved (like when using @arch or @mac), it will not prevent execution
 
This version mostly adds support for UEFI machines.
One can now use the @arch parameter in the filename so that the right bootstrap is handed over based on the originating client.
Tiny PXE Server will replace @arch by the Client System Architecture Type provided by the DHCP request as defined in the rfc.
 
00000 -> Intel x86PC
00001 ->  NEC/PC98
00002 ->  EFI Itanium
00003 ->  DEC Alpha
00004 ->  Arc x86
00005 ->  Intel Lean Client
00006 ->  EFI IA32
00007 ->  EFI BC
00008 ->  EFI Xscale
00009 ->  EFI x86-64
 
In my root folder, I have ipxe.00000 (which the renamed ipxe.pxe version for bios clients) and ipxe.00007 (which is the renamed ipxe.efi version for EFI cliens).
In Tiny PXE Server, I input ipxe.@arch as filename.
 
This should simplify a scenarion as mentionned by hhh333.
 
Regards,
Erwan


#160 ljycslg

ljycslg

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 25 August 2014 - 12:51 AM

 

Version 1.0.0.18 out.
added : @arch variable can be used in the filename (next to @mac and @ip). 00000 = bios, 00006=efi32, etc ... see https://www.rfc-edit...rfc/rfc4578.txt
fixed : tftpd will also bind to the specificied interface if option is checked
modified : if the root folder in config.ini is incorrect, it will be set to the exe current directory
modified : if the filename cannot be resolved (like when using @arch or @mac), it will not prevent execution
 
This version mostly adds support for UEFI machines.
One can now use the @arch parameter in the filename so that the right bootstrap is handed over based on the originating client.
Tiny PXE Server will replace @arch by the Client System Architecture Type provided by the DHCP request as defined in the rfc.
 
00000 -> Intel x86PC
00001 ->  NEC/PC98
00002 ->  EFI Itanium
00003 ->  DEC Alpha
00004 ->  Arc x86
00005 ->  Intel Lean Client
00006 ->  EFI IA32
00007 ->  EFI BC
00008 ->  EFI Xscale
00009 ->  EFI x86-64
 
In my root folder, I have ipxe.00000 (which the renamed ipxe.pxe version for bios clients) and ipxe.00007 (which is the renamed ipxe.efi version for EFI cliens).
In Tiny PXE Server, I input ipxe.@arch as filename.
 
This should simplify a scenarion as mentionned by hhh333.
 
Regards,
Erwan

 

efi boot file can't rename

using a fixed name  "bootx64.efi" on EFI x86-64  , "bootia32.efi" on EFI IA32



#161 erwan.l

erwan.l

    Gold Member

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

Posted 25 August 2014 - 05:42 AM

efi boot file can't rename
using a [/size]fixed name[/size]  "[/size]bootx64.efi" on EFI x86-64  , [/size]"bootia32.efi" on EFI IA32[/size]


Thanks for the feedback.
You mean that for windows to boot, one cannot rename the efi boot file?
I did my test with ipxe and using renamed files was ok but this could be a constraint for windows.
If so i need to review my logic then...

Regards,
Erwan.

#162 hydeist

hydeist

    Newbie

  • Members
  • 25 posts

Posted 29 August 2014 - 08:23 PM

I don't know why the PXE http transfer always hanging or rather closing.

 

JpahQcl.png



#163 reboot12

reboot12

    Frequent Member

  • Advanced user
  • 218 posts
  • Interests:WinXP, Debian, OpenWrt, gPXE, iPXE, BIOS, Coreboot
  •  
    European Union

Posted 29 August 2014 - 08:30 PM

I don't know why the PXE http transfer always hanging or rather closing.

The best of use Tiny PXE with virtual machine is MS VPC 2007. With VirtualBox and VMware i noticed some problems with HTTP transfer.

#164 erwan.l

erwan.l

    Gold Member

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

Posted 29 August 2014 - 10:49 PM

I don't know why the PXE http transfer always hanging or rather closing.
 
JpahQcl.png


Try ipxe.pxe rather the undionly version.
You should get better results.
  • hydeist likes this

#165 erwan.l

erwan.l

    Gold Member

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

Posted 30 August 2014 - 03:12 PM

Thanks for the feedback.
You mean that for windows to boot, one cannot rename the efi boot file?
I did my test with ipxe and using renamed files was ok but this could be a constraint for windows.
If so i need to review my logic then...

Regards,
Erwan.

 

Actually, according to my tests, renaming bootx64.efo has no negatif effect.

 

Hence, one can safely use the @arch Tiny PXE Server variable to boot to standard BIOS or to UEFI.

 

In the setup below, Tiny PXE Server will send boot.00000 (renamed pxeboot.com -> bootmgr.exe->bcd.00000) or boot.00007 (renamed bootx64.efi -> bcd.00007) according to the client system architecture.

 

wzVNvGi.png



#166 hydeist

hydeist

    Newbie

  • Members
  • 25 posts

Posted 30 August 2014 - 03:39 PM

Try ipxe.pxe rather the undionly version.
You should get better results.

 

It really did it was 100x faster.

Whats the difference between ipxe.pxe, ipxe-undionly.kpxe.



#167 erwan.l

erwan.l

    Gold Member

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

Posted 30 August 2014 - 03:51 PM

It really did it was 100x faster.

Whats the difference between ipxe.pxe, ipxe-undionly.kpxe.

 

ipxe.ipxe contains all network card drivers and therefore has the most suited driver for your network card.

 

ipxe.ipxe is bigger thus compared to the undi only version which means it will take a few secs more to transfer and will take a bit more memory.

On modern hardware, i believe it not a concern.

 

note that you should use latest Tiny PXE Server 1.0.0.18 as it contains the latest version of ipxe.



#168 ljycslg

ljycslg

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 31 August 2014 - 11:51 AM

Can use the directory where the pxesrv.exe as the TFTPd root folder?



#169 erwan.l

erwan.l

    Gold Member

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

Posted 31 August 2014 - 11:59 AM

Can use the directory where the pxesrv.exe as the TFTPd root folder?

 

yes you can.

 

1-by default the root folder is the folder hosting pxesrv.exe.

2-you can also set this up in the config.ini.

3-pointing to another boot file will automatically re set the root folder to the folder hosting this boot file.

 

when you click the online button, Tiny PXE Server tells you which is the current root folder (see screenshot in my previous post).



#170 hydeist

hydeist

    Newbie

  • Members
  • 25 posts

Posted 01 September 2014 - 07:36 AM

BUG: config opt67 doesn't work as intended.

need to browse the pxe file to make it work.

 

jhIxXZC.png



#171 erwan.l

erwan.l

    Gold Member

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

Posted 01 September 2014 - 04:30 PM

BUG: config opt67 doesn't work as intended.

need to browse the pxe file to make it work.

 

jhIxXZC.png

 

1/

The "Proxy boot filename empty?" is to be ignored.

I should even remove that message.

 

2/

About the boot filename, you either go for standard bootp filename OR option67.

Filling one field will empty the other (bootp <-> option67).

 

3/

Now this does not explain why you are not getting TFTP.

Can you copy paste the entire log (from the text window) ?

 

4/

Also, please use latest version (here).



#172 hydeist

hydeist

    Newbie

  • Members
  • 25 posts

Posted 02 September 2014 - 03:31 PM

There really nothing special in the logs, it's true that if you put opt67=ipxe.pxe bootp will be ignored vice versa.

It just that, you have to browse the ipxe.pxe file in the GUI in order to make it work. The config file doesn't work as intended.

 

7:24:56 PM DHCPd:67 started...
7:24:56 PM DHCPd:4011 started...
7:24:58 PM DHCPd:DISCOVER received, MAC:08-00-27-5F-FF-F3, XID:2A5FFFF3
7:24:58 PM DHCPd:OFFER sent, IP:0.0.0.0, XID:2A5FFFF3
7:25:06 PM DHCPd:REQUEST discarded, MAC:08-00-27-5F-FF-F3, XID:2A5FFFF3
7:25:06 PM PDHCPd:REQUEST received, MAC:08-00-27-5F-FF-F3, IP:192.168.0.56, XID:2A5FFFF3
7:25:07 PM Proxy boot filename empty?
7:25:07 PM PDHCPd:DHCP_ACK sent, IP:192.168.0.56:68, xid:2A5FFFF3


#173 erwan.l

erwan.l

    Gold Member

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

Posted 03 September 2014 - 10:41 PM

 

There really nothing special in the logs, it's true that if you put opt67=ipxe.pxe bootp will be ignored vice versa.

It just that, you have to browse the ipxe.pxe file in the GUI in order to make it work. The config file doesn't work as intended.

7:24:56 PM DHCPd:67 started...
7:24:56 PM DHCPd:4011 started...
7:24:58 PM DHCPd:DISCOVER received, MAC:08-00-27-5F-FF-F3, XID:2A5FFFF3
7:24:58 PM DHCPd:OFFER sent, IP:0.0.0.0, XID:2A5FFFF3
7:25:06 PM DHCPd:REQUEST discarded, MAC:08-00-27-5F-FF-F3, XID:2A5FFFF3
7:25:06 PM PDHCPd:REQUEST received, MAC:08-00-27-5F-FF-F3, IP:192.168.0.56, XID:2A5FFFF3
7:25:07 PM Proxy boot filename empty?
7:25:07 PM PDHCPd:DHCP_ACK sent, IP:192.168.0.56:68, xid:2A5FFFF3

 

Ok, I see what you mean.

Will look into this.



#174 erwan.l

erwan.l

    Gold Member

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

Posted 03 September 2014 - 10:49 PM

Ok, I see what you mean.

Will look into this.

 

re download the zip file : should be fixed (was an easy one).



#175 hhh333

hhh333

    Newbie

  • Members
  • 26 posts
  •  
    China

Posted 06 September 2014 - 06:55 AM

oh,this is a not clever method by rename bootfile name to XXX.@arch.please improve like this

if @arch=00000(or NULL or not define @arch) bootfilename=pxelinux.0
.......
if @arch=00006 bootfilename=efi\boot\bootia32.efi
if @arch=00007 bootfilename=efi\boot\bootx64.efi
.....

so,let user to define a independent bootfile for every @arch.


Edited by hhh333, 06 September 2014 - 07:15 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