Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IPXE newbie seeks help
2016-02-10, 20:56
Post: #1
IPXE newbie seeks help
Hi,

I've already tried to post this on the forum but it hasn't appeared so I'm posting again in case I did something wrong earlier

I've only just come across IPXE although have been using PXELINUX for a while.

I can't figure out how to get started! I have a working FreeBSD based PXE Server but don't know what to put in tftpbooot. With PXELINUX I used gpxelinux.0 and set up options via pxelinux.cfg.

I have tried https://releng.archlinux.org/pxeboot/ and that works fine, but I don't know what I'm supposed to do with http://boot.ipxe.org/ipxe.iso.

Any help would be appreciated.

Apologies for asking such a dumb question.
Find all posts by this user
Quote this message in a reply
2016-02-11, 16:12
Post: #2
RE: IPXE newbie seeks help
(2016-02-10 20:56)balanga Wrote:  I've only just come across IPXE although have been using PXELINUX for a while.

I can't figure out how to get started! I have a working FreeBSD based PXE Server but don't know what to put in tftpbooot. With PXELINUX I used gpxelinux.0 and set up options via pxelinux.cfg.

Post an example stanza from your pxelinux.cfg file, and someone will be able to translate it into an equivalent iPXE script for you!

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-02-11, 18:25
Post: #3
RE: IPXE newbie seeks help
(2016-02-11 16:12)mcb30 Wrote:  
(2016-02-10 20:56)balanga Wrote:  I've only just come across IPXE although have been using PXELINUX for a while.

I can't figure out how to get started! I have a working FreeBSD based PXE Server but don't know what to put in tftpbooot. With PXELINUX I used gpxelinux.0 and set up options via pxelinux.cfg.

Post an example stanza from your pxelinux.cfg file, and someone will be able to translate it into an equivalent iPXE script for you!

Michael

At the moment I'm trying to identify what to use in place of gpxelinx.0. I have no idea where to start. I tried ipxe.iso but got a boot msg:-

PXE-E79: NBP is too big to fit into free base memory
PXE-M0F: Exiting Intel Boot Agent.

As far a gpxelinux.0 is concerned, I'm only using pxelinux.cfg/default which consists of:

ui menu.c32

menu title Utilities

label clonezilla
menu label Clonezilla
kernel images/clonezilla/live/vmlinuz
append initrd=images/clonezilla/live/initrd.img union=overlay \
boot=live config noswap edd=on nomodeset \
ocs_live_run="ocs-live-general" \
vga=791 fetch=tftp://192.168.1.1:images/clonezilla/live/filesystem.squashfs



Which doesn't work BTW although I have managed to get hdt.c32 working
Find all posts by this user
Quote this message in a reply
2016-02-11, 20:22
Post: #4
RE: IPXE newbie seeks help
(2016-02-11 18:25)balanga Wrote:  At the moment I'm trying to identify what to use in place of gpxelinx.0. I have no idea where to start. I tried ipxe.iso but got a boot msg:-

Use http://boot.ipxe.org/undionly.kpxe.

Quote: kernel images/clonezilla/live/vmlinuz
append initrd=images/clonezilla/live/initrd.img union=overlay \
boot=live config noswap edd=on nomodeset \
ocs_live_run="ocs-live-general" \
vga=791 fetch=tftp://192.168.1.1:images/clonezilla/live/filesystem.squashfs

That translates roughly to

Code:
#!ipxe
kernel images/clonezilla/live/vmlinuz initrd=initrd.img union=overlay \
    boot=live config noswap edd=on nomodeset \
    ocs_live_run="ocs-live-general" \
    vga=791 fetch=tftp://192.168.1.1:images/clonezilla/live/filesystem.squashfs
initrd images/clonezilla/live/initrd.img
boot

though I would strongly recommend that you use a fast protocol such as HTTP instead of TFTP.

Michael



Which doesn't work BTW although I have managed to get hdt.c32 working

[/quote]
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-02-11, 20:43
Post: #5
RE: IPXE newbie seeks help
(2016-02-11 20:22)mcb30 Wrote:  Use http://boot.ipxe.org/undionly.kpxe.

