Sfoglia il codice sorgente

Add PopOS live, exits properly if ntp fails

Antony Messerli 5 anni fa
parent
commit
7ffcd8a94a

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

@@ -0,0 +1,44 @@
+#!ipxe
+
+goto ${menu} ||
+
+:live_menu
+set os Pop OS
+menu ${os} - Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap ${os} Versions
+item 18.04 ${space} ${os} 18.04
+item 19.10 ${space} ${os} 19.10
+choose live_version || goto live_exit
+goto ${live_version}
+
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "pop" and 'squash' in key %}
+{% set kernel_name = value.kernel %}
+:{{ value.version }}
+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 {{ value.version }}-boot
+{% endif %}
+{% endfor %}
+
+:18.04-boot
+imgfree
+kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=http fetch=${squash_url} initrd=initrd
+initrd ${kernel_url}initrd
+boot
+
+:19.10-boot
+imgfree
+kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} initrd=initrd
+initrd ${kernel_url}initrd
+boot
+
+:live_exit
+clear menu
+exit 0
+

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

@@ -10,6 +10,7 @@ item live-debian ${space} Debian
 item live-elementary ${space} elementary OS
 item live-fedora ${space} Fedora
 item live-kali ${space} Kali
+item live-popos ${space} Pop OS
 item live-tails ${space} Tails
 item live-ubuntu ${space} Ubuntu
 choose menu || goto live_exit

+ 1 - 1
roles/netbootxyz/templates/menu/menu.ipxe.j2

@@ -2,7 +2,7 @@
 
 :start
 chain --autofree boot.cfg ||
-ntp {{ time_server }}
+ntp {{ time_server }} ||
 iseq ${cls} serial && goto ignore_cls ||
 set cls:hex 1b:5b:4a  # ANSI clear screen sequence - "^[[J"
 set cls ${cls:string}