Skip to content

Instantly share code, notes, and snippets.

@displague
Last active May 26, 2021 16:02
Show Gist options
  • Save displague/5282172449a83c7b83821f8f8333a072 to your computer and use it in GitHub Desktop.
Save displague/5282172449a83c7b83821f8f8333a072 to your computer and use it in GitHub Desktop.
#!ipxe
dhcp net0
set release 4.7
set zstream 0
set arch x86_64
set ignition-url https://metadata.platformequinix.com/userdata
#set coreos-url https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/${release}/${release}.${zstream}
set coreos-url https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.7/4.7.0/
#set coreos-img ${coreos-url}/rhcos-${release}.${zstream}-${arch}-metal.${arch}.raw.gz
set coreos-img https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.7/4.7.0/rhcos-4.7.0-x86_64-metal.x86_64.raw.gz
set console console=ttyS1,115200n8
# kernel ${coreos-url}/rhcos-${release}.${zstream}-${arch}-installer-kernel-${arch} ${console} ip=dhcp nameserver=1.1.1.1 nomodeset rd.peerdns=0 rd.neednet=1 initrd=rhcos-${release}.${zstream}-${arch}-installer-initramfs.${arch}.img coreos.inst=yes coreos.first_boot=1 coreos.inst.install_dev=sda coreos.inst.image_url=${coreos-img} coreos.inst.ignition_url=${ignition-url} rd.net.timeout.carrier=30 coreos.inst.platform_id=packet coreos.inst.persistent-kargs="console=ttyS1,115200n8"
# kernel https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/pre-release/latest-4.6/rhcos-live-kernel-x86_64 console=ttyS1,115200n8 ip=dhcp nameserver=1.1.1.1 nomodeset rd.peerdns=0 rd.neednet=1 initrd=rhcos-live-initramfs.x86_64.img coreos.inst=yes coreos.first_boot=1 coreos.inst.install_dev=sda coreos.inst.image_url=https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/pre-release/latest-4.6/rhcos-live-rootfs.x86_64.img coreos.inst.ignition_url=https://metadata.packet.net/userdata rd.net.timeout.carrier=30 coreos.inst.platform_id=packet coreos.inst.persistent-kargs="console=ttyS1,115200n8"
kernel https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.7/4.7.0/rhcos-live-kernel-x86_64 console=ttyS1,115200n8 initrd=rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.7/4.7.0/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda rd.net.timeout.carrier=30 coreos.inst.platform_id=packet
#initrd ${coreos-url}/rhcos-${release}.${zstream}-${arch}-installer-initramfs.${arch}.img
initrd https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.7/4.7.0/rhcos-live-initramfs.x86_64.img
boot
@bgilbert
Copy link

The timing of entropy init vs. the fetch failure is suspicious. Try using http for the rootfs URL instead?

@bgilbert
Copy link

It looks as though sdb is your hard disk and sda is a CD-ROM drive. The root account is locked error is expected on RHCOS unfortunately.

It'd still be useful to try http on the older instance type, if you wouldn't mind. You may have uncovered a bug.

@displague
Copy link
Author

displague commented Nov 12, 2020

thanks, @bgilbert.

I tried again on the t1.small.x86 device plan with an http rootfs URL in the iPXE configuration. I was able to successfully authenticate using ssh core@... after installation completed and the node rebooted into a blank SOS (serial console) screen. 🎉

(SSH keys were configured in the example.ign file included above, which was generated with these examples https://docs.fedoraproject.org/en-US/fedora-coreos/authentication/#_using_an_ssh_key and an FCCT to IGN conversion https://coreos.github.io/fcct/getting-started/#getting-fcct.

The Equinix Metal API accepts ignition files in userdata, which is how I've been supplying this:

packet device create --userdata-file example.ign --hostname mj-rhcos-heal-the-world --plan t1.small.x86 -p $PROJECT_ID  -t "rhcos,ipxe,testing,openshift-ipi" -i https://gist.githubusercontent.com/displague/5282172449a83c7b83821f8f8333a072/raw/f7300a5ab652e923dddacb5c9f206864c4c2aceb/rhcos.ipxe    --operating-system custom_ipxe --facility any -T "$(TZ=UTC date -v+1H +"%Y-%m-%dT%H:%M:%SZ")"

The /dev/sda vs /dev/sdb problems on t3.small.x86 is something I'll have to check on later. I'm really surprised to find that configuration.

@displague
Copy link
Author

Noting that I have a similar gist open for CentOS Stream https://gist.github.com/displague/cd5938eb7584dd1c1cc76c28a3f9c762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment