From c298e2e30d61d70a7c7915666019b94daacd55f8 Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 07:04:03 -0700 Subject: [PATCH 1/8] Add device create and initial console output. --- equinix-metal-ipxe-boot/README.md | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/equinix-metal-ipxe-boot/README.md b/equinix-metal-ipxe-boot/README.md index 3e42291..65702be 100644 --- a/equinix-metal-ipxe-boot/README.md +++ b/equinix-metal-ipxe-boot/README.md @@ -4,6 +4,59 @@ when creating a machine, choose OS iPXE and put in the URL > https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ipxe.txt +``` shell +metal device create \ + --ipxe-script-url https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ipxe.txt \ + --operating-system custom_ipxe \ + --plan c2.medium.x86 \ + --metro sv \ + --hostname core \ + --output yaml \ + core +``` + +``` +Booting from PXE Device 1: NIC in Slot 2 Port 1 + +>>Start PXE over IPv4. + Station IP address is 147.75.71.61 + + Server IP address is 145.40.83.140 + NBP filename is ipxe.efi + NBP filesize is 1034240 Bytes + Downloading NBP file... + + Succeed to download NBP file. +iPXE initialising devices...ok + + + +iPXE 1.0.0+ -- Open Source Network Boot Firmware -- https://ipxe.org +Features: DNS HTTP HTTPS NFS TFTP VLAN EFI Menu +Welcome to Neverland! +Booting from net0... +net0: ec:0d:9a:bf:3d:10 using ConnectX-4Lx on 0000:01:00.0 (Ethernet) [open] + [Link:up, TX:0 TXE:1 RX:0 RXE:0] + [TXE: 1 x "Network unreachable (https://ipxe.org/28086090)"] +Configuring (net0 ec:0d:9a:bf:3d:10)... ok +net0: 147.75.71.61/255.255.255.254 gw 147.75.71.60 +net0: fe80:81::/127 gw fe80::400:deff:fead:beef (no address) +net0: fe80::ee0d:9aff:febf:3d10/64 +net1: fe80::ee0d:9aff:febf:3d11/64 (inaccessible) +Next server: 145.40.83.140 +Filename: http://tinkerbell.sv15.packet.net/auto.ipxe +http://tinkerbell.sv15.packet.net/auto.ipxe... ok +auto.ipxe : 789 bytes [script] +Tinkerbell Boots iPXE +Debug Trace ID: d1534d9d26f0cc307f1ecb2f1fafd692 +http://tinkerbell.sv15.packet.net/phone-home.......... ok +https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ipxe.txt... ok +https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/39.20240112.3.0/x86_64/fedora-coreos-39.20240112.3.0-live-kernel-x86_64.... ok +https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/39.20240112.3.0/x86_64/fedora-coreos-39.20240112.3.0-live-initramfs.x86_64.img... ok +EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path + +``` + ## TODO - [ ] automatically install the image built in this repo From 0d5cfe6de2731b8ae0d70212c9e18bef9007a1af Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 07:17:25 -0700 Subject: [PATCH 2/8] Add console=ttyS1,115200n8 to kernel args This allows us to see kernel messages on the Equinix SOS Console. Helps with debugging. Initializing PCIe, USB, and Video... Done PowerEdge R6415 BIOS Version: 1.19.0 Hard Drive Boot Requested by iDRAC F2 = System Setup F10 = Lifecycle Controller (Config iDRAC, Update FW, Install OS) F11 = Boot Manager F12 = PXE Boot iDRAC IP: 10.239.135.152 Initializing Firmware Interfaces... Enumerating Boot options... Enumerating Boot options... Done Loading Lifecycle Controller Drivers... Loading Lifecycle Controller Drivers...Done Lifecycle Controller: Collecting System Inventory... --- equinix-metal-ipxe-boot/ipxe.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinix-metal-ipxe-boot/ipxe.txt b/equinix-metal-ipxe-boot/ipxe.txt index b809e97..abc5048 100644 --- a/equinix-metal-ipxe-boot/ipxe.txt +++ b/equinix-metal-ipxe-boot/ipxe.txt @@ -7,7 +7,7 @@ set CONFIGURL https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-i set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64 -kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img coreos.inst.install_dev=${INSTALLDEV} coreos.inst.ignition_url=${CONFIGURL} +kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img coreos.inst.install_dev=${INSTALLDEV} coreos.inst.ignition_url=${CONFIGURL} console=ttyS1,115200n8 initrd --name main ${BASEURL}/fedora-coreos-${VERSION}-live-initramfs.x86_64.img boot From 4c1ffbea18eaad0d1739a054343d89c1a14d605b Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 07:48:33 -0700 Subject: [PATCH 3/8] Fix ignition config error, trailing comma Starting default.target [ 307.659590] coreos-installer-service[2157]: coreos-installer install /dev/sda --ignition-url https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ignition.ign --insecure-ignition --fetch-retries infinite [ 307.700734] coreos-installer-service[2175]: Error: parsing specified Ignition config [ 307.711051] coreos-installer-service[2175]: Caused by: [ 307.718043] coreos-installer-service[2175]: trailing comma at line 9 column 5 You are in emergency mode. After logging in, typPress Enter for maintenance --- equinix-metal-ipxe-boot/ignition.ign | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/equinix-metal-ipxe-boot/ignition.ign b/equinix-metal-ipxe-boot/ignition.ign index 882009b..4619cc5 100644 --- a/equinix-metal-ipxe-boot/ignition.ign +++ b/equinix-metal-ipxe-boot/ignition.ign @@ -4,9 +4,9 @@ "units": [ { "name": "zincati.service", - "enabled": false - }, - ], + "enabled": false + } + ] }, "passwd": { "users": [ From 0d203ff45824faac4d087e8d95781166b96656a9 Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 07:49:31 -0700 Subject: [PATCH 4/8] Use hh branch while iterating --- equinix-metal-ipxe-boot/ipxe.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinix-metal-ipxe-boot/ipxe.txt b/equinix-metal-ipxe-boot/ipxe.txt index abc5048..acceb16 100644 --- a/equinix-metal-ipxe-boot/ipxe.txt +++ b/equinix-metal-ipxe-boot/ipxe.txt @@ -3,7 +3,7 @@ set STREAM stable set VERSION 39.20240112.3.0 set INSTALLDEV /dev/sda -set CONFIGURL https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ignition.ign +set CONFIGURL https://raw.githubusercontent.com/ii/corehost/hh/equinix-metal-ipxe-boot/ignition.ign set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64 From 881a99759e1dd51c83b557197dde05f284404dc5 Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 08:15:36 -0700 Subject: [PATCH 5/8] Use hh branch while iterating on ipxe.txt Will need to revert when we merge to main --- equinix-metal-ipxe-boot/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinix-metal-ipxe-boot/README.md b/equinix-metal-ipxe-boot/README.md index 65702be..4ef7104 100644 --- a/equinix-metal-ipxe-boot/README.md +++ b/equinix-metal-ipxe-boot/README.md @@ -6,7 +6,7 @@ when creating a machine, choose OS iPXE and put in the URL ``` shell metal device create \ - --ipxe-script-url https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ipxe.txt \ + --ipxe-script-url https://raw.githubusercontent.com/ii/corehost/hh/equinix-metal-ipxe-boot/ipxe.txt \ --operating-system custom_ipxe \ --plan c2.medium.x86 \ --metro sv \ From c5ca851528ff2c81ece8f4c73e5b5ea50d3ae25e Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 08:22:05 -0700 Subject: [PATCH 6/8] Add serial console to coreos-install From https://docs.fedoraproject.org/en-US/fedora-coreos/emergency-shell/#_configuring_the_console_during_bare_metal_installation --- equinix-metal-ipxe-boot/ipxe.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinix-metal-ipxe-boot/ipxe.txt b/equinix-metal-ipxe-boot/ipxe.txt index acceb16..99feaed 100644 --- a/equinix-metal-ipxe-boot/ipxe.txt +++ b/equinix-metal-ipxe-boot/ipxe.txt @@ -7,7 +7,7 @@ set CONFIGURL https://raw.githubusercontent.com/ii/corehost/hh/equinix-metal-ipx set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64 -kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img coreos.inst.install_dev=${INSTALLDEV} coreos.inst.ignition_url=${CONFIGURL} console=ttyS1,115200n8 +kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img coreos.inst.install_dev=${INSTALLDEV} coreos.inst.ignition_url=${CONFIGURL} coreos.inst.console=ttyS1,115200n8 console=ttyS1,115200n8 initrd --name main ${BASEURL}/fedora-coreos-${VERSION}-live-initramfs.x86_64.img boot From d4d5f3cd0c2d4090042ddc573a293c479fb0fa48 Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 6 Feb 2024 14:19:32 -0700 Subject: [PATCH 7/8] Install osbuild-selinux policies I suspect these are needed --- Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 8e89a78..fe4ae55 100644 --- a/Containerfile +++ b/Containerfile @@ -4,7 +4,8 @@ RUN rpm-ostree override remove \ nfs-utils-coreos \ --install=libvirt \ --install=qemu \ - --install=bootc + --install=bootc \ + --install=osbuild-selinux RUN systemctl enable \ libvirtd.service \ rpm-ostreed-automatic.timer \ From 75156a5f984f7b6a8de5db40e53c996e283f363e Mon Sep 17 00:00:00 2001 From: Caleb Woodbine Date: Fri, 9 Feb 2024 11:29:36 +1300 Subject: [PATCH 8/8] chore: revert to main branch in urls use main --- equinix-metal-ipxe-boot/README.md | 2 +- equinix-metal-ipxe-boot/ipxe.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/equinix-metal-ipxe-boot/README.md b/equinix-metal-ipxe-boot/README.md index 4ef7104..65702be 100644 --- a/equinix-metal-ipxe-boot/README.md +++ b/equinix-metal-ipxe-boot/README.md @@ -6,7 +6,7 @@ when creating a machine, choose OS iPXE and put in the URL ``` shell metal device create \ - --ipxe-script-url https://raw.githubusercontent.com/ii/corehost/hh/equinix-metal-ipxe-boot/ipxe.txt \ + --ipxe-script-url https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ipxe.txt \ --operating-system custom_ipxe \ --plan c2.medium.x86 \ --metro sv \ diff --git a/equinix-metal-ipxe-boot/ipxe.txt b/equinix-metal-ipxe-boot/ipxe.txt index 99feaed..f80df60 100644 --- a/equinix-metal-ipxe-boot/ipxe.txt +++ b/equinix-metal-ipxe-boot/ipxe.txt @@ -3,7 +3,7 @@ set STREAM stable set VERSION 39.20240112.3.0 set INSTALLDEV /dev/sda -set CONFIGURL https://raw.githubusercontent.com/ii/corehost/hh/equinix-metal-ipxe-boot/ignition.ign +set CONFIGURL https://raw.githubusercontent.com/ii/corehost/main/equinix-metal-ipxe-boot/ignition.ign set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64