Provisioning - DBAN and Memtest

I'm trying out Foreman's provisioning system and comparing it to Cobbler,
one of the things I've been looking at is providing a Memtest and DBAN
image via PXE boot. However I can't find any documentation about doing this.

I wish to go through an initial stage of memtesting the machine and doing
some sort of burn in before the machine goes live, then during
decomissioning I want to use DBAN to zero the drives since this hardware
can potentially go to other people outside of the organisation.

Is there any way within Foreman to do this currently as it seems the only
way is to provide a url to a repository?

Definitely possible. Are you looking for a global entry you can manually
select on a PXE menu, or a more automated way of DBANing a specific host
without needing a console?

··· On 30 October 2013 16:48, Paul Oyston wrote:

Is there any way within Foreman to do this currently as it seems the only
way is to provide a url to a repository?

I'm wanting to DBAN or Memtest a specific host. Generally during a
decommissioning process we're wanting to just select in Foreman that a DBAN
image is to be deployed to a particular machine and to restart that
machine. Same with Memtest that the image will be selected on that host and
on reboot it will automatically memtest.

Then we can just get a tech to go and verify it has no errors manually, I'm
ideally wanting it to report memtest data back but I really don't think
this is possible at all in Memtest or DBAN (at least not the free version).

··· On Wednesday, 30 October 2013 19:21:11 UTC, Greg Sutcliffe wrote: > > On 30 October 2013 16:48, Paul Oyston <pa...@synforge.com >wrote: > >> Is there any way within Foreman to do this currently as it seems the only >> way is to provide a url to a repository? >> > > Definitely possible. Are you looking for a global entry you can manually > select on a PXE menu, or a more automated way of DBANing a specific host > without needing a console? > >

So the way I would tackle this is to write a PXEinux template in Foreman
(More > Provisioning Templates > New, select PXELinux from the Kind) and
set it up to boot DBAN/Memdisk. Then, create either an Environment or
Hostgroup called DBAN, and associate the template with it. When you then
put a Host into that Env/HG, it;s choice of template should switch from the
OS default to the more specific Env/HG association. You can test this by
use the spoof-view on the Host>Templates tab.

Once you've verified the PXE template looks correct, simply click the Build
button and reboot the host. It should then reboot, pick up the new PXE
template, and run DBAN/Memdisk.

Let us know how you get on :slight_smile:
Greg

··· On 31 October 2013 15:47, Paul Oyston wrote:

I’m wanting to DBAN or Memtest a specific host. Generally during a
decommissioning process we’re wanting to just select in Foreman that a DBAN
image is to be deployed to a particular machine and to restart that
machine. Same with Memtest that the image will be selected on that host and
on reboot it will automatically memtest.

I can confirm that this works perfectly, thanks for the info!

··· On Friday, 1 November 2013 02:57:29 UTC, Greg Sutcliffe wrote: > > On 31 October 2013 15:47, Paul Oyston <pa...@synforge.com >wrote: > >> I'm wanting to DBAN or Memtest a specific host. Generally during a >> decommissioning process we're wanting to just select in Foreman that a DBAN >> image is to be deployed to a particular machine and to restart that >> machine. Same with Memtest that the image will be selected on that host and >> on reboot it will automatically memtest. >> > > So the way I would tackle this is to write a PXEinux template in Foreman > (More > Provisioning Templates > New, select PXELinux from the Kind) and > set it up to boot DBAN/Memdisk. Then, create either an Environment or > Hostgroup called DBAN, and associate the template with it. When you then > put a Host into that Env/HG, it;s choice of template should switch from the > OS default to the more specific Env/HG association. You can test this by > use the spoof-view on the Host>Templates tab. > > Once you've verified the PXE template looks correct, simply click the > Build button and reboot the host. It should then reboot, pick up the new > PXE template, and run DBAN/Memdisk. > > Let us know how you get on :) > Greg >

Hello and sorry for revive a very old thread but, I using Foreman 1.12 and
I was wondering if there is a way to accomplish the same but without
actually rebuild the host. I want to memtest some servers that are still in
production (at least if I don't find any memory error :P) and I don't want
to lose the foreman data.

Doing what you suggested correctly updates the template I can see from
foreman GUI but doesn't update the PXE config (I guess because I didn't
press the Build button)

Thanks!

··· El viernes, 1 de noviembre de 2013, 3:57:29 (UTC+1), Greg Sutcliffe escribió: > > > Once you've verified the PXE template looks correct, simply click the > Build button and reboot the host. It should then reboot, pick up the new > PXE template, and run DBAN/Memdisk. > >

Hi

> >
> >
> > Once you've verified the PXE template looks correct, simply click the
> > Build button and reboot the host. It should then reboot, pick up the new
> > PXE template, and run DBAN/Memdisk.
> >
> >
> Hello and sorry for revive a very old thread but, I using Foreman 1.12 and
> I was wondering if there is a way to accomplish the same but without
> actually rebuild the host. I want to memtest some servers that are still in
> production (at least if I don't find any memory error :P) and I don't want
> to lose the foreman data.
>
> Doing what you suggested correctly updates the template I can see from
> foreman GUI but doesn't update the PXE config (I guess because I didn't
> press the Build button)
[…]

We use the "PXELinux default local boot" template to provide several live
systems and memtests. In addition there's a separate PXE template for each
operating system which takes care of booting the installer. This way we don't
have to fiddle around with the build mode just to start a memtest.

The "PXELinux default local boot" has several entries like this:

  1. Boot from local disk (default)
  2. grml live boot
  3. sysrescuecd live boot
  4. memtest

In addition the PXE template for an OS looks like this:

  1. Boot from local disk (default)
  2. Install OS XY

By default the servers will boot from disk and in case you want to start a
memtest you'll have to select it. For installations we trigger the build mode
and manually select "Install" to prevent any incidents in case someone triggers
the build mode for the wrong host.

Hope this gives you some general ideas.

Cheers

Michael

··· On Fri, 30 Sep 2016 06:45:23 -0700 (PDT) davide@billymob.com wrote: > El viernes, 1 de noviembre de 2013, 3:57:29 (UTC+1), Greg Sutcliffe > escribió:

You're absolutely right, great tip! Thanks!

··· On Saturday, October 1, 2016 at 11:33:54 AM UTC+2, Michael Hofer wrote: > > > > We use the "PXELinux default local boot" template to provide several live > systems and memtests. In addition there's a separate PXE template for each > operating system which takes care of booting the installer. This way we > don't > have to fiddle around with the build mode just to start a memtest. > >