iPXE, gPXE, tftp provisioning

Hi,

I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and am
using a VMware guest for the purpose of testing. I am using an existing
Windows dhcp server to assign an IP. In dhcp I have the boot server as my
smart proxy and boot file is gpxelinux.0. I have also tried setting the
DHCP class to gPXE.

Note: When I set the boot file to pxelinux.0 and dhcp class to none the
install starts. I presume this is because standard tftp is being used?? My
test setup is not locked down. But I want to get this working in test first.

I am using the stock templates and have Kickstart default PXELinux,
Kickstart default gPXE and Kickstart Default assigned to my host. I am
using an existing webserver for my install media.

At the moment, when I power on the VM using dhcp boot file as gpxelinux.0
and dhcp class as gPXE I get taken to a grub> menu

Given the above, am I doing this correctly and why am I getting to the grub
menu and not the installer?

Thanks,

Do you have a gpxelinux.0 file on your TFTP server? Perhaps it isn't
the right kernel and your host is falling back to some other bootloader?
It should be the gpxe.lkrn file, renamed.

Even still, this isn't a 100% HTTP setup, you're still relying on TFTP
to fetch your bootloader.

You might also want to look at
https://github.com/theforeman/foreman_bootdisk for ISO and USB booting
over HTTP. I haven't tested it with 1.2.2 though, only 1.3.

··· On 01/10/13 10:37, Oleg Mcnoleg wrote: > Hi, > > I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and > am using a VMware guest for the purpose of testing. I am using an > existing Windows dhcp server to assign an IP. In dhcp I have the boot > server as my smart proxy and boot file is gpxelinux.0. I have also tried > setting the DHCP class to gPXE. > > Note: When I set the boot file to pxelinux.0 and dhcp class to none the > install starts. I presume this is because standard tftp is being used?? > My test setup is not locked down. But I want to get this working in test > first. > > I am using the stock templates and have Kickstart default PXELinux, > Kickstart default gPXE and Kickstart Default assigned to my host. I am > using an existing webserver for my install media. > > At the moment, when I power on the VM using dhcp boot file as > gpxelinux.0 and dhcp class as gPXE I get taken to a grub> menu > > Given the above, am I doing this correctly and why am I getting to the > grub menu and not the installer?


Dominic Cleal
Red Hat Engineering

I have this working now, thanks for your help.

However I see some odd behaviour in my test setup. When I boot the foreman
ISO the builds sometimes hang when loading either vmlinuz or initrd.img.

I'm looking into it, but if I restart the install both files load and I'm
the install continues.

I'm not sure if this is due to an overloaded web servers that hosts our
install media.

··· On Tuesday, October 1, 2013 10:37:28 AM UTC+1, Oleg Mcnoleg wrote: > > Hi, > > I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and am > using a VMware guest for the purpose of testing. I am using an existing > Windows dhcp server to assign an IP. In dhcp I have the boot server as my > smart proxy and boot file is gpxelinux.0. I have also tried setting the > DHCP class to gPXE. > > Note: When I set the boot file to pxelinux.0 and dhcp class to none the > install starts. I presume this is because standard tftp is being used?? My > test setup is not locked down. But I want to get this working in test first. > > I am using the stock templates and have Kickstart default PXELinux, > Kickstart default gPXE and Kickstart Default assigned to my host. I am > using an existing webserver for my install media. > > At the moment, when I power on the VM using dhcp boot file as gpxelinux.0 > and dhcp class as gPXE I get taken to a grub> menu > > Given the above, am I doing this correctly and why am I getting to the > grub menu and not the installer? > > Thanks, > > > >

Thanks for the quick reply. I have the boot disk plugin installed now. This
is exactly what I need.

I now have following templates assigned Kickstart default PXElinux, Boot
disk gPXE - host and Kickstart Default

I click the Boot disk Host 'myhost' image button, this downloads the ISO, I
boot the ISO from my VM and get the below:

