Jump to content











Photo

Problem setting Root and filename, altfilename


  • Please log in to reply
15 replies to this topic

#1 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 29 January 2018 - 03:04 PM

Hello,
 
I have a problem setting root and filename directives in config.ini.
These two directives seem to be strongly correlated, I would like that filename path could be relative to root. For example:
 
[dhcp]
root=D:\PXE
filename=bootfiles\undionly.kpxe
 
It it works, by this, I can put all my boot files in D:\PXE\bootfiles. But currently with
Tiny PXE server (pxeserv.exe) v1.0.0.21, the previous directives change the PXE server root
to "d:\PXE\bootfiles" (seen in server output) instead of keeping "d:\PXE" as I want. Tiny PXE server is located at d:\PXE\pxeserv.exe.
 
Is there a solution for that?
 


#2 erwan.l

erwan.l

    Platinum Member

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

Posted 29 January 2018 - 06:20 PM

 

Hello,
 
I have a problem setting root and filename directives in config.ini.
These two directives seem to be strongly correlated, I would like that filename path could be relative to root. For example:
 
[dhcp]
root=D:\PXE
filename=bootfiles\undionly.kpxe
 
It it works, by this, I can put all my boot files in D:\PXE\bootfiles. But currently with
Tiny PXE server (pxeserv.exe) v1.0.0.21, the previous directives change the PXE server root
to "d:\PXE\bootfiles" (seen in server output) instead of keeping "d:\PXE" as I want. Tiny PXE server is located at d:\PXE\pxeserv.exe.
 
Is there a solution for that?

 

 

You have probably already considered it but i'll have to ask :)

 

Have you considered the below?

Stuff your exe in d:\pxe and your boot files (boot strap, iso, wim, etc) in .\bootfiles ?

[dhcp]
root=D:\PXE\bootfiles
filename=undionly.kpxe


#3 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 29 January 2018 - 07:04 PM

@erwan.l
 
From your example, I understand that the directory where the boot files are stored will set root directory for Tiny PXE Server.
This is a constraint that I did not expect. 
 
I like to have things organized so I have D:\WIM to store WIM files, D:\ISO for ISOs, d:\PXE for PXE-relatee stuff,
and so a separate D:\PXE\bootfiles directory for storing different boot files (csm/uefi, x86/x64, undi, snp, intel, ipxe, gpxe...).
D:\PXE can store pxeserv.exe, config.ini and menu files.
 
For me the root directory once set in config.ini by root= directive should not be changed later at run-time. Otherwise this is confusing.
Filename, Altfilename directives path etc... could then be relative to this root directory. 
The directory where pxeserv.exe is started does not seem to have importance, but it seems that it looks for config.ini in the same directory.
To access wim/iso etc... files by httpd or nfs server, I can use "/../" to traverse the directory tree, there is no problem.
 
So your proposal to put all files in d:\pxe\bootfiles (or to the extreme, put all files in d:\pxe) work, but this is not entirely
satisfactory for me due to my personal need for directory structure organization.
 


#4 erwan.l

erwan.l

    Platinum Member

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

Posted 29 January 2018 - 09:17 PM

 

@erwan.l
 
For me the root directory once set in config.ini by root= directive should not be changed later at run-time. Otherwise this is confusing.
Filename, Altfilename directives path etc... could then be relative to this root directory. 
The directory where pxeserv.exe is started does not seem to have importance, but it seems that it looks for config.ini in the same directory.
To access wim/iso etc... files by httpd or nfs server, I can use "/../" to traverse the directory tree, there is no problem.

 

Fair point : at first look it is an un-expected side effect (i dont recall this being a request in the past).

 

I will have a look by the end of this week.

It has been ages that I did not release a new version : I take it this is a sign of stability :)



#5 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 30 January 2018 - 08:11 AM

@erwan.l
 
I take the opportunity to submit some wishlist for Tiny PXE server (TPS).
 
1- Listen in real-time on any operational adapter interface (INADDR_ANY). This important function is missing currently (note: Serva 3.0 has this function). The advantage is once TPS is started, I do not need to change and bind the listening IP (option 54). With this, TPS can simultaneously serve different PXE clients from different interfaces (e.g. from VMware and from Virtual box). The listening IP displayed in TPS is only needed when for some reason I want to bind it (check button clicked). In real-time: because new adapter interface could come up (in my case, I do not use router nor switch, but simple direct Ethernet cable connection between two machines), so at the time TPS is started, the Ethernet adapter interface is not yet up (PXE client machine off), and TPS no longer shows its associated IP unless it is up, and after restarting TPS.
 
