浏览代码

Add Elementary, Kali, Tails Live menus

Antony Messerli 5 年之前
父节点
当前提交
f33c22ac1e

+ 36 - 0
roles/netbootxyz/templates/menu/live-elementary.ipxe.j2

@@ -0,0 +1,36 @@
+#!ipxe
+
+goto ${menu} ||
+
+:live_menu
+set os elementary OS
+menu ${os} - Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap ${os} Versions
+item elementaryos-5-default-squash ${space} ${os} 5.0 (Juno)
+choose live_version || goto live_exit
+goto ${live_version}
+
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "elementary-os" and 'squash' in key %}
+{% set kernel_name = value.kernel %}
+:{{ key }}
+set squash_url ${live_endpoint}{{ value.path }}filesystem.squashfs
+{% for key, value in endpoints.items() | sort %}
+{% if key == kernel_name %}
+set kernel_url ${live_endpoint}{{ value.path }}
+{% endif %}
+{% endfor %}
+goto boot
+{% endif %}
+{% endfor %}
+
+:boot
+imgfree
+kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=http fetch=${squash_url} initrd=initrd
+initrd ${kernel_url}initrd
+boot
+
+:live_exit
+clear menu
+exit 0

+ 52 - 0
roles/netbootxyz/templates/menu/live-kali.ipxe.j2

@@ -0,0 +1,52 @@
+#!ipxe
+
+goto ${menu} ||
+
+:live_menu
+set os Kali Linux
+menu ${os} - Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap ${os} Versions
+item rolling ${space} ${os} Rolling
+choose live_version || goto live_exit
+menu ${os} ${live_version}
+item --gap ${os} Flavors
+goto ${live_version}
+
+:rolling
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "kali" and 'squash' in key and value.version == "rolling" %}
+item {{ key }} ${space} {{ value.os | title }} {{ value.version | title }} {{ value.flavor | upper }}
+{% endif %}
+{% endfor %}
+goto flavor_select
+
+:flavor_select
+choose flavor || goto live_menu
+echo ${cls}
+goto ${flavor} ||
+
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "kali" and 'squash' in key %}
+{% set kernel_name = value.kernel %}
+:{{ key }}
+set squash_url ${live_endpoint}{{ value.path }}filesystem.squashfs
+{% for key, value in endpoints.items() | sort %}
+{% if key == kernel_name %}
+set kernel_url ${live_endpoint}{{ value.path }}
+{% endif %}
+{% endfor %}
+goto boot
+{% endif %}
+{% endfor %}
+
+:boot
+imgfree
+kernel ${kernel_url}vmlinuz boot=live components username=root hostname=kali fetch=${squash_url} initrd=initrd
+initrd ${kernel_url}initrd
+boot
+
+:live_exit
+clear menu
+exit 0
+

+ 36 - 0
roles/netbootxyz/templates/menu/live-tails.ipxe.j2

@@ -0,0 +1,36 @@
+#!ipxe
+
+goto ${menu} ||
+
+:live_menu
+set os Tails
+menu ${os} - Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap ${os} Versions
+item tails-4.0-default-squash ${space} ${os} 4.0
+choose live_version || goto live_exit
+goto ${live_version}
+
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "tails" and 'squash' in key %}
+{% set kernel_name = value.kernel %}
+:{{ key }}
+set squash_url ${live_endpoint}{{ value.path }}filesystem.squashfs
+{% for key, value in endpoints.items() | sort %}
+{% if key == kernel_name %}
+set kernel_url ${live_endpoint}{{ value.path }}
+{% endif %}
+{% endfor %}
+goto boot
+{% endif %}
+{% endfor %}
+
+:boot
+imgfree
+kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd nopersistence noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash noautologin module=Tails slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 mds=full,nosmt
+initrd ${kernel_url}initrd
+boot
+
+:live_exit
+clear menu
+exit 0

+ 6 - 3
roles/netbootxyz/templates/menu/live.ipxe.j2

@@ -6,9 +6,12 @@ goto ${menu} ||
 menu Live Boot Distributions - Current Arch [ ${arch} ]
 iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
 item --gap Live Boot Distributions
-item live-debian ${space} Debian Live
-item live-fedora ${space} Fedora Live
-item live-ubuntu ${space} Ubuntu Live
+item live-debian ${space} Debian
+item live-elementary ${space} elementary OS
+item live-fedora ${space} Fedora
+item live-kali ${space} Kali
+item live-tails ${space} Tails
+item live-ubuntu ${space} Ubuntu
 choose menu || goto live_exit
 echo ${cls}
 goto ${menu} ||