[solved] Variable in boot menu
|
2019-10-11, 21:37
(This post was last modified: 2019-10-20 15:07 by fred.)
Post: #1
|
|||
|
|||
[solved] Variable in boot menu
Hello,
This is what I have and compil from rom-o-matic and work: Code: #!ipxe But I want to passing variable in this menu something like: Code: #!ipxe I see the complet menu of robinsmidsrod, and I tried: Code: #!ipxe And in boot.ipxe.cfg: Code: set boot-url http://192.168.10.118/ It's not working. Only when I compil this full IP. I don't understand where is my error? Can you show me the way to work? Thanks |
|||
2019-10-13, 02:26
Post: #2
|
|||
|
|||
RE: Variable in boot menu
variables are set by http://ipxe.org/cmd/set and are kept between scripts
--autofree and --replace are only about how the script file itself is handled. if you have chain boot.ipxe.cfg in your embedded script, after dhcp, it would try to use the default tftp path. If your http server is on the same server (ip) as your original tftp server than you could use something like: chain http://${netX/next-server}/boot.ipxe.cfg You might want to use the config command from the iPXE shell to see what is set Use GitHub Discussions VRAM bin |
|||
2019-10-14, 20:49
Post: #3
|
|||
|
|||
RE: Variable in boot menu
Hello,
Thanks for your answer. I'm very very sorry, but I simply don't underdstand. Sorry... Yes, my TFTP server is on the same IP. I try this on rom-o-matic: Code: #!ipxe and in my boot.ipxe.cfg Code: set boot-url http://192.168.10.118/ And my root TFTP is: Code: |-- boot.ipxe.cfg When I boot, I have error No boot device, no such file or directory and It's loop reboot. Thanks |
|||
2019-10-14, 23:20
Post: #4
|
|||
|
|||
RE: Variable in boot menu
I strongly suggest to use netX not net0
Could you please post the full error message that you are seeing? Including the ipxe.org url in the message? Use GitHub Discussions VRAM bin |
|||
2019-10-15, 08:03
(This post was last modified: 2019-10-15 08:05 by fred.)
Post: #5
|
|||
|
|||
RE: Variable in boot menu | |||
2019-10-15, 11:38
Post: #6
|
|||
|
|||
RE: Variable in boot menu
try add some sleep and echo in your script to ensure it's actually running
|
|||
2019-10-15, 12:27
Post: #7
|
|||
|
|||
RE: Variable in boot menu
I add:
sleep 5 between each step and add echo http://${netX/next-server}/boot.ipxe.cfg Nothing sleep and nothing echo. Sorry don't know... |
|||
2019-10-16, 23:42
(This post was last modified: 2019-10-16 23:49 by MultimediaMan.)
Post: #8
|
|||
|
|||
RE: Variable in boot menu
Let's try with some debugging code inserted and also some troubleshooting options:
Code: #!ipxe The above script should give you a pretty clear idea of what if going on without having to do too many gymnastics with the keyboard. I suspect the issue is a missing URI descriptor (tftp:// http://)... Let us know the output. Best, M^3 "Thus far, you have been adrift within the sheltered harbor of my patience..." |
|||
2019-10-17, 07:56
Post: #9
|
|||
|
|||
RE: Variable in boot menu
It's little bit better!
Something new! With your script Mr MultimediaMan I have something like this: Code: http://192.168.10.1/menu.ipxe... No such file or directory (http://ipxe.org/2d0c618e) My PXE server ip is 192.168.10.118 192.168.10.1 is my router. I also tried with: Code: set menu-url http://${netX/next-server}/menu.ipxe Same IP display. Near of solution? Thanks to help me! Very cool! Hope to read yours answers |
|||
2019-10-17, 08:12
Post: #10
|
|||
|
|||
RE: Variable in boot menu
OK, I have an idea of the problem...
Code: #!ipxe Please try that and post the output. Best, M^3 "Thus far, you have been adrift within the sheltered harbor of my patience..." |
|||
2019-10-17, 08:19
Post: #11
|
|||
|
|||
RE: Variable in boot menu
The same:
Code: 192.168.10.1 |
|||
2019-10-17, 18:40
(This post was last modified: 2019-10-17 18:46 by MultimediaMan.)
Post: #12
|
|||
|
|||
RE: Variable in boot menu
OK, this problem is easy to fix. But the real problem is your DHCP server configuration. If you have configured an iPXE class in the DHCP Server, please check your settings there.
Can you post up your /etc/dhcp/dhcp.conf for the Subnet for PXE/iPXE and any global settings? The Issue Is DHCP Option 66 ${next-server} is set to 192.168.10.1 but it should be set to 192.168.10.118 There are a couple of different ways to address this... 1: Use DHCP Option 17 ${root-path} (Best way IMHO) instead of relying on DHCP option 66 ${next-server}. ${root-path} is a string variable and can be anything up to 255 characters. 2: Fix your DHCP Option 66/ iPXE class. 3: Ghetto method (not using any DHCP-passed variables, using values burned into iPXE): Code: #!ipxe "Thus far, you have been adrift within the sheltered harbor of my patience..." |
|||
2019-10-18, 10:00
Post: #13
|
|||
|
|||
RE: Variable in boot menu
I'm using DNSMASQ with proxy relay to my router.
This what I tried: dnsmasq.conf Code: #=============================================================== And new boot efi: Code: #!ipxe But no more. echo ${root-path} show me 192.168.10.1 And echo ${root-path}/menu.ipxe show me /menu.ipxe ... no such file or directory Thanks |
|||
2019-10-18, 10:31
(This post was last modified: 2019-10-18 10:31 by MultimediaMan.)
Post: #14
|
|||
|
|||
RE: Variable in boot menu
OK, add these lines in your DNSMASQ:
Replace Line 14 with the following and restart DNSMASQ: Code: dhcp-option=17,http://192.168.10.118/ Here is your new embedded script: Code: #!ipxe Best, M^3 "Thus far, you have been adrift within the sheltered harbor of my patience..." |
|||
2019-10-18, 11:06
Post: #15
|
|||
|
|||
RE: Variable in boot menu
Sorry, same result.
Error echo ${3} show me 192.168.10.1 echo ${17} is empty initrd http:///menu.ipxe Failure! (ipxe.org/err/3e11618e) And that what I tried now: My snponly.efi built with: Code: #!ipxe because show 66 return me the right IP of my pxe-server. And It's works. echo ${3} show me 192.168.10.1 echo ${17} empty echo ${66} show me 192.168.10.118 But I'm not feel good with this solution. But maybe you can explain me. This morning (for me) I don't know dhcp-option before you show me. Why option 66 show me the right IP instead of 192.168.10.1 like in dnsmasq.conf?! Does I need to change something to have a "right classical" configuration? Thanks and sorry for distrub, I would like to have good config. |
|||
2019-10-18, 11:39
Post: #16
|
|||
|
|||
RE: Variable in boot menu
What you have will work.
DNSMASQ will assume to use the DNSMASQ Server IP for all standard DHCP options unless you tell it otherwise. IMHO, you are good right now with what you have... there are "better" ways to do it (Using DNS names and more generic Variables), but you are on the right path for now at least. Best, M^3 "Thus far, you have been adrift within the sheltered harbor of my patience..." |
|||
2019-10-18, 12:36
Post: #17
|
|||
|
|||
RE: Variable in boot menu
Thanks,
I will continue and post when I have finish. |
|||
2019-10-20, 15:07
Post: #18
|
|||
|
|||
RE: Variable in boot menu
My final snponly.efi generate by rom-o-matic that work:
UEFI + dnsmasq Code: #!ipxe Hop can help. Many thanks for your help! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)