Ver código fonte

Add Flatcar Linux as a boot option (#336)

* Add Flatcar Linux as a boot option
Andrew Lewis 5 anos atrás
pai
commit
4c247abd2e
3 arquivos alterados com 49 adições e 2 exclusões
  1. 1 1
      README.md
  2. 46 0
      src/flatcar.ipxe
  3. 2 1
      src/linux.ipxe

+ 1 - 1
README.md

@@ -43,6 +43,7 @@ Full documentation is at netboot.xyz:
 * [Debian](https://debian.org)
 * [Devuan](https://devuan.org)
 * [Fedora](https://fedoraproject.org)
+* [Flatcar Linux](https://www.flatcar-linux.org)
 * [FreeBSD](https://freebsd.org)
 * [FreeDOS](http://www.freedos.org)
 * [Gentoo](https://gentoo.org)
@@ -87,4 +88,3 @@ Under the **Utilities** menu on netboot.xyz, there's an option for ["Test netboo
 #### Feedback
 
 Feel free to open up an [issue](https://github.com/antonym/netboot.xyz/issues) on Github, swing by [Freenode IRC](http://freenode.net/) in the [#netbootxyz](http://webchat.freenode.net/?channels=#netbootxyz) channel, or ping us on [Gitter](https://gitter.im/antonym/netboot.xyz?utm_source=share-link&utm_medium=link&utm_campaign=share-link).  Follow us on [Twitter](https://twitter.com/netbootxyz) or like us on [Facebook](https://www.facebook.com/netboot.xyz)!
-

+ 46 - 0
src/flatcar.ipxe

@@ -0,0 +1,46 @@
+#!ipxe
+
+# Container Linux by flatcar
+# https://www.flatcar.com
+# For further info on:
+# iPXE and flatcar Container Linux: https://docs.flatcar-linux.org/os/booting-with-ipxe/
+# Setting up Ignition: https://docs.flatcar-linux.org/os/provisioning/
+# 64-bit only
+
+goto ${menu}
+
+:flatcar
+set os Flatcar Linux
+menu ${os}
+item --gap ${os}:
+item stable ${space} ${os} Stable Channel
+item beta ${space} ${os} Beta Channel
+item alpha ${space} ${os} Alpha Channel
+item edge ${space} ${os} Edge Channel
+item ignition_config ${space} Set flatcar.config.url: ${flatcar.config.url}
+choose --default ${menu} menu || goto flatcar_exit
+echo ${cls}
+goto ${menu} ||
+goto flatcar_exit
+
+:stable
+:beta
+:alpha
+:edge
+set release ${menu}
+set base-url http://${release}.release.flatcar-linux.net/amd64-usr/current
+kernel ${base-url}/flatcar_production_pxe.vmlinuz ${flatcar_firstboot} ${flatcar_params} ${console} flatcar.autologin=tty1 flatcar.autologin=ttyS0 initrd=flatcar_production_pxe_image.cpio.gz
+initrd ${base-url}/flatcar_production_pxe_image.cpio.gz
+boot
+goto flatcar_exit
+
+:ignition_config
+echo -n Please set Ignition URL: && read flatcar.config.url
+set flatcar_params flatcar.config.url=${flatcar.config.url}
+set flatcar_firstboot flatcar.first_boot=1
+clear menu
+goto flatcar
+
+:flatcar_exit
+clear menu
+exit 0

+ 2 - 1
src/linux.ipxe

@@ -7,7 +7,7 @@ menu Linux Installers - Current Arch [ ${arch} ]
 iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
 item --gap Popular Linux Operating Systems:
 item archlinux ${space} Arch Linux
-item centos ${space} CentOS 
+item centos ${space} CentOS
 item debian ${space} Debian
 item fedora ${space} Fedora
 item mageia ${space} Mageia
@@ -18,6 +18,7 @@ item --gap All Others:
 item alpinelinux ${space} Alpine Linux
 item coreos ${space} CoreOS
 item devuan ${space} Devuan
+item flatcar ${space} Flatcar
 item gentoo ${space} Gentoo Linux
 item ipfire ${space} IPFire
 item nixos ${space} NixOS