Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/netbootxyz/templates/menu/archlinux.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ iseq ${os_arch} x86_64 && set os_arch x86_64 ||
iseq ${os_arch} i386 && set os_arch i686 ||
isset ${dhcp-server} || goto static_ip
set ipparam BOOTIF=${netX/mac} ip=dhcp
# archlinux_mirror is set in boot.cfg.j2 with isset guard, safe to use here
set real_archlinux_mirror ${archlinux_mirror}
goto goto_menu

Expand Down
108 changes: 54 additions & 54 deletions roles/netbootxyz/templates/menu/boot.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

:global_vars
# set site name
set site_name {{ site_name }}
isset ${site_name} || set site_name {{ site_name }}

# set boot domain
set boot_domain {{ boot_domain }}
isset ${boot_domain} || set boot_domain {{ boot_domain }}

# set location of memdisk
set memdisk {{ memdisk_location }}
isset ${memdisk} || set memdisk {{ memdisk_location }}

# set location of custom netboot.xyz live assets, override in local-vars.ipxe
isset ${live_endpoint} || set live_endpoint {{ live_endpoint }}

# signature check enabled?
set sigs_enabled {{ sigs_enabled | default(false) | bool | lower }}
isset ${sigs_enabled} || set sigs_enabled {{ sigs_enabled | default(false) | bool | lower }}

# set location of signatures for sources
set sigs {{ sigs_location }}
isset ${sigs} || set sigs {{ sigs_location }}

# set location of latest iPXE
iseq ${platform} efi && set ipxe_disk netboot.xyz-snponly.efi || set ipxe_disk netboot.xyz-undionly.kpxe
isset ${ipxe_disk} || iseq ${platform} efi && set ipxe_disk netboot.xyz-snponly.efi || set ipxe_disk netboot.xyz-undionly.kpxe

# set default boot timeout
isset ${boot_timeout} || set boot_timeout {{ boot_timeout }}
Expand All @@ -32,60 +32,60 @@ isset ${boot_timeout} || set boot_timeout {{ boot_timeout }}
{% for key, value in releases.items() | sort(attribute='1.name') %}
{% if value.mirror is defined and value.base_dir is defined %}
### {{ value.name }}
set {{ key }}_mirror {{ value.mirror }}
set {{ key }}_base_dir {{ value.base_dir }}
isset ${{{ key }}_mirror} || set {{ key }}_mirror {{ value.mirror }}
isset ${{{ key }}_base_dir} || set {{ key }}_base_dir {{ value.base_dir }}
Comment thread
Skyrant marked this conversation as resolved.
Outdated

{% endif %}
{% endfor %}
#################################################
# 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
isset ${menu_linux} || set menu_linux 1
isset ${menu_bsd} || set menu_bsd 1
isset ${menu_unix} || set menu_unix 1
isset ${menu_freedos} || set menu_freedos 1
isset ${menu_live} || set menu_live 1
isset ${menu_pci} || set menu_pci 1
isset ${menu_windows} || set menu_windows 1
isset ${menu_utils} || set menu_utils 1
Comment thread
Skyrant marked this conversation as resolved.
Outdated
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
isset ${menu_linux_i386} || 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
isset ${menu_linux} || set menu_linux 0
isset ${menu_linux_i386} || set menu_linux_i386 1
isset ${menu_bsd} || set menu_bsd 1
isset ${menu_unix} || set menu_unix 0
isset ${menu_freedos} || set menu_freedos 1
isset ${menu_live} || set menu_live 0
isset ${menu_windows} || set menu_windows 0
isset ${menu_utils} || set menu_utils 1
Comment thread
Skyrant marked this conversation as resolved.
Outdated
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
isset ${menu_linux} || set menu_linux 0
isset ${menu_linux_arm} || set menu_linux_arm 1
isset ${menu_unix} || set menu_unix 0
isset ${menu_freedos} || set menu_freedos 0
isset ${menu_live} || set menu_live 0
isset ${menu_live_arm} || set menu_live_arm 1
isset ${menu_windows} || set menu_windows 0
isset ${menu_utils} || set menu_utils 0
isset ${menu_utils_arm} || set menu_utils_arm 1
isset ${menu_pci} || set menu_pci 0
iseq ${platform} efi && goto efi ||
goto architectures_end
:efi
set menu_bsd 1
set menu_freedos 0
set menu_unix 0
set menu_pci 0
isset ${menu_bsd} || set menu_bsd 1
isset ${menu_freedos} || set menu_freedos 0
isset ${menu_unix} || set menu_unix 0
isset ${menu_pci} || set menu_pci 0
Comment thread
Skyrant marked this conversation as resolved.
Outdated
goto architectures_end
:architectures_end
goto clouds
Expand All @@ -100,7 +100,7 @@ iseq ${ipxe_cloud_config} packet && goto metal ||
goto clouds_end

