metal/installer
Eric MacDonald 16636d9c8c Debian: add controller-0 pxeboot grub menu setup utility
This update adds a new pxeboot_setup.sh script that can be used
to tailor the controller-0 BIOS and UEFI install grub menus for
for a specific lab's controller-0 target server installation.

Some controller-0 installation UEFI and BIOS grub menus' variable
replacement labels have been added to and others slightly modified
to better serve the new setup utility.

Features:

 - Updating both BIOS and EFI grub files
 - Preserves the command used to create tailored grub files
 - Preserves replaced grub files as .<name>
 - Supported variable replacements are

   xxxFEEDxxx - path between http server base and mounted iso
   xxxSYSTEMxxx - menu entry selection index ; default 2 (AIO)
   xxxINSTDEVxxx - install device name ; default /dev/sda
   xxxPXEBOOTxxx - /pxeboot offset path to bzImage/initrd
   xxxBASE_URLxxx - pxeboot server URL

Tool Usage:

The caller specifies an --input <path> argument to the debian
controller-0 installer grub file templates which contain the
above variable replacement labels.

The --output <path> argument is used to specify where to create
the variable replaced system specific grub files.

A --system <index> argument specififying the default menu entry
index to use.

The remaining arguments are used to specify various paths and
optionally the install device. Refer to the pxeboot_setup.sh
script header, code comment or full --help for more details.

Utility Arguments:

  --input   <path>
  --output  <path>
  --feed    <path>
  --pxeboot <path>
  --url     <url>
  --device  </dev/sdx>
  --system  <0..3>

Example Usage:

pxeboot_setup.sh --input /path/to/grub/template/dir
                 --output /path/to/target/iso/mount
                 --pxeboot pxeboot/offset/to/bzImage_initrd
                 --feed pxeboot/offset/to/target_feed
                 --url http://###.###.###.###
                 --instdev /dev/sde
                 --system 3

Test Plan: for both BIOS and UEFI servers

PASS: Verify End-To-End user experience using the script and menus
      from a mounted iso or feed to setup the grub install menus.

Script:

PASS: Verify grub menu selection by number and by string (default)
PASS: Verify system type install selection of all menu paths
PASS: Verify argument and option success path handling
PASS: Verify argument and option failure path handling
PASS: Verify shellcheck script static analysis
PASS: Verify saving of replaced menus as '.' files
PASS: Verify creation of command file in menus target dir
PASS: Verify default device and override handling
PASS: Verify exit 0 on success and exit 1 on failure.
PASS: Verify script usage help screen
PASS: Verify ttyS0 override to ttySx where x=0..3

Install:

PASS: Verify system install of all menu entries
PASS: Verify menu selection handling without numbered prefixes
PASS: Verify graphical and console submenu of each main menu
PASS: Verify graphical logging vs console logging

Story: 2009301
Task: 45547
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Change-Id: I1faf3ea305557d990ed7b03418c45804b71878b7
2022-06-17 15:02:55 +00:00
..
initrd Shorten "addons/wr-cgcs/layers/cgcs" to just "stx" 2018-07-04 11:03:59 -04:00
pxe-network-installer Debian: add controller-0 pxeboot grub menu setup utility 2022-06-17 15:02:55 +00:00