Hanging Bare Metal (HP DL360), PXE, and Hardware Models

When I try to provision a host, it hangs after the provisioning step, after
the reboot.

I've diagnosed it to the "PXELinux default local boot" template, which
contains the problematic line:
LOCALBOOT 0

If I change this to:
COM32 chain.c32
APPEND hd0 0

then, the boot process continues.

BTW, this is documented here:
Bug #6725: The "LOCALBOOT 0" entry causes some bare metal machines to stuck during boot - Foreman

My question is, how can I do this only for the hardware type that requires
it? If I change that value, it's used globally, and will break other
hardware.

I looked into the Hardware Models, but there isn't a way (in the GUI, at
least) to set the default boot file. Is there a way to do this with CLI or
database hacks?

Or is the answer to modify the template file to something like:

LABEL local
MENU LABEL (local)
MENU DEFAULT
<% if hardware_model == "ProLiant DL360e Gen8" -%>
COM32 chain.c32
APPEND hd0 0
<% else -%>
LOCALBOOT 0
<% end -%>

If that's the answer, what exactly would the if line look like?

Thanks!

-John

1 Like

I asked on IRC, and got some guidance:

The fact I was looking for is:

@host.facts_hash['productname']

But, you can only access it in a template if you set safemoderender to
false. (GUI/Administer/Settings/Provisioning)
I'll probably do that, unless someone has a good argument for not turning
off safe mode.

··· On Monday, September 15, 2014 10:45:16 AM UTC-7, John Hazen wrote: > > When I try to provision a host, it hangs after the provisioning step, > after the reboot. > > I've diagnosed it to the "PXELinux default local boot" template, which > contains the problematic line: > LOCALBOOT 0 > > If I change this to: > COM32 chain.c32 > APPEND hd0 0 > > then, the boot process continues. > > BTW, this is documented here: > http://projects.theforeman.org/issues/6725 > > My question is, how can I do this only for the hardware type that requires > it? If I change that value, it's used globally, and will break other > hardware. > > I looked into the Hardware Models, but there isn't a way (in the GUI, at > least) to set the default boot file. Is there a way to do this with CLI or > database hacks? > > Or is the answer to modify the template file to something like: > > LABEL local > MENU LABEL (local) > MENU DEFAULT > <% if hardware_model == "ProLiant DL360e Gen8" -%> > COM32 chain.c32 > APPEND hd0 0 > <% else -%> > LOCALBOOT 0 > <% end -%> > > If that's the answer, what exactly would the if line look like? > > Thanks! > > -John > > >