Created
January 16, 2025 12:58
-
-
Save lukemilby/293c55f827058da062107155781499de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ipxe | |
:global_vars | |
# set site name | |
set site_name netboot.xyz | |
# set boot domain | |
set boot_domain boot.netboot.xyz/2.0.84 | |
# set location of memdisk | |
set memdisk http://${boot_domain}/memdisk | |
# set location of custom netboot.xyz live assets, override in local-vars.ipxe | |
isset ${live_endpoint} || set live_endpoint https://github.com/netbootxyz | |
# signature check enabled? | |
set sigs_enabled false | |
# set location of signatures for sources | |
set sigs http://${boot_domain}/sigs/ | |
# set location of latest iPXE | |
iseq ${platform} efi && set ipxe_disk netboot.xyz-snponly.efi || set ipxe_disk netboot.xyz-undionly.kpxe | |
# set default boot timeout | |
set boot_timeout 100000 | |
################## | |
# official mirrors | |
################## | |
:mirrors | |
### AlmaLinux | |
set almalinux_mirror http://repo.almalinux.org | |
set almalinux_base_dir almalinux | |
### Alpine Linux | |
set alpinelinux_mirror http://dl-cdn.alpinelinux.org | |
set alpinelinux_base_dir alpine | |
### Arch Linux | |
set archlinux_mirror mirrors.kernel.org | |
set archlinux_base_dir archlinux | |
### CentOS | |
set centos_mirror http://mirror.centos.org | |
set centos_base_dir centos | |
### Debian | |
set debian_mirror http://deb.debian.org | |
set debian_base_dir debian | |
### Devuan | |
set devuan_mirror http://deb.devuan.org | |
set devuan_base_dir devuan | |
### Fedora | |
set fedora_mirror http://mirrors.kernel.org | |
set fedora_base_dir fedora | |
### Fedora CoreOS | |
set coreos_mirror https://builds.coreos.fedoraproject.org | |
set coreos_base_dir prod/streams | |
### FreeDOS | |
set freedos_mirror http://www.ibiblio.org | |
set freedos_base_dir pub/micro/pc-stuff/freedos/files/distributions/1.3/official | |
### IPFire | |
set ipfire_mirror https://downloads.ipfire.org | |
set ipfire_base_dir releases/ipfire-2.x | |
### Kali Linux | |
set kali_mirror http://http.kali.org | |
set kali_base_dir kali | |
### Mageia | |
set mageia_mirror http://mirrors.kernel.org | |
set mageia_base_dir mageia | |
### OpenBSD | |
set openbsd_mirror http://ftp.openbsd.org | |
set openbsd_base_dir pub/OpenBSD | |
### openEuler | |
set openEuler_mirror http://repo.openeuler.org | |
set openEuler_base_dir | |
### openSUSE | |
set opensuse_mirror http://download.opensuse.org | |
set opensuse_base_dir distribution/leap | |
### Rocky Linux | |
set rockylinux_mirror http://download.rockylinux.org | |
set rockylinux_base_dir pub/rocky | |
### Slackware | |
set slackware_mirror http://mirrors.kernel.org | |
set slackware_base_dir slackware | |
### SmartOS | |
set smartos_mirror https://netboot.smartos.org/os/ | |
set smartos_base_dir /platform/i86pc/ | |
### Ubuntu | |
set ubuntu_mirror http://archive.ubuntu.com | |
set ubuntu_base_dir ubuntu | |
################################################# | |
# determine architectures and enable menu options | |
################################################# | |
:architectures | |
set menu_linux 1 | |
set menu_bsd 1 | |
set menu_unix 1 | |
set menu_freedos 1 | |
set menu_live 1 | |
set menu_pci 1 | |
set menu_windows 1 | |
set menu_utils 1 | |
iseq ${arch} i386 && goto i386 || | |
iseq ${arch} x86_64 && goto x86_64 || | |
iseq ${arch} arm64 && goto arm64 || | |
goto architectures_end | |
:x86_64 | |
set menu_linux_i386 0 | |
iseq ${platform} efi && goto efi || | |
goto architectures_end | |
:i386 | |
set menu_linux 0 | |
set menu_linux_i386 1 | |
set menu_bsd 1 | |
set menu_unix 0 | |
set menu_freedos 1 | |
set menu_live 0 | |
set menu_windows 0 | |
set menu_utils 1 | |
iseq ${platform} efi && goto efi || | |
goto architectures_end | |
:arm64 | |
set menu_linux 0 | |
set menu_linux_arm 1 | |
set menu_unix 0 | |
set menu_freedos 0 | |
set menu_live 0 | |
set menu_live_arm 1 | |
set menu_windows 0 | |
set menu_utils 0 | |
set menu_utils_arm 1 | |
set menu_pci 0 | |
iseq ${platform} efi && goto efi || | |
goto architectures_end | |
:efi | |
set menu_bsd 0 | |
set menu_freedos 0 | |
set menu_unix 0 | |
set menu_pci 0 | |
goto architectures_end | |
:architectures_end | |
goto clouds | |
################################### | |
# set iPXE cloud provider specifics | |
################################### | |
:clouds | |
iseq ${ipxe_cloud_config} gce && goto gce || | |
iseq ${ipxe_cloud_config} metal && goto metal || | |
iseq ${ipxe_cloud_config} packet && goto metal || | |
goto clouds_end | |
:gce | |
set cmdline console=ttyS0,115200n8 | |
goto clouds_end | |
:metal | |
iseq ${arch} i386 && goto metal_x86_64 || | |
iseq ${arch} x86_64 && goto metal_x86_64 || | |
iseq ${arch} arm64 && goto metal_arm64 || | |
goto clouds_end | |
:metal_x86_64 | |
set cmdline console=ttyS1,115200n8 | |
iseq ${platform} efi && set ipxe_disk netboot.xyz-metal-snp.efi || set ipxe_disk netboot.xyz-metal.kpxe | |
set menu_linux_i386 0 | |
set menu_freedos 0 | |
set menu_windows 0 | |
iseq ${platform} efi && set menu_pci 0 || | |
goto clouds_end | |
:metal_arm64 | |
set cmdline console=ttyAMA0,115200 | |
set ipxe_disk netboot.xyz-metal-arm64-snp.efi | |
set menu_bsd 0 | |
set menu_freedos 0 | |
set menu_live 0 | |
set menu_windows 0 | |
set menu_utils 0 | |
set menu_pci 0 | |
goto clouds_end | |
:clouds_end | |
goto end | |
:end | |
exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ipxe | |
# Talos | |
# https://github.com/siderolabs/talos/releases | |
# https://www.talos.dev/v1.6/talos-guides/install/bare-metal-platforms/pxe | |
goto ${menu} || | |
:talos | |
set os Talos | |
set os_arch ${arch} | |
iseq ${os_arch} x86_64 && set os_arch amd64 || | |
iseq ${os_arch} arm64 && set os_arch arm64 || | |
isset ${talos_version} || set talos_version latest | |
isset ${talos_mirror} || set talos_mirror https://github.com/siderolabs/talos/releases | |
isset ${talos_platform} || set talos_platform metal | |
menu ${os} by Talos Systems | |
menu ${os} install | |
item --gap Default: | |
item talos_boot ${space} Begin install ${os} ${talos_version} | |
item --gap Parameters: | |
item talos_version ${space} ${os} version: ${talos_version} | |
item talos_config_url ${space} Set userdata.yaml URL: ${talos_config_url} | |
item talos_mirror ${space} Set mirror URL: ${talos_mirror} | |
item talos_platform ${space} Set platform: ${talos_platform} | |
choose --timeout ${timeout} --default ${menu} menu || talos_boot | |
echo ${cls} | |
goto ${menu} || | |
goto talos_exit | |
:talos_version | |
menu ${os} version | |
item latest ${space} latest | |
item custom ${space} Set custom version | |
choose --default ${version} version || goto talos_exit | |
echo ${cls} | |
goto talos_version_${version} || | |
goto talos_exit | |
:talos_version_latest | |
set talos_version latest | |
set talos_base_url ${talos_mirror}/latest/download | |
goto talos | |
:talos_version_custom | |
clear talos_version | |
echo -n Please set Talos version manually (in format vX.Y.Z): && read talos_version | |
set talos_base_url ${talos_mirror}/download/${talos_version} | |
clear menu | |
goto talos | |
:talos_mirror | |
echo -n Set mirror URL: && read talos_mirror | |
clear menu | |
goto talos | |
:talos_config_url | |
echo -n Set userdata.yaml URL: && read talos_config_url | |
clear menu | |
goto talos | |
# https://www.talos.dev/latest/reference/kernel/#talosplatform | |
:talos_platform | |
menu ${os} platforms | |
item metal ${space} Bare Metal | |
item aws ${space} AWS | |
item azure ${space} Azure | |
item digitalocean ${space} Digital Ocean | |
item equinixMetal ${space} Equinix Metal | |
item gcp ${space} GCP | |
item hcloud ${space} Hetzner Cloud | |
item nocloud ${space} Nocloud | |
item openstack ${space} Openstack | |
item oracle ${space} oracle | |
item scaleway ${space} Scaleway | |
item upcloud ${space} Upcloud | |
item vmware ${space} VMware | |
item vultr ${space} Vultr | |
choose --default ${talos_platform} talos_platform | |
goto talos | |
# https://www.talos.dev/latest/reference/kernel/ | |
:talos_boot | |
isset ${talos_base_url} || set talos_base_url ${talos_mirror}/latest/download | |
isset ${talos_config_url} && set talos_config talos.config=${talos_config_url} || | |
set boot_params printk.devkmsg=on slab_nomerge pti=on console=ttyS0 console=tty0 init_on_alloc=1 init_on_free=1 consoleblank=0 nvme_core.io_timeout=4294967295 ima_template=ima-ng ima_appraise=fix ima_hash=sha512 talos.platform=${talos_platform} ${talos_config} initrd=initrd.magic ${cmdline} | |
imgfree | |
kernel ${talos_base_url}/vmlinuz-${os_arch} ${boot_params} | |
initrd ${talos_base_url}/initramfs-${os_arch}.xz | |
echo | |
echo Booting with the following kernel args: | |
echo ${boot_params} | |
echo | |
echo MD5sums: | |
md5sum vmlinuz-${os_arch} initramfs-${os_arch}.xz | |
boot | |
:talos_exit | |
clear menu | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment