Project

General

Profile

Actions

action #133160

closed

QA - coordination #121720: [saga][epic] Migration to QE setup in PRG2+NUE3 while ensuring availability

QA - coordination #123800: [epic] Provide SUSE QE Tools services running in PRG2 aka. Prg CoLo

Setup a modern UEFI httpboot setup on o3 with dnsmasq size:M

Added by okurz 11 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
Start date:
2023-07-21
Due date:
% Done:

0%

Estimated time:
Tags:

Description

Motivation

Modern machines use UEFI and support httpboot. Some machines don't even support old legacy boot, in particular when there are NVMe devices. Eng-Infra is already using a new way in particular in PRG2 so we should use something like that for our own setup as well, e.g. follow https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-deployment-prep-uefi-httpboot.html

Acceptance criteria

  • AC1: physical PRG2 o3 workers can start an autoyast based installation

Suggestions

Actions #1

Updated by okurz 11 months ago

  • Priority changed from Normal to Urgent
  • Target version changed from future to Ready
  • Parent task set to #123800

It seems we need this urgently as the new machines in PRG2 with the NVMe devices don't support legacy PXE boot. Please follow https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-deployment-prep-uefi-httpboot.html and/or ask mcaj for help.

Actions #2

Updated by okurz 11 months ago

  • Subject changed from Setup a modern UEFI httpboot setup on o3 with dnsmasq to Setup a modern UEFI httpboot setup on o3 with dnsmasq size:M
  • Description updated (diff)
  • Status changed from New to Workable
Actions #3

Updated by dheidler 11 months ago

  • Assignee set to dheidler
Actions #4

Updated by dheidler 11 months ago

  • Status changed from Workable to In Progress

https://github.com/ipxe/ipxe/discussions/569 shows an example how to configure httpboot in dnsmasq dhcp server.

Actions #5

Updated by dheidler 11 months ago

The ipxe/ipxe.pxe file contains an embedded script that I was able to extract by doing a virsh dump --memory-only myvm /tmp/f.img on a vm that loaded that file and running strings on the memory dump.

#!ipxe
dhcp
# Global variables used by all other iPXE scripts
chain --autofree tftp://192.168.112.100/ipxe/boot.ipxe.cfg ||
## Boot <boot-url>/<boot-dir>/hostname-<hostname>.ipxe
## if hostname DHCP variable is set and script is present
#isset ${hostname} && chain --replace --autofree ${boot-dir}hostname-${hostname}.ipxe ||
## Boot <boot-url>/<boot-dir>/uuid-<UUID>.ipxe
## if SMBIOS UUID variable is set and script is present
#isset ${uuid} && chain --replace --autofree ${boot-dir}uuid-${uuid}.ipxe ||
## Boot <boot-url>/<boot-dir>/mac-010203040506.ipxe if script is present
#chain --replace --autofree ${boot-dir}mac-${mac:hexraw}.ipxe ||
## Boot <boot-url>/<boot-dir>/pci-8086100e.ipxe if one type of
## PCI Intel adapter is present and script is present
#chain --replace --autofree ${boot-dir}pci-${pci/${busloc}.0.2}${pci/${busloc}.2.2}.ipxe ||
## Boot <boot-url>/<boot-dir>/chip-82541pi.ipxe if one type of
## PCI Intel adapter is present and script is present
#chain --replace --autofree ${boot-dir}chip-${chip}.ipxe ||
# Boot <boot-url>/menu.ipxe script if all other options have been exhausted
#chain --replace --autofree ${menu-url} ||
chain --replace --autofree tftp://192.168.112.100/ipxe/menu.ipxe ||
Actions #6

Updated by dheidler 11 months ago

  • Description updated (diff)
Actions #7

Updated by dheidler 11 months ago

Improved embedded script that uses next-server and no hardcoded IP address:

#!ipxe
dhcp

# Global variables used by all other iPXE scripts
chain --autofree tftp://${next-server}/ipxe/boot.ipxe.cfg ||

# Boot <boot-url>/menu.ipxe script if all other options have been exhausted
chain --replace --autofree tftp://${next-server}/ipxe/menu.ipxe ||
Actions #8

Updated by openqa_review 11 months ago

  • Due date set to 2023-08-15

Setting due date based on mean cycle time of SUSE QE Tools

Actions #9

Updated by dheidler 11 months ago

How to build pxe and efi iPXE bootloader:

git clone https://github.com/ipxe/ipxe.git
cd ipxe/src

cat > mybootscript.ipxe <<'EOF'
#!ipxe
echo Welcome to o3 iPXE

dhcp

# Global variables used by all other iPXE scripts
chain --autofree tftp://${next-server}/ipxe/boot.ipxe.cfg ||

# Boot <boot-url>/menu.ipxe script if all other options have been exhausted
chain --replace --autofree tftp://${next-server}/ipxe/menu.ipxe ||
EOF

make -j20 EMBED=mybootscript.ipxe bin-x86_64-efi/ipxe.efi
make -j20 EMBED=mybootscript.ipxe bin/ipxe.pxe
cp bin-x86_64-efi/ipxe.efi bin/ipxe.pxe /srv/tftpboot/ipxe/
Actions #10

Updated by dheidler 11 months ago

  • Status changed from In Progress to Feedback

Updated dnsmasq and nginx config on o3.
Updated tftpboot root on o3.
Pushed files to scripts repo: https://github.com/os-autoinst/scripts/pull/251
Tested that UEFI-tftp, UEFI-http and BIOS-tftp work in o3 network, using VMs on a worker host.

Actions #11

Updated by dheidler 11 months ago

  • Status changed from Feedback to Resolved

PR merged and tests done with BIOS-tftpboot, UEFI-httpboot and UEFI-tftpboot via vm and the UEFI tests also via hw (openqaworker28) on o3.
Installing openqaworker28 worked fine.

Actions #12

Updated by okurz 11 months ago

  • Due date deleted (2023-08-15)

This is great! Thanks a lot.

Actions

Also available in: Atom PDF