Add boot loader field to system and distro

Allow user to override which boot loader he/she wants to use to netboot
a system instead of always automatically selecting it. Also, TFTP/DHCP
files generation must know which boot loader was selected now that the
boot loader selection can be overridden.

It is needed for systems, because on certain Power8 systems running in
baremetal, petitboot is used to netboot and requires a pxelinux
configuration regardless of distribution (which might use yaboot or
grub2 normally). The platform ("PowerNV") could be used to determine
this, but currently Cobbler doesn not have a notion of platform.

It is needed for distros, because some distros, particularly
little-endian powerpc ones, need to use grub2, while historical
distributions can continue to use yaboot. However, this field should not
be modified by the end-user, so we mark it as not editable in the UI.
Ideally this would be a static field in the UI, but since it's also used
by system objects in the UI and is editable there, we cannot display it
differently in the web UI.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
pxegen: don't delete boot directory uncondtionally

Nexenta overwrites tftpboot/boot, but that needs to be maintained for
grub2 support.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Fixes: ae546b0b ("Nexenta support")
save_boot_device: wait for root to show up

This is a regression in the snippet.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Fixes: eb23de8f ("snippets: update {restore,save}_boot_device")
set_next_server: inherit is inserted now

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
cobbler: add powerpc pxelinux support

In PowerNV (non-virtualized) mode, certain Power8 systems run petitboot
which can use pxelinux for network booting. Add support throughout the
code for pxelinux config file generation for powerpc systems. There is
one distinction between pxelinux on Power and on other systems, though,
the bootloader is built into the firmware, so we do not want to send any
file via the DHCP configuration.

There is currently a bug in petitboot that misparses 'ipappend 2' and
doesn't prefix the machine type, e.g. "01-". I'm manually working around
this in tftpgen, and will undo that change once petitboot is fixed.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>