2- A degraded option (if point 1- above is not implemented) is to refresh/add all adapter interfaces address range when Online button pressed. The Offline/Online buttons are very practical, it has advantage against Serva 3.0 (who lacks this function, and requires to stop and restart the server). Currently the adapter interfaces are not refreshed with Online button, so if ever a new adapter interface comes up (usually Ethernet connection) I have to stop then restart Tiny PXE Server in order to get the associated IP for the adapter to be presented in the option 54 combo-box.
 
2- Add support for IP v6 (IN6ADDR_ANY). In fact this is not a real need, but my laptop BIOS/UEFI offers PXE boot with IP v6 in addition to PXE boot with IP v4, so by curiosity I would like to experiment with it :-).
 
Thank you for listening.
 


#6 erwan.l

erwan.l

    Platinum Member

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

Posted 02 February 2018 - 05:40 PM

@ktp

 

1.About INADDR_ANY : try '0.0.0.0' in the config.ini but then you will have to take care of all fields.

2.In latest version, you can use CTRL+R to refresh interfaces (without restarting the software).

3.IPV6 ... tough one :)


  • ktp likes this

#7 erwan.l

erwan.l

    Platinum Member

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

Posted 02 February 2018 - 09:03 PM

@ktp : i can probably enforce that "root=root" but are you sure that pxe clients will be happy file boot filename = "bootfiles\undionly.kpxe" ?

is that long string supported? can you use '\' char in a filename?



#8 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 03 February 2018 - 07:06 AM

@erwan.l
 

 

1.About INADDR_ANY : try '0.0.0.0' in the config.ini but then you will have to take care of all fields.

 

I assume I can set this with option54=0.0.0.0.
"All fields": Do you mean fields like IP pool start/size, Next-server etc...? How do I fill them to match all interfaces?
How does tool like Aomei PXE boot tool booting WinPE iso do? Their setting is minimalistic, you only need to provide the iso file location. No network settings needed, and it answers correctly on all existing interfaces.
 

 

2.In latest version, you can use CTRL+R to refresh interfaces (without restarting the software).

 

I try Ctrl-R without success with version 1.0.0.21. Is there a beep sound or something to acknowledge the refresh?
 

 

@ktp : i can probably enforce that "root=root" but are you sure that pxe clients will be happy file boot filename = "bootfiles\undionly.kpxe" ?
is that long string supported? can you use '\' char in a filename?

 

OK, from your answer I did not realize that the whole string of filename (including relative path) is transmitted to the PXE client. Probably TPS should accept "/" instead of "\", and "\" to be converted internally to "/" by TPS.
Now about the changes: it would be cause of problem for existing users, and would break what is working. So I drop my request. I can organize differently my files.
 


#9 erwan.l

erwan.l

    Platinum Member

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

Posted 03 February 2018 - 11:41 AM

About point 2 you need to download latest zip.
  • ktp likes this

#10 erwan.l

erwan.l

    Platinum Member

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

Posted 03 February 2018 - 11:43 AM

About point 1 i suspect aoemi pxe is using the best interface to provide valid ip détails / dhcp options.
I could do it as well.

#11 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 03 February 2018 - 02:28 PM

About point 1 i suspect aoemi pxe is using the best interface to provide valid ip détails / dhcp options.
I could do it as well.

Yes, please do it, it would greatly help.

 

What I understand is that when a DHCP DISCOVER is received on one interface, TPS will use all the default/best options (IP pool start/size, next-server, options 1,3,6,28 as displayed in the GUI) to send back to the PXE client and handling subsequent TFTP/HTTP requestts. And of course Proxy DHCP or not should be taken into account.

 

Question: in case option54=0.0.0.0, I assume the checkbox "Bind" is no longer necessary or ineffective. Is it true?



#12 erwan.l

erwan.l

    Platinum Member

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

Posted 03 February 2018 - 02:39 PM

Main (historical) mistake is to mix the 'select interface' with 'option 54'.
It should be 2 different fields : one field where you would select which interface you want to listen on (including '0.0.0.0') and one field where you provide option 54.
 
Second point is that, when you select option 54, TPS will make life easy for you and will "auto fill" all other dhcp  fields with what is believe to be the best value (gateway, range, etc).
For now, I could easily add '0.0.0.0' to the interface/option 54 field but option 54=0.0.0.0 does not make sense (even if it can be over ruled by next-server field) and the "auto fill" function would not work anymore (hence you having to provide the right details then which can be challenging/confusing for many users).
 
What I need to do really is :
-add another field where the user would select the interface, including inaddr_any=0.0.0.0
-have the auto fill choose the best interface to auto fill the dhcp fields like gateway, dns, etc