Quote: kernel images/clonezilla/live/vmlinuz
append initrd=images/clonezilla/live/initrd.img union=overlay \
boot=live config noswap edd=on nomodeset \
ocs_live_run="ocs-live-general" \
vga=791 fetch=tftp://192.168.1.1:images/clonezilla/live/filesystem.squashfs

That translates roughly to

Code:
#!ipxe
kernel images/clonezilla/live/vmlinuz initrd=initrd.img union=overlay \
    boot=live config noswap edd=on nomodeset \
    ocs_live_run="ocs-live-general" \
    vga=791 fetch=tftp://192.168.1.1:images/clonezilla/live/filesystem.squashfs
initrd images/clonezilla/live/initrd.img
boot

though I would strongly recommend that you use a fast protocol such as HTTP instead of TFTP.

I did manage to come across undionly.pxe and got to a prompt, so that is some progress, although a pointer to that file in a newbie section of the docs would be handy.

Thanks for the code, but I'm not sure where that should go.... Does IPXE look for an equivalent of pxelinux.cfg/default ? If so I'll copy the above code there.

It's not immediately obvious how scripts are invoked, where they should be kept or what they should be called.

As for changing tftp to http, I take your point but not sure how to make that work yet. I currently have pfSense (a FreeBSD based firewall) set up as my PXE boot server, so once I have IPXE working I will look into using http.

BTW I was very impressed being able to boot using http://boot.ipxe.org/demo/boot.php .
Find all posts by this user
Quote this message in a reply
2016-02-12, 14:36
Post: #6
RE: IPXE newbie seeks help
(2016-02-11 20:43)balanga Wrote:  Thanks for the code, but I'm not sure where that should go.... Does IPXE look for an equivalent of pxelinux.cfg/default ? If so I'll copy the above code there.

You can direct iPXE to boot that script in a variety of ways:

- get to the iPXE command line and type "chain <URL of script>"
- configure your DHCP server to hand out "<URL of script>" as the boot filename
- include your script as an embedded script at build time.

Quote:It's not immediately obvious how scripts are invoked, where they should be kept or what they should be called.

You can keep them anywhere that iPXE is capable of downloading from (TFTP server, web server, NFS server, etc) and call them whatever you like. The magic "#!ipxe" marker at the start is what marks it as an iPXE script.

[/quote]
As for changing tftp to http, I take your point but not sure how to make that work yet. I currently have pfSense (a FreeBSD based firewall) set up as my PXE boot server, so once I have IPXE working I will look into using http.
[/quote]

OK. It's basically just a case of changing your tftp:// URIs to http:// URIs. iPXE understands both protocols. HTTP is about two orders of magnitude faster: you can reasonably expect to download the theoretical maximum (119MB/s) over a typical GigE link. TFTP will not get anywhere near that speed.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-02-12, 15:09
Post: #7
RE: IPXE newbie seeks help
(2016-02-12 14:36)mcb30 Wrote:  You can direct iPXE to boot that script in a variety of ways:

- get to the iPXE command line and type "chain <URL of script>"
- configure your DHCP server to hand out "<URL of script>" as the boot filename
- include your script as an embedded script at build time.


Michael

Maybe I'll include a script at build time once I get familiar with how this all hangs together... although it would be nice if I could build IPXE on FreeBSD...

The second option is what I want to setup at the moment, and can't figure out how it works...

If I have undionly.pxe in \tftpboot along with ipxe.script containing the script you provided for clonezilla, how do I specify boot filename? How does the script know it should be invoked by undionly.pxe?

Apologies if it is obvious but I'm not clear how it works.
Find all posts by this user
Quote this message in a reply
2016-02-12, 15:15
Post: #8
RE: IPXE newbie seeks help
(2016-02-12 15:09)balanga Wrote:  The second option is what I want to setup at the moment, and can't figure out how it works...

If I have undionly.pxe in \tftpboot along with ipxe.script containing the script you provided for clonezilla, how do I specify boot filename? How does the script know it should be invoked by undionly.pxe?

Did you try reading the pages I linked to in my previous answer?

Your DHCP server has to be configured to hand out either "undionly.kpxe" as the boot filename for the original PXE ROM's DHCP request, then to hand out "script.ipxe" as the boot filename for iPXE's DHCP request. This is documented in the page I linked to previously: http://ipxe.org/howto/dhcpd. You can also find an overview at http://ipxe.org/howto/chainloading.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)