瀏覽代碼

Add Live OS menus for Debian, Ubuntu, Manjaro

Antony Messerli 5 年之前
父節點
當前提交
a7927586dc

+ 42 - 0
roles/netbootxyz/templates/menu/live-debian.ipxe.j2

@@ -0,0 +1,42 @@
+#!ipxe
+
+goto ${menu} ||
+
+:live_menu
+menu Live Debian Default - Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap Live Debian
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "debian" and 'squash' in key %}
+item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}}
+{% endif %}
+{% endfor %}
+choose menu || goto live_exit
+echo ${cls}
+goto ${menu} ||
+iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
+
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "debian" and 'squash' in key %}
+{% set kernel_name = value.kernel %}
+:{{ key }}
+imgfree
+set fetch_url ${live_endpoint}{{ value.path }}filesystem.squashfs
+{% for key, value in endpoints.items() | sort %}
+{% if key == kernel_name %}
+kernel ${live_endpoint}{{ value.path }}vmlinuz boot=live fetch=${fetch_url} initrd=initrd
+initrd ${live_endpoint}{{ value.path }}initrd
+boot
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endfor %}
+
+:change_menu
+chain ${menu}.ipxe || goto error
+goto live_menu
+
+:live_exit
+clear menu
+exit 0
+

+ 42 - 0
roles/netbootxyz/templates/menu/live-manjaro.ipxe.j2

@@ -0,0 +1,42 @@
+#!ipxe
+
+goto ${menu} ||
+
+:live_menu
+menu Manjaro Live - Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap Manjaro Live
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "manjaro" and 'squash' in key %}
+item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}}
+{% endif %}
+{% endfor %}
+choose menu || goto live_exit
+echo ${cls}
+goto ${menu} ||
+iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
+
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "manjaro" and 'squash' in key %}
+{% set kernel_name = value.kernel %}
+:{{ key }}
+imgfree
+set fetch_url ${live_endpoint}{{ value.path }}
+{% for key, value in endpoints.items() | sort %}
+{% if key == kernel_name %}
+kernel ${live_endpoint}{{ value.path }}vmlinuz misobasedir=manjaro ip=dhcp miso_http_srv=${fetch_url} initrd=initrd
+initrd ${live_endpoint}{{ value.path }}initrd
+boot
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endfor %}
+
+:change_menu
+chain ${menu}.ipxe || goto error
+goto live_menu
+
+:live_exit
+clear menu
+exit 0
+

+ 1 - 1
roles/netbootxyz/templates/menu/liveubuntu-default.ipxe.j2 → roles/netbootxyz/templates/menu/live-ubuntu.ipxe.j2

@@ -20,13 +20,13 @@ iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
 {% if value.os == "ubuntu" and 'squash' in key %}
 {% set kernel_name = value.kernel %}
 :{{ key }}
+imgfree
 set fetch_url ${live_endpoint}{{ value.path }}filesystem.squashfs
 {% for key, value in endpoints.items() | sort %}
 {% if key == kernel_name %}
 kernel ${live_endpoint}{{ value.path }}vmlinuz boot=casper netboot=http fetch=${fetch_url} initrd=initrd
 initrd ${live_endpoint}{{ value.path }}initrd
 boot
-
 {% endif %}
 {% endfor %}
 {% endif %}

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

@@ -6,6 +6,8 @@ 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-manjaro ${space} Manjaro Live
 item live-ubuntu ${space} Ubuntu Live
 choose menu || goto live_exit
 echo ${cls}