http://foreman.mydomain.com/unattended/gPXE… Error 0x3e11623b
(http://ipxe.org/3e11623b)

Network boot from Intel E1000
Copyright © 2003-2000 VMware, Inc.
Copyright © 1997-2000 Intel Corporation

PXE-EC8: !PXE structure was not found in UNDI driver code segment.
PXE-M0F: Exiting Intel PXE ROM.

Is it worth upgrading to Foreman 1.3?

··· On Tuesday, October 1, 2013 10:42:48 AM UTC+1, Dominic Cleal RH wrote: > > On 01/10/13 10:37, Oleg Mcnoleg wrote: > > Hi, > > > > I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and > > am using a VMware guest for the purpose of testing. I am using an > > existing Windows dhcp server to assign an IP. In dhcp I have the boot > > server as my smart proxy and boot file is gpxelinux.0. I have also tried > > setting the DHCP class to gPXE. > > > > Note: When I set the boot file to pxelinux.0 and dhcp class to none the > > install starts. I presume this is because standard tftp is being used?? > > My test setup is not locked down. But I want to get this working in test > > first. > > > > I am using the stock templates and have Kickstart default PXELinux, > > Kickstart default gPXE and Kickstart Default assigned to my host. I am > > using an existing webserver for my install media. > > > > At the moment, when I power on the VM using dhcp boot file as > > gpxelinux.0 and dhcp class as gPXE I get taken to a grub> menu > > > > Given the above, am I doing this correctly and why am I getting to the > > grub menu and not the installer? > > Do you have a gpxelinux.0 file on your TFTP server? Perhaps it isn't > the right kernel and your host is falling back to some other bootloader? > It should be the gpxe.lkrn file, renamed. > > Even still, this isn't a 100% HTTP setup, you're still relying on TFTP > to fetch your bootloader. > > You might also want to look at > https://github.com/theforeman/foreman_bootdisk for ISO and USB booting > over HTTP. I haven't tested it with 1.2.2 though, only 1.3. > > -- > Dominic Cleal > Red Hat Engineering >

> Thanks for the quick reply. I have the boot disk plugin installed now.
> This is exactly what I need.
>
> I now have following templates assigned Kickstart default PXElinux, Boot
> disk gPXE - host and Kickstart Default

You need "Kickstart boot disk gPXE" assigned to the host rather than the
"Boot disk *" one. It's a two-stage process, the "Boot disk" script is
embedded into the ISO, while the "Kickstart gPXE" one is used for
booting the OS.

> I click the Boot disk Host 'myhost' image button, this downloads the
> ISO, I boot the ISO from my VM and get the below:
>
> http://foreman.mydomain.com/unattended/gPXE… Error 0x3e11623b
> (http://ipxe.org/3e11623b)
>
> Network boot from Intel E1000
> Copyright © 2003-2000 VMware, Inc.
> Copyright © 1997-2000 Intel Corporation
>
> PXE-EC8: !PXE structure was not found in UNDI driver code segment.
> PXE-M0F: Exiting Intel PXE ROM.
>
> Is it worth upgrading to Foreman 1.3?

No, sounds like it works OK on 1.2, which is good to know!

··· On 01/10/13 12:18, Oleg Mcnoleg wrote:


Dominic Cleal
Red Hat Engineering

So I built a new Foreman PROD instance in the same way but now I get s a
404 with trying to hit http://foreman.myproddomain.com/unattemded/gPXE

What could I have forgotten? This is driving me mental! Arghh

I get a 200 response against my test setup with curl -I
http://foreman.mytestdomain.com/unattended but when I run the same think
against my prod machine I get a 404.

What could cause this???

··· On Tuesday, October 15, 2013 3:48:45 PM UTC+1, Oleg Mcnoleg wrote: > > I have this working now, thanks for your help. > > However I see some odd behaviour in my test setup. When I boot the foreman > ISO the builds sometimes hang when loading either vmlinuz or initrd.img. > > I'm looking into it, but if I restart the install both files load and I'm > the install continues. > > I'm not sure if this is due to an overloaded web servers that hosts our > install media. > > > On Tuesday, October 1, 2013 10:37:28 AM UTC+1, Oleg Mcnoleg wrote: >> >> Hi, >> >> I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and >> am using a VMware guest for the purpose of testing. I am using an existing >> Windows dhcp server to assign an IP. In dhcp I have the boot server as my >> smart proxy and boot file is gpxelinux.0. I have also tried setting the >> DHCP class to gPXE. >> >> Note: When I set the boot file to pxelinux.0 and dhcp class to none the >> install starts. I presume this is because standard tftp is being used?? My >> test setup is not locked down. But I want to get this working in test first. >> >> I am using the stock templates and have Kickstart default PXELinux, >> Kickstart default gPXE and Kickstart Default assigned to my host. I am >> using an existing webserver for my install media. >> >> At the moment, when I power on the VM using dhcp boot file as gpxelinux.0 >> and dhcp class as gPXE I get taken to a grub> menu >> >> Given the above, am I doing this correctly and why am I getting to the >> grub menu and not the installer? >> >> Thanks, >> >> >> >>

> So I built a new Foreman PROD instance in the same way but now I get s a
> 404 with trying to hit http://foreman.myproddomain.com/unattemded/gPXE
>
> What could I have forgotten? This is driving me mental! Arghh
>
the host is not in build mode?

Ohad

··· On Thu, Oct 24, 2013 at 4:57 PM, Oleg Mcnoleg wrote:

I get a 200 response against my test setup with curl -I
http://foreman.mytestdomain.com/unattended but when I run the same think
against my prod machine I get a 404.

What could cause this???

On Tuesday, October 15, 2013 3:48:45 PM UTC+1, Oleg Mcnoleg wrote:

I have this working now, thanks for your help.

However I see some odd behaviour in my test setup. When I boot the
foreman ISO the builds sometimes hang when loading either vmlinuz or
initrd.img.

I’m looking into it, but if I restart the install both files load and I’m
the install continues.

I’m not sure if this is due to an overloaded web servers that hosts our
install media.

On Tuesday, October 1, 2013 10:37:28 AM UTC+1, Oleg Mcnoleg wrote:

Hi,

I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and
am using a VMware guest for the purpose of testing. I am using an existing
Windows dhcp server to assign an IP. In dhcp I have the boot server as my
smart proxy and boot file is gpxelinux.0. I have also tried setting the
DHCP class to gPXE.

Note: When I set the boot file to pxelinux.0 and dhcp class to none the
install starts. I presume this is because standard tftp is being used?? My
test setup is not locked down. But I want to get this working in test first.

I am using the stock templates and have Kickstart default PXELinux,
Kickstart default gPXE and Kickstart Default assigned to my host. I am
using an existing webserver for my install media.

At the moment, when I power on the VM using dhcp boot file as
gpxelinux.0 and dhcp class as gPXE I get taken to a grub> menu

Given the above, am I doing this correctly and why am I getting to the
grub menu and not the installer?

Thanks,


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

The host is in build mode

Cancelled it and put it into build mode again for good measure! Still no
dice.

This is a fresh install of 1.3.0 (today) using the foreman installer. BTW I
still think this is something I have forgotten! Not anything to do with the
build.

··· On Thursday, October 24, 2013 2:58:39 PM UTC+1, ohad wrote: > > > > > On Thu, Oct 24, 2013 at 4:57 PM, Oleg Mcnoleg <stockf...@gmail.com > > wrote: > >> So I built a new Foreman PROD instance in the same way but now I get s a >> 404 with trying to hit http://foreman.myproddomain.com/unattemded/gPXE >> >> What could I have forgotten? This is driving me mental! Arghh >> > the host is not in build mode? > > Ohad > >> >> I get a 200 response against my test setup with curl -I >> http://foreman.mytestdomain.com/unattended but when I run the same think >> against my prod machine I get a 404. >> >> What could cause this???? >> >> >> >> On Tuesday, October 15, 2013 3:48:45 PM UTC+1, Oleg Mcnoleg wrote: >>> >>> I have this working now, thanks for your help. >>> >>> However I see some odd behaviour in my test setup. When I boot the >>> foreman ISO the builds sometimes hang when loading either vmlinuz or >>> initrd.img. >>> >>> I'm looking into it, but if I restart the install both files load and >>> I'm the install continues. >>> >>> I'm not sure if this is due to an overloaded web servers that hosts our >>> install media. >>> >>> >>> On Tuesday, October 1, 2013 10:37:28 AM UTC+1, Oleg Mcnoleg wrote: >>>> >>>> Hi, >>>> >>>> I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 and >>>> am using a VMware guest for the purpose of testing. I am using an existing >>>> Windows dhcp server to assign an IP. In dhcp I have the boot server as my >>>> smart proxy and boot file is gpxelinux.0. I have also tried setting the >>>> DHCP class to gPXE. >>>> >>>> Note: When I set the boot file to pxelinux.0 and dhcp class to none the >>>> install starts. I presume this is because standard tftp is being used?? My >>>> test setup is not locked down. But I want to get this working in test first. >>>> >>>> I am using the stock templates and have Kickstart default PXELinux, >>>> Kickstart default gPXE and Kickstart Default assigned to my host. I am >>>> using an existing webserver for my install media. >>>> >>>> At the moment, when I power on the VM using dhcp boot file as >>>> gpxelinux.0 and dhcp class as gPXE I get taken to a grub> menu >>>> >>>> Given the above, am I doing this correctly and why am I getting to the >>>> grub menu and not the installer? >>>> >>>> Thanks, >>>> >>>> >>>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> > >

> The host is in build mode
>
> Cancelled it and put it into build mode again for good measure! Still no
> dice.
>

Logs?

··· On Thu, Oct 24, 2013 at 5:20 PM, Oleg Mcnoleg wrote:

This is a fresh install of 1.3.0 (today) using the foreman installer. BTW
I still think this is something I have forgotten! Not anything to do with
the build.

On Thursday, October 24, 2013 2:58:39 PM UTC+1, ohad wrote:

On Thu, Oct 24, 2013 at 4:57 PM, Oleg Mcnoleg stockf...@gmail.comwrote:

So I built a new Foreman PROD instance in the same way but now I get s a
404 with trying to hit http://foreman.myproddomain.**com/unattemded/gPXEhttp://foreman.myproddomain.com/unattemded/gPXE

What could I have forgotten? This is driving me mental! Arghh

the host is not in build mode?

Ohad

I get a 200 response against my test setup with curl -I
http://foreman.mytestdomain.**com/unattendedhttp://foreman.mytestdomain.com/unattendedbut when I run the same think against my prod machine I get a 404.

What could cause this???

On Tuesday, October 15, 2013 3:48:45 PM UTC+1, Oleg Mcnoleg wrote:

I have this working now, thanks for your help.

However I see some odd behaviour in my test setup. When I boot the
foreman ISO the builds sometimes hang when loading either vmlinuz or
initrd.img.

I’m looking into it, but if I restart the install both files load and
I’m the install continues.

I’m not sure if this is due to an overloaded web servers that hosts our
install media.

On Tuesday, October 1, 2013 10:37:28 AM UTC+1, Oleg Mcnoleg wrote:

Hi,

I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2
and am using a VMware guest for the purpose of testing. I am using an
existing Windows dhcp server to assign an IP. In dhcp I have the boot
server as my smart proxy and boot file is gpxelinux.0. I have also tried
setting the DHCP class to gPXE.

Note: When I set the boot file to pxelinux.0 and dhcp class to none
the install starts. I presume this is because standard tftp is being used??
My test setup is not locked down. But I want to get this working in test
first.

I am using the stock templates and have Kickstart default PXELinux,
Kickstart default gPXE and Kickstart Default assigned to my host. I am
using an existing webserver for my install media.

At the moment, when I power on the VM using dhcp boot file as
gpxelinux.0 and dhcp class as gPXE I get taken to a grub> menu

Given the above, am I doing this correctly and why am I getting to the
grub menu and not the installer?

Thanks,


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user…@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com
.

Visit this group at http://groups.google.com/**group/foreman-usershttp://groups.google.com/group/foreman-users
.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

From Foreman production log:

Started GET "/unattended/gPXE" for 82.152.117.44 at 2013-10-24 15:54:37
+0100
Processing by UnattendedController#gPXE as /
unattended: unable to find a host that matches the request from
82.152.117.44
Filter chain halted as :get_host_details rendered or redirected
Completed 404 Not Found in 3ms (ActiveRecord: 0.8ms)

Access log of Prod Foreman when running curl -I
http://foreman.myproddomain.com/unattended/gPXE

    • [24/Oct/2013:15:44:38 +0100] "HEAD /unattended/gPXE HTTP/1.1" 404 - "-"
      "curl/7.19.7 (x86_
      64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.6.0 zlib/1.2.3 libidn/1.18
      libssh2/1.4.2"
··· On Thursday, October 24, 2013 3:22:54 PM UTC+1, ohad wrote: > > > > > On Thu, Oct 24, 2013 at 5:20 PM, Oleg Mcnoleg <stockf...@gmail.com > > wrote: > >> The host is in build mode >> >> Cancelled it and put it into build mode again for good measure! Still no >> dice. >> > > Logs? > >> >> This is a fresh install of 1.3.0 (today) using the foreman installer. BTW >> I still think this is something I have forgotten! Not anything to do with >> the build. >> >> >> >> On Thursday, October 24, 2013 2:58:39 PM UTC+1, ohad wrote: >>> >>> >>> >>> >>> On Thu, Oct 24, 2013 at 4:57 PM, Oleg Mcnoleg wrote: >>> >>>> So I built a new Foreman PROD instance in the same way but now I get s >>>> a 404 with trying to hit http://foreman.myproddomain.** >>>> com/unattemded/gPXE >>>> >>>> What could I have forgotten? This is driving me mental! Arghh >>>> >>> the host is not in build mode? >>> >>> Ohad >>> >>>> >>>> I get a 200 response against my test setup with curl -I >>>> http://foreman.mytestdomain.**com/unattendedbut when I run the same think against my prod machine I get a 404. >>>> >>>> What could cause this???? >>>> >>>> >>>> >>>> On Tuesday, October 15, 2013 3:48:45 PM UTC+1, Oleg Mcnoleg wrote: >>>>> >>>>> I have this working now, thanks for your help. >>>>> >>>>> However I see some odd behaviour in my test setup. When I boot the >>>>> foreman ISO the builds sometimes hang when loading either vmlinuz or >>>>> initrd.img. >>>>> >>>>> I'm looking into it, but if I restart the install both files load and >>>>> I'm the install continues. >>>>> >>>>> I'm not sure if this is due to an overloaded web servers that hosts >>>>> our install media. >>>>> >>>>> >>>>> On Tuesday, October 1, 2013 10:37:28 AM UTC+1, Oleg Mcnoleg wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I need to provision a Centos 6.4 VM over http. I have Foreman 1.2.2 >>>>>> and am using a VMware guest for the purpose of testing. I am using an >>>>>> existing Windows dhcp server to assign an IP. In dhcp I have the boot >>>>>> server as my smart proxy and boot file is gpxelinux.0. I have also tried >>>>>> setting the DHCP class to gPXE. >>>>>> >>>>>> Note: When I set the boot file to pxelinux.0 and dhcp class to none >>>>>> the install starts. I presume this is because standard tftp is being used?? >>>>>> My test setup is not locked down. But I want to get this working in test >>>>>> first. >>>>>> >>>>>> I am using the stock templates and have Kickstart default PXELinux, >>>>>> Kickstart default gPXE and Kickstart Default assigned to my host. I am >>>>>> using an existing webserver for my install media. >>>>>> >>>>>> At the moment, when I power on the VM using dhcp boot file as >>>>>> gpxelinux.0 and dhcp class as gPXE I get taken to a grub> menu >>>>>> >>>>>> Given the above, am I doing this correctly and why am I getting to >>>>>> the grub menu and not the installer? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> >>>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Foreman users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to foreman-user...@**googlegroups.com. >>>> To post to this group, send email to forema...@googlegroups.com**. >>>> >>>> Visit this group at http://groups.google.com/**group/foreman-users >>>> . >>>> For more options, visit https://groups.google.com/**groups/opt_out >>>> . >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> > >

^^^^^

··· On Thu, Oct 24, 2013 at 5:51 PM, Oleg Mcnoleg wrote:

unattended: unable to find a host that matches the request from
82.152.117.44

thanks, you put me on the right track here. Clearly I was getting the 404
as the host I was testing from on the prod newwork was not 'expected' by
Foreman. Where as the host on the test network was. So my method of testing
was flawed…

I've made some progress now so thanks.

··· On Thursday, October 24, 2013 3:58:15 PM UTC+1, ohad wrote: > > > On Thu, Oct 24, 2013 at 5:51 PM, Oleg Mcnoleg <stockf...@gmail.com > > wrote: > >> unattended: unable to find a host that matches the request from >> 82.152.117.44 >> > > ^^^^^ >