:gce
set cmdline console=ttyS0,115200n8
isset ${cmdline} || set cmdline console=ttyS0,115200n8
goto clouds_end

:metal
Expand All @@ -110,23 +110,23 @@ 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 ||
isset ${cmdline} || set cmdline console=ttyS1,115200n8
isset ${ipxe_disk} || iseq ${platform} efi && set ipxe_disk netboot.xyz-metal-snp.efi || set ipxe_disk netboot.xyz-metal.kpxe
isset ${menu_linux_i386} || set menu_linux_i386 0
Comment thread
Skyrant marked this conversation as resolved.
Outdated
isset ${menu_freedos} || set menu_freedos 0
isset ${menu_windows} || set menu_windows 0
isset ${menu_pci} || 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 1
set menu_freedos 0
set menu_live 0
set menu_windows 0
set menu_utils 0
set menu_pci 0
isset ${cmdline} || set cmdline console=ttyAMA0,115200
isset ${ipxe_disk} || set ipxe_disk netboot.xyz-metal-arm64-snp.efi
isset ${menu_bsd} || set menu_bsd 1
isset ${menu_freedos} || set menu_freedos 0
isset ${menu_live} || set menu_live 0
isset ${menu_windows} || set menu_windows 0
isset ${menu_utils} || set menu_utils 0
isset ${menu_pci} || set menu_pci 0
goto clouds_end

:clouds_end
Expand Down
4 changes: 2 additions & 2 deletions roles/netbootxyz/templates/menu/debian.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ goto mirrorcfg

:older_release
set older_release true
set debian_mirror {{ releases.debian.archive_mirror }}
isset ${debian_mirror} || set debian_mirror {{ releases.debian.archive_mirror }}
Comment thread
Skyrant marked this conversation as resolved.
Outdated
echo Setting mirror to ${debian_mirror}
clear debian_version
echo -n Please set enter code name of release: ${} && read debian_version
set dir ${debian_base_dir}/dists/${debian_version}/main/installer-${os_arch}/current/images/netboot/
goto deb_boot_type

:mirrorcfg
set debian_mirror ${debian_mirror}
# debian_mirror is set in boot.cfg.j2 with isset guard, no need to reassign
set mirrorcfg mirror/suite=${debian_version}
set dir ${debian_base_dir}/dists/${debian_version}/main/installer-${os_arch}/current/images/netboot/
goto deb_boot_type
Expand Down
2 changes: 1 addition & 1 deletion roles/netbootxyz/templates/menu/k3os.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ goto ${menu} ||
set os {{ releases.k3os.name }}
set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch amd64 ||
set k3os_mirror {{ releases.k3os.mirror }}
isset ${k3os_mirror} || set k3os_mirror {{ releases.k3os.mirror }}
isset ${k3os_version} || set k3os_version latest
isset ${k3os_install_device} || set k3os_install_device /dev/sda
menu ${os} by Rancher
Expand Down
2 changes: 1 addition & 1 deletion roles/netbootxyz/templates/menu/tinycore.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Tiny Core Linux
# http://tinycorelinux.net/downloads.html

set tinycore_mirror {{ releases.tinycore.mirror }}
isset ${tinycore_mirror} || set tinycore_mirror {{ releases.tinycore.mirror }}

:arch_menu
set os Tiny Core Linux
Expand Down
2 changes: 1 addition & 1 deletion roles/netbootxyz/templates/menu/ubuntu.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ goto mirrorcfg

:older_release
set older_release true
set ubuntu_mirror {{ releases.ubuntu.archive_mirror }}
isset ${ubuntu_mirror} || set ubuntu_mirror {{ releases.ubuntu.archive_mirror }}
Comment thread
Skyrant marked this conversation as resolved.
Outdated
echo Setting mirror to ${ubuntu_mirror}
clear ubuntu_version
echo -n Please set enter code name of release: ${} && read ubuntu_version
Expand Down
Loading