#13 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 03 February 2018 - 02:44 PM

About point 2 you need to download latest zip.

Got it and tested OK. On Ctrl-R pressed, new message displayed in log file, announcing the total number of interdaces (operational or not), and what best interface is.

 

The option 54 combo-box (list of interfaces) is updated accordingly to add new operational interfaces, or to suppress down interfaces. Note: so the number of elements in the combo-box could be less than the total number of interfaces due to some inoperational/disconnected interface.

 

pxeserv.exe size 922,112 bytes, date 2018-02-02 (yyyy-mm-dd).

MD5 fba2a527a1b836631f59d122f4b9d5e4 *pxesrv.exe



#14 erwan.l

erwan.l

    Platinum Member

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

Posted 03 February 2018 - 02:48 PM

The option 54 combo-box (list of interfaces) is updated accordingly to add new operational interfaces, or to suppress down interfaces. Note: so the number of elements in the combo-box could be less than the total number of interfaces due to some inoperational/disconnected interface.

 

 

Actually and you spot it right : it will always report +1 interface as I am actually removing the '0.0.0.0' on purpose today :)

This mis design thingie is there since day one : option 54 <> interface card.

 

Next version will have a new field for interfaces, above the option 54 field, and will list all interfaces including '0.0.0.0'.

 

Yes, non connected interfaces (or rather those without an IP), will be not listed.



#15 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 04 February 2018 - 03:58 PM

@erwan.l
 
Following are the resultes after using the latest Tiny PXE server
pxesrv.exe 
1.0.0.21
04/02/2018 14:08 
CC9234D6500082C7C509E64FB6BE0F2F
 
My request was to have a separate bootfiles directory, without changing the setting of root= directive in config.ini.
This did not work:
[dhcp]
;root=
filename=bootfiles\unkdionly.kpxe
altfilename=menu.ipxe
 
From erwan's indication, I use this the following trick in [arch].
This works:
 
[arch]
; http://reboot.pro/topic/21614-ipxe-wimboot-and-multi-platform-pcbiosefii386x86-64/
; will overrule filename or opt67 if client arch matches one of the below
; DHCP option 93  Client architecture
; 0 Standard PC BIOS
; 6 32-bit x86 EFI
; 7 64-bit x86 EFI
; 9 64-bit x86 EFI (obsolete)
; 10  32-bit ARM EFI
; 11  64-bit ARM EFI
00000=bootfiles\undionly.kpxe
00006=bootfiles\ipxe32.efi
00007=bootfiles\ipxe64.efi
 
[dhcp]
;root=
filename=unkdionly.kpxe
altfilename=menu.ipxe
 
 
My directory structure:
Directory \PXE: TPS files:
pxesrv.exe (main executalbe)
config.INI (configuration file)
menu.ipxe (altfilename: menu for iPXE)
 
Optional:
licensing.txt
pxesrv.txt
pxesrv-faq.xhtml
version.txt
 
Directory \PXE\bootfiles\: bootfiles:
*.efi
*.pxe
*.k*pxe
 
 
1- Remark: root= not needed: Good, since in this cas TPS set root as its startup directory, in my case \PXE.
 
2- Remark: the boot filename (filename= directive) has to be filled, without relative path. If you omit it, it will be displayed as bootfiles/undionly.kpxe and the TPS root is set to \PXE\bootfiles, which I do not want. 
 
3- Problem: when I select by browsing the boot file name with Browse button, in /bootfiles sub-directory, after Offline/Online the TPS root is changed to \PXE\bootfiles (or to whatever location I choose the boot file)! So I cannot dynamically change the boot file.
 
4- Question/wishlist: altfilename (check case Filename if user-class=gPXE or iPXE): I can directly typein a filename, or use Browse button. But how can I delete some old/inexisting entries in the combo-box history? Usually such combo-box support "Del" key to delete selected entry, but this does not work. Where is the history list stored? As portable application, I hope that it does not write to the registry.


#16 erwan.l

erwan.l

    Platinum Member

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

Posted 04 February 2018 - 05:14 PM

Good news is that there is a workaround :)

Actually this should be the default behavior.

I reckon there is something wrong around the (main) boot filename and the root variable.

 

About point 1 : by design, if no root variable then root = exe directory.

About point 2 : this has indeed to be part of the workaround (you could even put a dummy filename there).

About point 3 : part of the workaround for now, has to take place thru the ini file.

About point 4 : ouch ... you may not like it :) look under HKLM\software\iptools\pxeserver\txtaltfilename .

                         I could change HKLM to HKCU thus...






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users