Project

General

Profile

3 state boot » History » Version 3

Šimon Lukašík, 04/04/2014 09:36 AM
small typo

1 1 Greg Sutcliffe
h1. 3 State Boot Support
2
3
{{toc}}
4
5
Foreman 1.1 now supports a 3 state boot model. This document describes the behaviour of the system, and how to make use of it.
6
7
h2. The old way
8
9
Until now Foreman has only ever cared about 2 states. A machine is either:
10
11
* Known to Foreman _and_ in Build mode
12 2 Šimon Lukašík
  - A MAC-specific PXE file is written to launch the installer
13 1 Greg Sutcliffe
* Known to Foreman _and not_ in Build mode, _or_ unknown to Foreman
14
  - The global default PXE file instructs the machine to localboot
15
16
This makes it impossible to handle unknown machines separately from known, built machines.
17
18
h2. The new way
19
20
We now separate the last two states:
21
22
* Known to Foreman _and_ in Build mode
23 3 Šimon Lukašík
  - A MAC-specific PXE file is written to launch the installer
24 1 Greg Sutcliffe
* Known to Foreman _and not_ in Build mode
25
  - A MAC-specific PXE file is written to instruct localboot
26
* Unknown to Foreman
27
  - The global default PXE file instructs the machine to _whatever_
28
29
h2. How it works
30
31
Until now, we've relied on a single, global default template (PXE Default File) which is written to all the proxies via the button on the Provisioning Template page.
32
33
We now add a new global template (PXE Localboot Default). This does not need to be deployed to all the proxies, as it will be written when a host exits Build mode. So our state+file list becomes:
34
35
* Known to Foreman _and_ in Build mode
36
  - A MAC-specific PXE file is written (OS-specific installer template)
37
* Known to Foreman _and not_ in Build mode
38
  - A MAC-specific PXE file is written (Global PXE Localboot template)
39
* Unknown to Foreman
40
  - The global default PXE file is used (PXE Default File template)
41
42
h2. Defaults to 'off'
43
44
Actually, this feature is always on. However, by default, the two global templates contain the same PXE instructions (i.e. boot from local disk). Thus, the current behaviour of Foreman is preserved - if a machine is unknown _or_ not in build mode, it will get a template that instructs it to boot from local disk.
45
46
h2. How to use it
47
48
Suppose you want all unknown hardware to boot into a custom ramdisk image that you have added to the TFTP server. To do this simply, edit the PXE Default File template to represent your desired behaviour. For example:
49
50
    DEFAULT menu
51
PROMPT 0
52
MENU TITLE PXE Menu
53
TIMEOUT 200
54
TOTALTIMEOUT 6000
55
ONTIMEOUT isoboot
56
57
LABEL isoboot
58
   LINUX boot/memdisk
59
   INITRD boot/foreman.iso
60
   APPEND iso raw
61
62
Then click Build PXE Default to redeploy the Global template.
63
64
h2. Caveats
65
66
Currently the system will deploy the global template to _all_ TFTP proxies. That may cause unintended behaviour if you want to boot-to-ramdisk only on a single network.
67
68
One workaround would be to manually fix the default file for the appropriate subnet after deploying the template.