diff --git a/.travis.yml b/.travis.yml index 9b0ec44542..bd56195818 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,165 @@ sudo: true -dist: xenial -language: c -before_install: -- openssl aes-256-cbc -K $encrypted_7d306b01dc1f_key -iv $encrypted_7d306b01dc1f_iv -in script/secrets.tar.enc -out script/secrets.tar -d -- tar xvf script/secrets.tar -C script/ -- sudo apt-get update -qq -- sudo apt-get install -qq binutils-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu genisoimage liblzma-dev syslinux syslinux-common isolinux -- sudo pip install awscli tornado -script: -- "./script/prep-release.sh" -deploy: - - provider: s3 - access_key_id: $AWS_ACCESS_KEY_ID - secret_access_key: $AWS_SECRET_ACCESS_KEY - bucket: $BUCKET_BOOT - local_dir: build - skip_cleanup: true - on: - repo: antonym/netboot.xyz -after_deploy: - - aws configure set preview.cloudfront true - - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_BOOT --paths "/*" + +language: bash + +services: + - docker + +env: + global: + - DEBIAN_FRONTEND="noninteractive" + +jobs: + include: + - stage: test + if: type = pull_request + language: python + install: + - pip install ansible ansible-lint + - ansible-lint --version + script: + - ansible-playbook -i inventory site.yml --syntax-check + - ansible-lint -v roles/netbootxyz + + - stage: development + if: branch = development AND type != pull_request + script: + - ./script/build_release dev + after_failure: + - ./script/message failure + deploy: + - provider: s3 + edge: true + access_key_id: $AWS_ACCESS_KEY_ID + secret_access_key: $AWS_SECRET_ACCESS_KEY + bucket: $BUCKET_DEV + local_dir: s3out + upload-dir: $TRAVIS_COMMIT + skip_cleanup: true + on: + branch: development + after_deploy: + - ./script/message dev-push + + - stage: pull-request + if: type = pull_request + script: + - ./script/build_release pr + + - stage: release-candidate + if: branch = RC AND type != pull_request + before_install: + - ./script/pre_install + script: + - ./script/build_release rc + workspaces: + create: + name: githubassets + paths: + - githubout + after_failure: + - ./script/message failure + before_deploy: + - export RELEASE_TAG=$(cat version.txt)-RC + deploy: + - provider: s3 + edge: true + access_key_id: $AWS_ACCESS_KEY_ID + secret_access_key: $AWS_SECRET_ACCESS_KEY + bucket: $BUCKET_LIVE + local_dir: s3out-latest + upload-dir: rc + skip_cleanup: true + on: + branch: RC + - provider: s3 + edge: true + access_key_id: $AWS_ACCESS_KEY_ID + secret_access_key: $AWS_SECRET_ACCESS_KEY + bucket: $BUCKET_LIVE + local_dir: s3out + upload-dir: $RELEASE_TAG + skip_cleanup: true + on: + branch: RC + + - stage: rc-github + if: branch = RC AND type != pull_request + before_install: + - ./script/pre_install + workspaces: + use: githubassets + script: skip + before_deploy: + - export RELEASE_TAG=$(cat version.txt)-RC + - git tag ${RELEASE_TAG} + deploy: + - provider: releases + api_key: $GITHUB_TOKEN + file_glob: true + file: githubout/* + prerelease: true + skip_cleanup: true + on: + branch: RC + after_deploy: + - aws configure set preview.cloudfront true + - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_BOOT --paths "rc/*" "rc/ipxe/*" + - ./script/message rc-push + + - stage: release + if: branch = master AND type != pull_request + script: + - ./script/build_release release + workspaces: + create: + name: githubassets + paths: + - githubout + after_failure: + - ./script/message failure + before_deploy: + - export RELEASE_TAG=$(cat version.txt) + deploy: + - provider: s3 + edge: true + access_key_id: $AWS_ACCESS_KEY_ID + secret_access_key: $AWS_SECRET_ACCESS_KEY + bucket: $BUCKET_LIVE + local_dir: s3out-latest + skip_cleanup: true + on: + branch: master + - provider: s3 + edge: true + access_key_id: $AWS_ACCESS_KEY_ID + secret_access_key: $AWS_SECRET_ACCESS_KEY + bucket: $BUCKET_LIVE + local_dir: s3out + upload-dir: $RELEASE_TAG + skip_cleanup: true + on: + branch: master + + - stage: release-github + if: branch = master AND type != pull_request + before_install: + - ./script/pre_install + workspaces: + use: githubassets + script: skip + before_deploy: + - export RELEASE_TAG=$(cat version.txt) + - git tag ${RELEASE_TAG} + deploy: + - provider: releases + api_key: $GITHUB_TOKEN + file_glob: true + file: githubout/* + skip_cleanup: true + on: + branch: master + after_deploy: + - aws configure set preview.cloudfront true + - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_BOOT --paths "/*" "/ipxe/*" + - ./script/message live-push diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6d04fa47a..d26d372b3b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,5 +49,5 @@ idea, feel free to open up a Github [issue] or open up a [Pull Request]. ## Enjoy and have fun! -[issue]: https://github.com/antonym/netboot.xyz/issues/new -[Pull Request]: https://github.com/antonym/netboot.xyz/pulls +[issue]: https://github.com/netbootxyz/netboot.xyz/issues/new +[Pull Request]: https://github.com/netbootxyz/netboot.xyz/pulls diff --git a/Dockerfile-build b/Dockerfile-build new file mode 100644 index 0000000000..8ce313d5a5 --- /dev/null +++ b/Dockerfile-build @@ -0,0 +1,32 @@ +FROM ubuntu:bionic as builder + +RUN \ + echo "**** install deps ****" && \ + apt-get update && \ + apt-get install -y \ + ansible \ + apache2 \ + build-essential \ + dosfstools \ + genisoimage \ + git \ + liblzma-dev \ + python-minimal \ + python-yaml \ + syslinux + +# repo for build +COPY . /ansible + +RUN \ + echo "**** running ansible ****" && \ + cd /ansible && \ + ansible-playbook -i inventory site.yml + +# runtime stage +FROM alpine:3.10 + +COPY --from=builder /var/www/html/ /mnt/ +COPY docker-build-root/ / + +ENTRYPOINT [ "/dumper.sh" ] diff --git a/README.md b/README.md index d1c6be0a06..4cdbca4b7a 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,33 @@ -## netboot.xyz +## netboot.xyz - v2 - Under Construction -[![Build Status](https://travis-ci.org/antonym/netboot.xyz.svg?branch=master)](https://travis-ci.org/antonym/netboot.xyz) +[![Build Status](https://travis-ci.com/netbootxyz/netboot.xyz.svg?branch=master)](https://travis-ci.com/netbootxyz/netboot.xyz) [![Discord](https://img.shields.io/discord/425186187368595466)](https://discord.gg/An6PA2a) ![netboot.xyz menu](https://netboot.xyz/images/netboot.xyz.gif) ### Bootloader Downloads -These iPXE disks will automatically load into [boot.netboot.xyz](https://boot.netboot.xyz): +#### EFI Boot Loaders | Type | Bootloader | Description | |------|------------|-------------| -|ISO (Legacy)| [netboot.xyz.iso](https://boot.netboot.xyz/ipxe/netboot.xyz.iso)| Used for CD/DVD, Virtual CDs like DRAC/iLO, VMware, Virtual Box (Legacy) | -|ISO (EFI)|[netboot.xyz-efi.iso](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.iso)| Same as ISO (Legacy) but used for EFI BIOS, works in Virtual Box EFI mode | +|ISO|[netboot.xyz-efi.iso](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.iso)| Same as ISO (Legacy) but used for EFI BIOS, works in Virtual Box EFI mode | +|USB|[netboot.xyz-efi.usb](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.usb)| Used for creation of USB Keys| +|DHCP| [netboot.xyz.efi](https://boot.netboot.xyz/ipxe/netboot.xyz.efi)| DHCP EFI boot image file, uses built-in iPXE NIC drivers| +|DHCP-snp|[netboot.xyz-snp.efi]() | DHCP EFI boot image file, use if you have NIC issues... need to build| + +#### Legacy Boot Loaders + +| Type | Bootloader | Description | +|------|------------|-------------| +|ISO| [netboot.xyz.iso](https://boot.netboot.xyz/ipxe/netboot.xyz.iso)| Used for CD/DVD, Virtual CDs like DRAC/iLO, VMware, Virtual Box (Legacy) | |Floppy| [netboot.xyz.dsk](https://boot.netboot.xyz/ipxe/netboot.xyz.dsk)| Used for 1.44 MB floppies, Virtual floppies like DRAC/iLO, VMware, Virtual Box| |USB| [netboot.xyz.usb](https://boot.netboot.xyz/ipxe/netboot.xyz.usb)| Used for creation of USB Keys| |Kernel| [netboot.xyz.lkrn](https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn)| Used for booting from GRUB/EXTLINUX| |DHCP| [netboot.xyz.kpxe](https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe)| DHCP boot image file, uses built-in iPXE NIC drivers| |DHCP-undionly| [netboot.xyz-undionly.kpxe](https://boot.netboot.xyz/ipxe/netboot.xyz-undionly.kpxe)| DHCP boot image file, use if you have NIC issues| -|EFI| [netboot.xyz.efi](https://boot.netboot.xyz/ipxe/netboot.xyz.efi)| EFI boot image file| -SHA256 checksums are generated during each build of iPXE and are located [here](https://boot.netboot.xyz/ipxe/netboot.xyz-sha256-checksums.txt). You can also view the scripts that are embedded into the images [here](https://github.com/antonym/netboot.xyz/tree/master/ipxe/disks). +SHA256 checksums are generated during each build of iPXE and are located [here](https://boot.netboot.xyz/ipxe/netboot.xyz-sha256-checksums.txt). You can also view the scripts that are embedded into the images [here](https://github.com/netbootxyz/netboot.xyz/tree/master/ipxe/disks). ### What is netboot.xyz? @@ -28,9 +35,13 @@ SHA256 checksums are generated during each build of iPXE and are located [here]( If you already have iPXE up and running on the network, you can hit netboot.xyz at anytime by typing: - chain --autofree https://boot.netboot.xyz + chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn + +or when in EFI mode: + + chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.efi -You'll need to make sure to have [DOWNLOAD_PROTO_HTTPS](https://github.com/ipxe/ipxe/blob/master/src/config/general.h#L56) enabled in iPXE. +This will load the appropriate netboot.xyz kernel with all of the proper options enabled. ### Documentation @@ -40,56 +51,97 @@ See [netboot.xyz](https://netboot.xyz) for all documentation. Some links to get * [Booting Methods](https://netboot.xyz/booting/) * [FAQ](https://netboot.xyz/faq/) -If you'd like to contribute to the documentation, the netboot.xyz documenation is located at [netboot.xyz-docs](https://github.com/antonym/netboot.xyz-docs). - -### What Operating Systems are available? - -* [Alpine Linux](https://alpinelinux.org) -* [Arch Linux](https://www.archlinux.org) -* [CentOS](https://centos.org) -* [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) -* [IPFire](https://www.ipfire.org) -* [Mageia](http://www.mageia.org) -* [Microsoft Windows](https://www.microsoft.com) -* [MirOS](https://www.mirbsd.org) -* [NixOS](https://nixos.org) -* [OpenBSD](http://openbsd.org) -* [OpenSUSE](http://opensuse.org) -* [RancherOS](http://rancher.com/rancher-os/) -* [Red Hat Enterprise Linux](https://www.redhat.com/) -* [Scientific Linux](http://scientificlinux.org) -* [Tiny Core Linux](http://tinycorelinux.net) -* [Ubuntu](http://www.ubuntu.com/) - -#### Security Related - -* [BlackArch Linux](https://blackarch.org) -* [Kali Linux](https://www.kali.org) -* [Parrot Security](https://www.parrotsec.org) - -#### Utilities - -* [AVG Rescue CD](https://www.avg.com/en-ww/download.prd-arl.) -* [Breakin](http://www.advancedclustering.com/products/software/breakin/) -* [Clonezilla](http://www.clonezilla.org/) -* [DBAN](http://www.dban.org/) -* [GParted](http://gparted.org) -* [Grml](http://grml.org) -* [Memtest](http://www.memtest.org/) -* [Super Grub2 Disk](http://www.supergrubdisk.org) -* [SystemRescueCD](https://www.system-rescue-cd.org) -* [Ultimate Boot CD](http://www.ultimatebootcd.com) - -### Testing New Branches - -Under the **Utilities** menu on netboot.xyz, there's an option for ["Test netboot.xyz branch"](https://github.com/antonym/netboot.xyz/blob/master/src/utils.ipxe#L157). If you've forked the code and have developed a new feature branch, you can use this option to chainload into that branch to test and validate the code. All you need to do is specify your Github user name and the name of your branch or abbreviated hash of the commit. Also, disable the signature verification for *netboot.xyz* under **Signatures Checks**. +If you'd like to contribute to the documentation, the netboot.xyz documenation is located at [netboot.xyz-docs](https://github.com/netbootxyz/netboot.xyz-docs). + +### Self Hosting netboot.xyz + +For those users who want to deploy their own netboot.xyz environment, you can leverage +the same scripts that are used to deploy the hosted environment. The source scripts are +all ansible templates and can be generated and customized to your preference. + +#### With Ansible + +To generate, run: + +``` +ansible-playbook -i inventory site.yml +``` + +The build output will be located in /var/www/html by default. + +#### With Docker + +``` +docker build -t localbuild -f Dockerfile-build . +docker run --rm -it -v $(pwd):/buildout localbuild +``` + +The build output will be in the generated folder `buildout` + +#### Local Overides + +Ansible will handle source generation as well as ipxe disk generation with your settings. The disk generation was worked on a while back so it needs work to catch it up to the existing state of netboot.xyz. + +If you want to override the defaults, you can put overrides in user_overrides.yml. See file for examples. + +Also note many user customizations are located in the boot.cfg file for the IPXE menus. A high level of customization can be achieved using our stock build output and hosting this along with the menus locally. + +#### Self Hosted Custom Options + +In addition to being able to host netboot.xyz locally, you can also create your own custom templates for custom menus within netboot.xyz. Please see [Custom User Menus](etc/netbootxyz/custom/README.md) for more information. + +### What Operating Systems are currently available on netboot.xyz? + +#### Operating Systems + +| Name | URL | Installer Kernel | Live OS | +|------------|-----------------|------------------|---------------| +|Alpine Linux| https://alpinelinux.org | Yes | No | +|Arch Linux | https://www.archlinux.org| Yes | No | +|BlackArch Linux|https://blackarch.org| ISO - Memdisk | No | +|CentOS| https://centos.org | Yes | No | +|Debian| https://debian.org | Yes | Yes| +|Devuan| https://devuan.org | Yes | No | +|Elementary OS| https://elementary.io | No | Yes | +|Fedora| https://fedoraproject.org | Yes | Yes | +|Flatcar Linux|https://www.flatcar-linux.org| Yes | No | +|FreeBSD|https://freebsd.org| No, disk image | No | +|FreeDOS|http://www.freedos.org| ISO - Memdisk| No | +|Gentoo|https://gentoo.org| Not Working | No | +|IPFire|https://www.ipfire.org| Yes | No | +|Kali Linux|https://www.kali.org| Yes | Yes | +|Mageia|https://www.mageia.org| Yes | No | +|Manjaro|https://manjaro.org| No | Yes | +|Mint|https://linuxmint.com| No | Yes | +|Microsoft Windows|https://www.microsoft.com| User supplied media | No | +|MirOS|https://www.mirbsd.org| Yes | No | +|NixOS|https://nixos.org| Yes | No | +|OpenBSD|https://openbsd.org| Yes | No | +|OpenSUSE|https://opensuse.org| Yes | No | +|Parrot Security|https://www.parrotsec.org| ISO | No | +|Pop OS|https://system76.com/pop| No | Yes | +|RancherOS|https://rancher.com/rancher-os| Yes | No | +|Red Hat Enterprise Linux|https://www.redhat.com| User supplied media | No | +|Scientific Linux|https://scientificlinux.org| Yes | No | +|Slackware|https://www.slackware.com| Yes | No | +|Tails|https://tails.boum.org | No | Yes | +|Tiny Core Linux|https://tinycorelinux.net| ISO - Memdisk | No | +|Ubuntu|https://www.ubuntu.com| Yes | Yes | + +### Utilities + +| Name | URL | Installer Kernel | Live OS | +|------------|-------------------------|------------------|---------| +|ALT Linux Rescue|https://en.altlinux.org/Rescue| ISO - Memdisk | - | +|Breakin|http://www.advancedclustering.com/products/software/breakin/| ISO - Memdisk | - | +|Clonezilla|http://www.clonezilla.org/| ISO - Memdisk | - | +|DBAN|http://www.dban.org/| ISO - Memdisk | - | +|GParted|http://gparted.org| ISO - Memdisk | - | +|Grml|http://grml.org| ISO - Memdisk | - | +|Memtest|http://www.memtest.org/| Yes | - | +|Super Grub2 Disk|http://www.supergrubdisk.org| ISO - Memdisk | - | +|Ultimate Boot CD|http://www.ultimatebootcd.com| ISO - Memdisk | - | ### 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 [Discord](https://discord.gg/An6PA2a). Follow us on [Twitter](https://twitter.com/netbootxyz) or like us on [Facebook](https://www.facebook.com/netboot.xyz)! +Feel free to open up an [issue](https://github.com/netbootxyz/netboot.xyz/issues) on Github or ping us on [Discord](https://discord.gg/An6PA2a). Follow us on [Twitter](https://twitter.com/netbootxyz) and like us on [Facebook](https://www.facebook.com/netboot.xyz)! diff --git a/docker-build-root/dumper.sh b/docker-build-root/dumper.sh new file mode 100755 index 0000000000..1018bd54bb --- /dev/null +++ b/docker-build-root/dumper.sh @@ -0,0 +1,20 @@ +#! /bin/sh + +# check for dump dir +if [ -d /buildout ]; then + # if there are no files in that directory use 777 perms as root + if [ `find /buildout -prune -empty 2>/dev/null` ]; then + /bin/mkdir -p /buildout/buildout + /bin/cp -r /mnt/* /buildout/buildout/ + /bin/chmod 777 -R /buildout/buildout + # match the ownership of the first file we see + else + PERMS=`/usr/bin/find /buildout/* -print -quit |xargs stat -c "%u:%g"` + /bin/mkdir -p /buildout/buildout + /bin/cp -r /mnt/* /buildout/buildout/ + /bin/chown $PERMS -R /buildout/buildout + fi +else + /bin/echo "/buildout not found exiting" + exit 1 +fi diff --git a/endpoints.yml b/endpoints.yml new file mode 100644 index 0000000000..39b1289659 --- /dev/null +++ b/endpoints.yml @@ -0,0 +1,521 @@ +endpoints: + ubuntu-19.10-live-kernel: + path: /ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ + files: + - initrd + - vmlinuz + os: ubuntu + version: '19.10' + ubuntu-18.04-live-kernel: + path: /ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ + files: + - initrd + - vmlinuz + os: ubuntu + version: '18.04' + ubuntu-18.04-default-squash: + path: /ubuntu-squash/releases/download/18.04.3-9e60a38f/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: Unity + kernel: ubuntu-18.04-live-kernel + debian-10-live-kernel: + path: /debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ + files: + - initrd + - vmlinuz + os: debian + version: '10' + debian-9-live-kernel: + path: /debian-core-9/releases/download/4.9.189-3-44deb8e4/ + files: + - initrd + - vmlinuz + os: debian + version: 9 + debian-10-default-squash: + path: /debian-squash/releases/download/10.2.0-600c59c0/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: core + kernel: debian-10-live-kernel + manjaro-18.1.0-default-squash: + path: /manjaro-squash/releases/download/18.1.0-a9fc9ad4/ + files: + - livefs.sfs + - rootfs.sfs + os: manjaro + version: 18.1.0 + flavor: architect + kernel: manjaro-18.1.0-architect-kernel + ubuntu-18.04-xfce-squash: + path: /ubuntu-squash/releases/download/18.04.3-d9bd73c3/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: xfce + kernel: ubuntu-18.04-live-kernel + ubuntu-18.04-KDE-squash: + path: /ubuntu-squash/releases/download/18.04.3-33e8e2f8/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: KDE + kernel: ubuntu-18.04-live-kernel + ubuntu-18.04-LXDE-squash: + path: /ubuntu-squash/releases/download/18.04.3-2f9cd5be/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: LXDE + kernel: ubuntu-18.04-live-kernel + ubuntu-18.04-Budgie-squash: + path: /ubuntu-squash/releases/download/18.04.3-fbf44fff/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: Budgie + kernel: ubuntu-18.04-live-kernel + ubuntu-18.04-MATE-squash: + path: /ubuntu-squash/releases/download/18.04.3-c629718a/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: MATE + kernel: ubuntu-18.04-live-kernel + ubuntu-18.04-kylin-squash: + path: /ubuntu-squash/releases/download/18.04.3-8c2102eb/ + files: + - filesystem.squashfs + os: ubuntu + version: '18.04' + flavor: kylin + kernel: ubuntu-18.04-live-kernel + ubuntu-19.10-xfce-squash: + path: /ubuntu-squash/releases/download/862cad91-9437400f/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: xfce + kernel: ubuntu-19.10-live-kernel + ubuntu-19.10-KDE-squash: + path: /ubuntu-squash/releases/download/9854741e-b243fefb/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: KDE + kernel: ubuntu-19.10-live-kernel + ubuntu-19.10-LXDE-squash: + path: /ubuntu-squash/releases/download/8b8b0336-f53591b5/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: LXDE + kernel: ubuntu-19.10-live-kernel + ubuntu-19.10-MATE-squash: + path: /ubuntu-squash/releases/download/b8a2a185-48069fc4/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: MATE + kernel: ubuntu-19.10-live-kernel + ubuntu-19.10-Budgie-squash: + path: /ubuntu-squash/releases/download/945f7f4b-85bee8cf/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: Budgie + kernel: ubuntu-19.10-live-kernel + debian-10-xfce-squash: + path: /debian-squash/releases/download/10.2.0-a0eae41d/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: xfce + kernel: debian-10-live-kernel + debian-10-gnome-squash: + path: /debian-squash/releases/download/10.2.0-787d3b4a/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: gnome + kernel: debian-10-live-kernel + debian-10-cinnamon-squash: + path: /debian-squash/releases/download/10.2.0-51162b7a/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: cinnamon + kernel: debian-10-live-kernel + ubuntu-19.10-kylin-squash: + path: /ubuntu-squash/releases/download/e7831484-762c8439/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: kylin + kernel: ubuntu-19.10-live-kernel + debian-10-kde-squash: + path: /debian-squash/releases/download/10.2.0-88a7a1a3/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: kde + kernel: debian-10-live-kernel + debian-10-lxde-squash: + path: /debian-squash/releases/download/10.2.0-30a4aa90/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: lxde + kernel: debian-10-live-kernel + debian-10-lxqt-squash: + path: /debian-squash/releases/download/10.2.0-39d7e341/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: lxqt + kernel: debian-10-live-kernel + debian-10-mate-squash: + path: /debian-squash/releases/download/10.2.0-466ca031/ + files: + - filesystem.squashfs + os: debian + version: '10' + flavor: mate + kernel: debian-10-live-kernel + ubuntu-19.10-default-squash: + path: /ubuntu-squash/releases/download/ee829212-575f2ecf/ + files: + - filesystem.squashfs + os: ubuntu + version: '19.10' + flavor: Unity + kernel: ubuntu-19.10-live-kernel + fedora-31-gnome: + path: /fedora-assets/releases/download/1.9-808bb0da/ + files: + - vmlinuz + - initrd + - squashfs.img + version: 31 + flavor: GNOME + os: fedora + fedora-31-Cinnamon: + path: /fedora-assets/releases/download/1.9-5a52a02a/ + files: + - vmlinuz + - initrd + - squashfs.img + version: 31 + flavor: Cinnamon + os: fedora + fedora-31-KDE: + path: /fedora-assets/releases/download/1.9-dfbbe3cc/ + files: + - vmlinuz + - initrd + - squashfs.img + os: fedora + version: 31 + flavor: KDE + fedora-31-LXDE: + path: /fedora-assets/releases/download/1.9-c23f0dc4/ + files: + - vmlinuz + - initrd + - squashfs.img + os: fedora + version: 31 + flavor: LXDE + fedora-31-LXQt: + path: /fedora-assets/releases/download/1.9-19db8480/ + files: + - vmlinuz + - initrd + - squashfs.img + os: fedora + version: 31 + flavor: LXQt + fedora-31-MATE_Compiz: + path: /fedora-assets/releases/download/1.9-29013501/ + files: + - vmlinuz + - initrd + - squashfs.img + os: fedora + version: 31 + flavor: MATE_Compiz + fedora-31-SoaS: + path: /fedora-assets/releases/download/1.9-28104ec6/ + files: + - vmlinuz + - initrd + - squashfs.img + os: fedora + version: 31 + flavor: SoaS + fedora-31-Xfce: + path: /fedora-assets/releases/download/1.9-00e3a627/ + files: + - vmlinuz + - initrd + - squashfs.img + os: fedora + version: 31 + flavor: Xfce + manjaro-18.1.0-gnome-squash: + path: /manjaro-squash/releases/download/18.1.0-f94efa23/ + files: + - livefs.sfs + - rootfs.sfs + - mhwdfs.sfs + - desktopfs.sfs + os: manjaro + version: 18.1.0 + flavor: GNOME + kernel: manjaro-18.1.0-gui-kernel + manjaro-18.1.0-kde-squash: + path: /manjaro-squash/releases/download/18.1.0-a3f2c12b/ + files: + - livefs.sfs + - rootfs.sfs + - mhwdfs.sfs + - desktopfs.sfs + os: manjaro + version: 18.1.0 + flavor: KDE + kernel: manjaro-18.1.0-gui-kernel + manjaro-18.1.0-xfce-squash: + path: /manjaro-squash/releases/download/18.1.0-5dc05378/ + files: + - livefs.sfs + - rootfs.sfs + - mhwdfs.sfs + - desktopfs.sfs + os: manjaro + version: 18.1.0 + flavor: XFCE + kernel: manjaro-18.1.0-gui-kernel + elementaryos-5-default-squash: + path: /ubuntu-squash/releases/download/5-14ff2c98/ + files: + - filesystem.squashfs + os: elementary-os + version: '5' + kernel: ubuntu-18.04-live-kernel + kali-xfce-squash: + path: /debian-squash/releases/download/2019.4-00ef2578/ + files: + - filesystem.squashfs + os: kali + version: rolling + flavor: xfce + kernel: kali-rolling-live-kernel + kali-light-squash: + path: /debian-squash/releases/download/2019.4-544b485d/ + files: + - filesystem.squashfs + os: kali + version: rolling + flavor: light + kernel: kali-rolling-live-kernel + kali-mate-squash: + path: /debian-squash/releases/download/2019.4-0e4d0210/ + files: + - filesystem.squashfs + os: kali + version: rolling + flavor: MATE + kernel: kali-rolling-live-kernel + kali-rolling-live-kernel: + path: /debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ + files: + - initrd + - vmlinuz + os: kali + version: rolling + kali-kde-squash: + path: /debian-squash/releases/download/2019.4-d761db15/ + files: + - filesystem.squashfs + os: kali + version: rolling + flavor: KDE + kernel: kali-rolling-live-kernel + kali-gnome-squash: + path: /debian-squash/releases/download/2019.4-734e93c5/ + files: + - filesystem.squashfs + os: kali + version: rolling + flavor: Gnome + kernel: kali-rolling-live-kernel + kali-lxde-squash: + path: /debian-squash/releases/download/2019.4-78e57944/ + files: + - filesystem.squashfs + os: kali + version: rolling + flavor: LXDE + kernel: kali-rolling-live-kernel + tails-4.0-live-kernel: + path: /debian-core-10/releases/download/5.3.2-1-8095e6f1/ + files: + - initrd + - vmlinuz + os: tails + version: '4.0' + tails-4.0-default-squash: + path: /debian-squash/releases/download/4.0-41d3900f/ + files: + - filesystem.squashfs + os: tails + version: '4.0' + kernel: tails-4.0-live-kernel + pop-19.10-default-squash: + path: /ubuntu-squash/releases/download/10-317de200/ + files: + - filesystem.squashfs + os: pop + version: '19.10' + kernel: ubuntu-19.10-live-kernel + pop-18.04-default-squash: + path: /ubuntu-squash/releases/download/57-b1e9a9cc/ + files: + - filesystem.squashfs + os: pop + version: '18.04' + kernel: ubuntu-18.04-live-kernel + manjaro-18.1.0-architect-kernel: + path: /manjaro-core-18.x/releases/download/4.19.69-1-MANJARO-6946b4cf/ + files: + - initrd + - vmlinuz + os: manjaro + flavor: architect + version: 18.1.0 + manjaro-18.1.0-gui-kernel: + path: /manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/ + files: + - initrd + - vmlinuz + os: manjaro + flavor: gui + version: 18.1.0 + mint-19-xfce-squash: + path: /ubuntu-squash/releases/download/19.2-69724a44/ + files: + - filesystem.squashfs + os: mint + version: '19' + flavor: xfce + kernel: ubuntu-18.04-live-kernel + mint-19-mate-squash: + path: /ubuntu-squash/releases/download/19.2-0b1e2ee6/ + files: + - filesystem.squashfs + os: mint + version: '19' + flavor: MATE + kernel: ubuntu-18.04-live-kernel + mint-19-cinnamon-squash: + path: /ubuntu-squash/releases/download/19.2-0830904d/ + files: + - filesystem.squashfs + os: mint + version: '19' + flavor: Cinnamon + kernel: ubuntu-18.04-live-kernel + zorin-15-gnome-squash: + path: /ubuntu-squash/releases/download/15-ad033efa/ + files: + - filesystem.squashfs + os: zorin + version: '15' + flavor: GNOME + kernel: ubuntu-18.04-live-kernel + zorin-15-xfce-squash: + path: /ubuntu-squash/releases/download/15-f5884501/ + files: + - filesystem.squashfs + os: zorin + version: '15' + flavor: XFCE + kernel: ubuntu-18.04-live-kernel + peppermint-10-default-squash: + path: /ubuntu-squash/releases/download/10-3bce362b/ + files: + - filesystem.squashfs + os: peppermint + version: '10' + flavor: LXDE + kernel: ubuntu-18.04-live-kernel + backbox-6-default-squash: + path: /ubuntu-squash/releases/download/6-b44ce5ee/ + files: + - filesystem.squashfs + os: BackBox + version: '6' + flavor: default + kernel: ubuntu-18.04-live-kernel + q4os-3.9-default-squash: + path: /debian-squash/releases/download/3.9-a721c7cc/ + files: + - filesystem.squashfs + os: Q4OS + version: '3.9' + flavor: trinity + kernel: debian-10-live-kernel + q4os-3.9-plasma-squash: + path: /debian-squash/releases/download/3.9-8b894afb/ + files: + - filesystem.squashfs + os: Q4OS + version: '3.9' + flavor: plasma + kernel: debian-10-live-kernel + voyager-bionic-squash: + path: /ubuntu-squash/releases/download/bionic-c535c643/ + files: + - filesystem.squashfs + os: Voyager + version: bionic + flavor: bionic + kernel: ubuntu-18.04-live-kernel + voyager-buster-squash: + path: /debian-squash/releases/download/buster-1e606829/ + files: + - filesystem.squashfs + os: Voyager + version: buster + flavor: buster + kernel: debian-10-live-kernel + voyager-eoan-squash: + path: /ubuntu-squash/releases/download/eoan-5a6a8fab/ + files: + - filesystem.squashfs + os: Voyager + version: eoan + flavor: eoan + kernel: ubuntu-19.10-live-kernel diff --git a/etc/netbootxyz/custom/README.md b/etc/netbootxyz/custom/README.md new file mode 100644 index 0000000000..2a6c0c3fa8 --- /dev/null +++ b/etc/netbootxyz/custom/README.md @@ -0,0 +1,24 @@ +# Custom Menus for Self Hosted netboot.xyz + +This directory contains custom iPXE files that are rendered +during menu generation and available from the main menu via +the custom menu option. + +When these options are set: + +``` +custom_generate_menus: true +custom_templates_dir: "{{ netbootxyz_conf_dir }}/custom" +``` + +the menu will add an option for custom menus and attempt to load into +custom/custom.ipxe. From there custom options can be built and +maintained seperately from the netboot.xyz source tree so that both +menus can be updated independently. + +A sample menu is provided to demonstrate how to configure and set up +a menu. You can copy the custom directory from the repo: + +``` +cp etc/netbootxyz/custom /etc/netbootxyz/custom +``` \ No newline at end of file diff --git a/etc/netbootxyz/custom/custom.ipxe.j2 b/etc/netbootxyz/custom/custom.ipxe.j2 new file mode 100644 index 0000000000..42f1f41bf9 --- /dev/null +++ b/etc/netbootxyz/custom/custom.ipxe.j2 @@ -0,0 +1,36 @@ +#!ipxe +### +### {{ site_name }} custom menu example +### + +:custom +clear custom_choice +menu This is a Test Menu +item --gap This is the first sub menu +item option_one ${space} Loading a kernel and initrd +item option_two ${space} Loading an ISO +item --gap This is a second sub menu +item option_three ${space} Loads another custom sub menu +item option_four ${space} This is option four +choose custom_choice || goto custom_exit +echo ${cls} +goto ${custom_choice} +goto custom_exit + +:option_one +kernel http://path.to/vmlinuz +initrd http://path.to/initrd +imgargs vmlinuz put_kernel_img_args_here +boot || goto custom_exit + +:option_two +kernel {{ memdisk_location }} raw iso +initrd http://path.to/iso +boot || goto custom_exit + +:option_three +echo Chains into another menu... +chain custom1.ipxe || goto custom + +:custom_exit +exit diff --git a/inventory b/inventory new file mode 100644 index 0000000000..2302edae31 --- /dev/null +++ b/inventory @@ -0,0 +1 @@ +localhost ansible_connection=local diff --git a/roles/netbootxyz/README.md b/roles/netbootxyz/README.md new file mode 100644 index 0000000000..a36b785558 --- /dev/null +++ b/roles/netbootxyz/README.md @@ -0,0 +1,39 @@ +Ansible role: netbootxyz +======================== + +Uses Ansible to generate a self hosted environment of netboot.xyz for use anywhere + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +Apache + +Author Information +------------------ + +Website: https://netboot.xyz +Author: Antony Messerli \ No newline at end of file diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml new file mode 100644 index 0000000000..47f9b7745e --- /dev/null +++ b/roles/netbootxyz/defaults/main.yml @@ -0,0 +1,479 @@ +--- + +### site configuration ### +site_name: netboot.xyz +boot_domain: boot.netboot.xyz +boot_version: "2.x" +boot_timeout: 300000 +time_server: "0.pool.ntp.org" + +# signature checking +sigs_menu: false +sigs_enabled: false +img_sigs_enabled: false + +# helper app locations +memdisk_location: "http://${boot_domain}/memdisk" +wimboot_location: "http://${boot_domain}/wimboot" + +# iPXE upstream repo settings +ipxe_repo: https://github.com/ipxe/ipxe +ipxe_branch: master + +ipxe_source_dir: /usr/src/ipxe +netbootxyz_root: /var/www/html +netbootxyz_conf_dir: /etc/netbootxyz + +# live os settings +live_endpoint: "https://github.com/netbootxyz" + +# generates menus +generate_menus: true + +# generates signatures for source files +generate_checksums: true +checksums_filename: "{{ site_name }}-sha256-checksums.txt" + +# bootloader options +generate_disks: true +bootloader_https_enabled: true +bootloader_http_enabled: true +bootloader_disks: + - "netboot.xyz" + +# custom menus +# custom_github_menus allows for github custom menus +# custom_generate_menus allows for self hosted custom menus to be added +custom_github_menus: true +custom_generate_menus: false +custom_templates_dir: "{{ netbootxyz_conf_dir }}/custom" + +# signature generation +generate_signatures: false +sigs_dir: "{{ netbootxyz_root }}/sigs" +sigs_location: "http://${boot_domain}/sigs/" +cert_dir: "/etc/netbootxyz/certs" +ipxe_trust_args: "TRUST={{ ipxe_ca_location }}" +ipxe_ca_url: http://ca.ipxe.org/ca.crt +ipxe_ca_filename: ca-ipxe-org.crt +codesign_cert_filename: codesign.crt +codesign_key_filename: codesign.key +cert_file_filename : ca-netboot-xyz.crt + +#bootloader_multiple: true +#bootloader_disks: +# - "netboot.xyz" +# - "netboot.xyz-packet" + +### release values ### +releases: + alpinelinux: + name: "Alpine Linux" + mirror: "http://dl-cdn.alpinelinux.org" + base_dir: "alpine" + enabled: true + menu: "linux" + versions: + - name: "3.10" + code_name: "v3.10" + - name: "Edge (development)" + code_name: "edge" + archlinux: + name: "Arch Linux" + mirror: "mirror.rackspace.com" + base_dir: "archlinux" + enabled: true + menu: "linux" + versions: + - name: "2019.12.01" + code_name: "2019.12.01" + blackarch: + name: "BlackArch" + enabled: true + menu: "security" + versions: + - name: "2019.09.01" + code_name: "2019.09.01" + centos: + name: "CentOS" + mirror: "http://mirror.centos.org" + base_dir: "centos" + enabled: true + menu: "linux" + versions: + - name: "8.0" + code_name: "8.0.1905" + - name: "8.0 Stream" + code_name: "8-stream" + - name: "7.7" + code_name: "7.7.1908" + coreos: + name: "Fedora CoreOS" + mirror: "https://builds.coreos.fedoraproject.org" + base_dir: "prod/streams/testing/builds" + enabled: false + menu: "linux" + versions: + - name: "31" + code_name: "31.20191127.1" + debian: + name: "Debian" + mirror: "http://deb.debian.org" + archive_mirror: "http://archive.debian.org" + base_dir: "debian" + enabled: true + menu: "linux" + versions: + stable: + - name: "10.0 (buster)" + code_name: "buster" + - name: "9.0 (stretch)" + code_name: "stretch" + testing: + - name: "bullseye (testing)" + code_name: "bullseye" + - name: "sid (unstable)" + code_name: "sid" + devuan: + name: "Devuan" + mirror: "http://auto.mirror.devuan.org" + base_dir: "devuan" + enabled: false + menu: "linux" + versions: + stable: + - name: "ascii (stable)" + code_name: "ascii" + - name: "1.0 (jessie)" + code_name: "jessie" + testing: + - name: "beowulf (testing)" + code_name: "beowulf" + fedora: + name: "Fedora" + mirror: "http://mirrors.kernel.org" + base_dir: "fedora" + enabled: true + menu: "linux" + versions: + - name: "31" + code_name: "31" + - name: "30" + code_name: "30" + - name: "29" + code_name: "29" + flatcar: + name: "Container Linux by Flatcar" + mirror: "" + enabled: true + menu: "linux" + versions: + - name: "Stable Channel" + code_name: "stable" + - name: "Beta Channel" + code_name: "beta" + - name: "Alpha Channel" + code_name: "alpha" + freebsd: + name: "FreeBSD" + enabled: false + menu: "bsd" + versions: + - name: "FreeBSD 12.0" + code_name: "12.0" + image_subdir: "12" + - name: "FreeBSD 11.2" + code_name: "11.2" + image_subdir: "11" + - name: "FreeBSD 11.1" + code_name: "11.1" + image_subdir: "11" + - name: "FreeBSD 11.0" + code_name: "11.0" + image_subdir: "11" + - name: "FreeBSD 10.4" + code_name: "10.4" + image_subdir: "10" + freedos: + name: "FreeDOS" + mirror: "http://www.freedos.org" + base_dir: "download/download" + enabled: true + menu: "dos" + versions: + - name: "1.2 Full Installer" + code_name: "FD12FULL" + - name: "1.2 Lite Installer" + code_name: "FD12LITE" + gentoo: + name: "Gentoo" + mirror: "" + enabled: false + menu: "linux" + versions: + - name: "Minimal CD 20160204 (amd64)" + code_name: "20160204" + ipfire: + name: "IPFire" + mirror: "https://downloads.ipfire.org" + base_dir: "releases/ipfire-2.x" + menu: "linux" + enabled: true + versions: + - name: "2.23 Core 138" + code_name: "2.23-core138" + kali: + name: "Kali Linux" + mirror: "http://http.kali.org" + base_dir: "kali" + enabled: true + menu: "security" + versions: + - name: "Rolling Edition (2019.4)" + code_name: "rolling" + livegrml: + name: "Grml Live Linux" + mirror: "http://download.grml.org" + enabled: true + menu: "live" + versions: + - name: "2018.12 Full" + code_name: "grml-full" + - name: "2018.12 Small" + code_name: "grml-small" + mageia: + name: "Mageia" + mirror: "http://mirrors.kernel.org" + base_dir: "mageia" + enabled: true + menu: "linux" + versions: + - name: "7.1" + code_name: "7.1" + - name: "cauldron" + code_name: "cauldron" + nixos: + name: "NixOS" + enabled: true + menu: "linux" + versions: + - name: "Nixos 19.09" + code_name: "19.09" + - name: "Nixos 19.03" + code_name: "19.03" + openbsd: + name: "OpenBSD" + mirror: "http://ftp.openbsd.org" + base_dir: "pub/OpenBSD" + enabled: true + menu: "bsd" + versions: + - name: "6.6" + code_name: "6.6" + image_ver: "66" + - name: "6.5" + code_name: "6.5" + image_ver: "65" + - name: "6.4" + code_name: "6.4" + image_ver: "64" + - name: "6.3" + code_name: "6.3" + image_ver: "63" + - name: "6.6 Latest Snapshot" + code_name: "snapshots" + image_ver: "66" + opensuse: + name: "OpenSUSE" + mirror: "http://download.opensuse.org" + base_dir: "distribution/leap" + enabled: true + menu: "linux" + versions: + - name: "openSUSE Leap 15.1" + code_name: "15.1" + - name: "openSUSE Leap 15.0" + code_name: "15.0" + - name: "openSUSE Leap 42.3" + code_name: "42.3" + - name: "openSUSE tumbleweed" + code_name: "tumbleweed" + parrotsec: + name: "Parrot Security" + mirror: "https://mirrordirector.archive.parrotsec.org" + base_dir: "parrot" + enabled: true + menu: "security" + versions: + - name: "Stable Netinstall" + code_name: "stable" + rancheros: + name: "RancherOS" + mirror: "http://releases.rancher.com" + base_dir: "os/latest" + enabled: true + menu: "linux" + versions: + - name: "Latest (20 MB)" + code_name: "latest" + scientific: + name: "Scientific Linux" + mirror: "http://ftp1.scientificlinux.org" + base_dir: "linux/scientific" + enabled: true + menu: "linux" + versions: + - name: "7.7" + code_name: "7.7" + - name: "7.6" + code_name: "7.6" + - name: "6.10" + code_name: "6.10" + - name: "6.9" + code_name: "6.9" + slackware: + name: "Slackware" + mirror: "http://mirror.rackspace.com" + base_dir: "slackware" + enabled: true + menu: "linux" + versions: + - name: "Current" + code_name: "current" + - name: "14.2" + code_name: "14.2" + - name: "14.1" + code_name: "14.1" + tinycore: + name: "Tiny Core Linux" + mirror: "http://tinycorelinux.net" + enabled: true + menu: "linux" + versions: + - name: "Core [ISO]" + code_name: "Core" + - name: "TinyCore [ISO]" + code_name: "TinyCore" + ubuntu: + name: "Ubuntu" + mirror: "http://archive.ubuntu.com" + archive_mirror: "http://old-releases.ubuntu.com" + base_dir: "ubuntu" + enabled: true + menu: "linux" + versions: + - name: "19.10 Eoan Ermine" + code_name: "eoan" + - name: "19.04 Disco Dingo" + code_name: "disco" + - name: "18.04 LTS Bionic Beaver" + code_name: "bionic" + - name: "16.04 LTS Xenial Xerus" + code_name: "xenial" + +# utility values +utilities: + avg: + name: "AVG Rescue CD" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "160420a12074" + util_path: "http://download.avg.com/filedir/inst/avg_arl_cdi_all_120_160420a12074.iso" + breakin: + name: "Breakin" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "4.26.1-53" + util_path: "http://www.advancedclustering.com/wp-content/uploads/2017/02/bootimage-4.26.1-53.iso" + clonezilla: + name: "Clonezilla" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "2.6.4-10" + util_path: "http://master.dl.sourceforge.net/project/clonezilla/clonezilla_live_stable/2.6.4-10/clonezilla-live-2.6.4-10-amd64.iso" + dban: + name: "DBAN" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "2.3.0" + util_path: "http://master.dl.sourceforge.net/project/dban/dban/dban-2.3.0/dban-2.3.0_i586.iso" + gparted: + name: "GParted" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "1.0.0-3" + util_path: "http://master.dl.sourceforge.net/project/gparted/gparted-live-stable/1.0.0-3/gparted-live-1.0.0-3-amd64.iso" + memtest: + name: "Memtest" + enabled: true + menu: "pcbios" + type: "memtest" + version: "5.01.0" + util_path: "https://boot.netboot.xyz/utils/memtest86-5.01.0" + supergrub: + name: "SuperGRUB" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "2.04s1" + util_path: "http://master.dl.sourceforge.net/project/supergrub2/2.04s1/super_grub2_disk_2.04s1/super_grub2_disk_hybrid_2.04s1.iso" + ubcd: + name: "Ultimate Boot CD (UBCD)" + enabled: true + menu: "pcbios" + type: "memdisk" + version: "538" + util_path: "http://mirror.sysadminguide.net/ubcd/ubcd538.iso" + +bootloaders: + legacy: + - type: "ISO" + ipxe_bin: "ipxe.iso" + output_bin: ".iso" + desc: "Used for CD/DVD, Virtual CDs, DRAC/iLO, VMware, Virtual Box" + - type: "USB" + ipxe_bin: "ipxe.usb" + output_bin: ".usb" + desc: "Used for creation of USB Keys" + - type: "Kernel" + ipxe_bin: "ipxe.lkrn" + output_bin: ".lkrn" + desc: "Used for booting from GRUB/EXTLINUX" + - type: "Floppy" + ipxe_bin: "ipxe.dsk" + output_bin: ".dsk" + desc: "Virtual floppy disk for DRAC/iLO, VMware, Virtual Box, etc" + - type: "DHCP" + ipxe_bin: "ipxe.kpxe" + output_bin: ".kpxe" + desc: "DHCP boot image file, uses built-in iPXE NIC drivers" + - type: "DHCP-undionly" + ipxe_bin: "undionly.kpxe" + output_bin: "-undionly.kpxe" + desc: "DHCP boot image file, use if you have NIC issues" + uefi: + - type: "ISO" + ipxe_bin: "ipxe-efi.eiso" + output_bin: "-efi.iso" + desc: "EFI BIOS, works in Virtual Box EFI mode" + - type: "USB" + ipxe_bin: "ipxe-efi.usb" + output_bin: "-efi.usb" + desc: "Used for booting from GRUB/EXTLINUX" + - type: "DHCP" + ipxe_bin: "ipxe.efi" + output_bin: ".efi" + desc: "DHCP EFI boot image file, uses built-in iPXE NIC drivers" + - type: "DHCP-snp" + ipxe_bin: "snp.efi" + output_bin: "-snp.efi" + desc: "EFI w/ Simple Network Protocol, attempts to boot all net devices" + - type: "DHCP-snponly" + ipxe_bin: "snponly.efi" + output_bin: "-snponly.efi" + desc: "EFI w/ Simple Network Protocol, only boots from device chained from" diff --git a/ipxe/local/colour.h b/roles/netbootxyz/files/ipxe/local/colour.h similarity index 100% rename from ipxe/local/colour.h rename to roles/netbootxyz/files/ipxe/local/colour.h diff --git a/ipxe/local/crypto.h b/roles/netbootxyz/files/ipxe/local/crypto.h similarity index 100% rename from ipxe/local/crypto.h rename to roles/netbootxyz/files/ipxe/local/crypto.h diff --git a/ipxe/local/general.h b/roles/netbootxyz/files/ipxe/local/general.h similarity index 100% rename from ipxe/local/general.h rename to roles/netbootxyz/files/ipxe/local/general.h diff --git a/ipxe/local/general.h.efi b/roles/netbootxyz/files/ipxe/local/general.h.efi similarity index 100% rename from ipxe/local/general.h.efi rename to roles/netbootxyz/files/ipxe/local/general.h.efi diff --git a/ipxe/local/nap.h.efi b/roles/netbootxyz/files/ipxe/local/nap.h.efi similarity index 100% rename from ipxe/local/nap.h.efi rename to roles/netbootxyz/files/ipxe/local/nap.h.efi diff --git a/ipxe/local/usb.h.efi b/roles/netbootxyz/files/ipxe/local/usb.h.efi similarity index 100% rename from ipxe/local/usb.h.efi rename to roles/netbootxyz/files/ipxe/local/usb.h.efi diff --git a/src/memdisk b/roles/netbootxyz/files/memdisk similarity index 100% rename from src/memdisk rename to roles/netbootxyz/files/memdisk diff --git a/src/wimboot b/roles/netbootxyz/files/wimboot similarity index 100% rename from src/wimboot rename to roles/netbootxyz/files/wimboot diff --git a/roles/netbootxyz/meta/main.yml b/roles/netbootxyz/meta/main.yml new file mode 100644 index 0000000000..4524dfdca7 --- /dev/null +++ b/roles/netbootxyz/meta/main.yml @@ -0,0 +1,15 @@ +galaxy_info: + author: Antony Messerli + description: Installs a self hosted version of netboot.xyz + license: Apache-2.0 + min_ansible_version: 2.7 + platforms: + - name: Ubuntu + versions: + - all + - name: Centos + versions: + - all + galaxy_tags: + - system +dependencies: [] diff --git a/roles/netbootxyz/tasks/generate_checksums.yml b/roles/netbootxyz/tasks/generate_checksums.yml new file mode 100644 index 0000000000..d8c15fdae6 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_checksums.yml @@ -0,0 +1,32 @@ +--- + - name: Register a listing of all created iPXE bootloaders + command: ls -I {{ checksums_filename }} {{ netbootxyz_root }}/ipxe/ + register: netboot_disks + tags: + - skip_ansible_lint + + - name: Generate date + command: date + register: current_date + tags: + - skip_ansible_lint + + - name: Gather stat listing of directory + command: sha256sum -b {{ item }} + with_items: + - "{{ netboot_disks.stdout_lines }}" + args: + chdir: "{{ netbootxyz_root }}/ipxe/" + register: netboot_disks_stat + tags: + - skip_ansible_lint + + - name: Generate ipxe disk checksums + template: + src: checksums.txt.j2 + dest: "{{ netbootxyz_root }}/ipxe/{{ checksums_filename }}" + + - name: Generate netboot.xyz index template + template: + src: index.html.j2 + dest: "{{ netbootxyz_root }}/index.html" diff --git a/roles/netbootxyz/tasks/generate_disks b/roles/netbootxyz/tasks/generate_disks new file mode 100644 index 0000000000..e69de29bb2 diff --git a/roles/netbootxyz/tasks/generate_disks.yml b/roles/netbootxyz/tasks/generate_disks.yml new file mode 100644 index 0000000000..44736b3aab --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks.yml @@ -0,0 +1,11 @@ +--- + + - include: generate_disks_base.yml + + - include: generate_disks_legacy.yml + when: + - generate_disks_legacy | default(true) | bool + + - include: generate_disks_efi.yml + when: + - generate_disks_efi | default(true) | bool diff --git a/roles/netbootxyz/tasks/generate_disks_arm.yml b/roles/netbootxyz/tasks/generate_disks_arm.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/roles/netbootxyz/tasks/generate_disks_base.yml b/roles/netbootxyz/tasks/generate_disks_base.yml new file mode 100644 index 0000000000..e60b34f930 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks_base.yml @@ -0,0 +1,78 @@ +--- + + - name: Gathering facts + setup: + + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_distribution | lower }}.yml" + - "{{ ansible_os_family | lower }}.yml" + + - name: Set var to bootloader of loop + set_fact: + bootloader_filename: "{{ bootloader_file }}" + + - name: Create iPXE file directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ netbootxyz_root }}/ipxe" + - "{{ cert_dir }}" + + - name: Copy helper apps + copy: + src: "{{ item }}" + dest: "{{ netbootxyz_root }}" + with_items: + - memdisk + - wimboot + + - name: Install required packages + package: + name: "{{ item }}" + state: present + with_items: "{{ netbootxyz_packages }}" + + - name: Check out latest iPXE sources + git: + repo: "{{ ipxe_repo }}" + dest: "{{ ipxe_source_dir }}" + version: "{{ ipxe_branch }}" + force: true + register: ipxe_git_checkout + + - name: Copy iPXE Bootloader template to iPXE source directory + template: + src: "disks/{{ bootloader_filename }}.j2" + dest: "{{ ipxe_source_dir }}/src/{{ bootloader_filename }}" + + - name: Touch iPXE config local files + file: + path: "{{ ipxe_source_dir }}/{{ item }}" + state: touch + with_items: + - src/config/local/console.h + - src/config/local/umalloc.h + - src/config/local/nap.h + - src/config/local/timer.h + - src/config/local/branding.h + - src/config/local/serial.h + - src/config/local/reboot.h + - src/config/local/sanboot.h + - src/config/local/fault.h + - src/config/local/dhcp.h + - src/config/local/sideband.h + - src/config/local/entropy.h + - src/config/local/crypto.h + - src/config/local/usb.h + - src/config/local/settings.h + + - name: Retrieve iPXE CA + get_url: + url: "{{ ipxe_ca_url }}" + dest: "{{ cert_dir }}/{{ ipxe_ca_filename }}" diff --git a/roles/netbootxyz/tasks/generate_disks_efi.yml b/roles/netbootxyz/tasks/generate_disks_efi.yml new file mode 100644 index 0000000000..0191dda11b --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks_efi.yml @@ -0,0 +1,76 @@ +--- + + - name: Copy netboot.xyz local EFI iPXE configs + copy: + src: "ipxe/local/{{ item }}" + dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}" + with_items: + - colour.h + - crypto.h + + - name: Copy netboot.xyz general.h.efi iPXE config + copy: + src: "ipxe/local/general.h.efi" + dest: "{{ ipxe_source_dir }}/src/config/local/general.h" + + - name: Set trust file to ipxe ca + set_fact: + trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}" + when: not generate_signatures + + - name: Combine trust files if set + set_fact: + trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}" + when: generate_signatures | bool + + - name: Compile iPXE bootloader for EFI + shell: | + make clean + make EMBED={{ bootloader_filename }} \ + TRUST={{ trust_files }} \ + bin-x86_64-efi/ipxe.efi \ + bin-x86_64-efi/snp.efi \ + bin-x86_64-efi/snponly.efi + args: + chdir: "{{ ipxe_source_dir }}/src" + tags: + - skip_ansible_lint + + - name: Generate iPXE EFI ISO Disk + shell: | + mkdir -p efi_tmp + dd if=/dev/zero of=efi_tmp/ipxe.img count=2880 + mformat -i efi_tmp/ipxe.img -m 0xf8 -f 2880 + mmd -i efi_tmp/ipxe.img ::efi ::efi/boot + mcopy -i efi_tmp/ipxe.img bin-x86_64-efi/ipxe.efi ::efi/boot/bootx64.efi + genisoimage -o ipxe-efi.eiso -eltorito-alt-boot -e ipxe.img -no-emul-boot efi_tmp + args: + chdir: "{{ ipxe_source_dir }}/src" + warn: false + tags: + - skip_ansible_lint + + - name: Generate iPXE EFI USB image + shell: | + truncate -s 3MiB ipxe-efi.usb + mkfs.vfat ipxe-efi.usb + mmd -i ipxe-efi.usb "::/efi" + mmd -i ipxe-efi.usb "::/efi/boot" + mcopy -i ipxe-efi.usb bin-x86_64-efi/ipxe.efi "::/efi/boot/bootx64.efi" + args: + chdir: "{{ ipxe_source_dir }}/src" + warn: false + tags: + - skip_ansible_lint + + - name: Copy iPXE EFI builds to http directory + copy: + src: "{{ ipxe_source_dir }}/src/{{ item.src }}" + dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}" + remote_src: True + with_items: + - { src: "bin-x86_64-efi/ipxe.efi", dest: "{{ bootloader_filename }}.efi" } + - { src: "bin-x86_64-efi/snp.efi", dest: "{{ bootloader_filename }}-snp.efi" } + - { src: "bin-x86_64-efi/snponly.efi", dest: "{{ bootloader_filename }}-snponly.efi" } + - { src: "ipxe-efi.eiso", dest: "{{ bootloader_filename }}-efi.iso" } + - { src: "ipxe-efi.usb", dest: "{{ bootloader_filename }}-efi.usb" } \ No newline at end of file diff --git a/roles/netbootxyz/tasks/generate_disks_legacy.yml b/roles/netbootxyz/tasks/generate_disks_legacy.yml new file mode 100644 index 0000000000..f7def05829 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks_legacy.yml @@ -0,0 +1,47 @@ +--- + + - name: Copy netboot.xyz local legacy iPXE configs + copy: + src: "ipxe/local/{{ item }}" + dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}" + with_items: + - colour.h + - crypto.h + - general.h + + - name: Set trust file to ipxe ca + set_fact: + trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}" + when: not generate_signatures + + - name: Combine trust args if set + set_fact: + trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}" + when: generate_signatures | bool + + - name: Compile iPXE bootloader for Legacy BIOS + shell: | + make clean + make EMBED={{ bootloader_filename }} TRUST={{ trust_files }} bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe + args: + chdir: "{{ ipxe_source_dir }}/src" + tags: + - skip_ansible_lint + + - name: Copy iPXE files for Legacy BIOS to http directory + copy: + src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}" + dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}" + remote_src: True + with_items: + - ".dsk" + - ".iso" + - ".lkrn" + - ".usb" + - ".kpxe" + + - name: Copy undionly.kpxe for Legacy BIOS to http directory + copy: + src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe" + dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe" + remote_src: True diff --git a/roles/netbootxyz/tasks/generate_menus.yml b/roles/netbootxyz/tasks/generate_menus.yml new file mode 100644 index 0000000000..2a07d9f699 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_menus.yml @@ -0,0 +1,34 @@ +--- + - name: Combine overrides with release defaults + set_fact: + _releases: "{{ releases|combine(release_overrides, recursive=True) }}" + when: release_overrides is defined + + - name: Set releases with user overrides + set_fact: + releases: "{{ _releases }}" + when: release_overrides is defined + + - name: Combine overrides with utilities defaults + set_fact: + _utilities: "{{ utilities|combine(utilities_overrides, recursive=True) }}" + when: utilities_overrides is defined + + - name: Set utility with user overrides + set_fact: + utilities: "{{ _utilities }}" + when: utilities_overrides is defined + + - name: Generate directories + file: + path: "{{ netbootxyz_root }}" + state: directory + + - name: Generate netboot.xyz source files templates + template: + src: "{{ item.src }}" + dest: "{{ netbootxyz_root }}/{{ item.path | regex_replace('.j2','') }}" + with_filetree: "templates/menu/" + when: item.state == "file" + tags: + - skip_ansible_lint \ No newline at end of file diff --git a/roles/netbootxyz/tasks/generate_menus_custom.yml b/roles/netbootxyz/tasks/generate_menus_custom.yml new file mode 100644 index 0000000000..ed36090fe4 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_menus_custom.yml @@ -0,0 +1,18 @@ +--- + + - name: Generate directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ custom_templates_dir }}" + - "{{ netbootxyz_root }}/custom" + + - name: Generate custom user menu templates + template: + src: "{{ item.src }}" + dest: "{{ netbootxyz_root }}/custom/{{ item.path | regex_replace('.j2','') }}" + with_filetree: "{{ custom_templates_dir }}" + when: item.state == "file" + tags: + - skip_ansible_lint \ No newline at end of file diff --git a/roles/netbootxyz/tasks/generate_signatures.yml b/roles/netbootxyz/tasks/generate_signatures.yml new file mode 100644 index 0000000000..bea013c320 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_signatures.yml @@ -0,0 +1,26 @@ +--- + - name: Gather list of source files + command: ls {{ netbootxyz_root }} + register: source_files + tags: + - skip_ansible_lint + + - name: Create directories for signatures + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ sigs_dir }}" + + - name: Generate signatures for source files + shell: | + openssl cms -sign -binary -noattr -in {{ netbootxyz_root }}/{{ item }} \ + -signer {{ codesign_cert_location }} -inkey {{ codesign_key_location }} -certfile {{ cert_file_location }} -outform DER \ + -out {{ sigs_dir }}/{{ item }}.sig + args: + chdir: "{{ cert_dir }}" + warn: false + with_items: + - "{{ source_files.stdout_lines }}" + tags: + - skip_ansible_lint \ No newline at end of file diff --git a/roles/netbootxyz/tasks/main.yml b/roles/netbootxyz/tasks/main.yml new file mode 100644 index 0000000000..b614f034b0 --- /dev/null +++ b/roles/netbootxyz/tasks/main.yml @@ -0,0 +1,28 @@ +--- + - include: generate_menus.yml + when: + - generate_menus | default(true) | bool + + - include: generate_menus_custom.yml + when: + - custom_generate_menus | default(false) | bool + + - include: generate_signatures.yml + when: + - generate_signatures | default(false) | bool + - codesign_cert_location is defined + - codesign_key_location is defined + - cert_file_location is defined + + - include: generate_disks.yml + with_items: + - "{{ bootloader_disks }}" + loop_control: + loop_var: bootloader_file + when: + - generate_disks | default(true) | bool + + - include: generate_checksums.yml + when: + - generate_checksums | default(true) | bool + diff --git a/roles/netbootxyz/templates/checksums.txt.j2 b/roles/netbootxyz/templates/checksums.txt.j2 new file mode 100644 index 0000000000..4cbb0547cb --- /dev/null +++ b/roles/netbootxyz/templates/checksums.txt.j2 @@ -0,0 +1,6 @@ +# {{ site_name }} bootloaders generated at {{ current_date.stdout }} +# iPXE Commit: {{ ipxe_repo }}/commit/{{ ipxe_git_checkout.after }} + +{% for item in netboot_disks_stat.results %} +{{ item.stdout }} +{% endfor %} \ No newline at end of file diff --git a/ipxe/disks/netboot.xyz-gce b/roles/netbootxyz/templates/disks/netboot.xyz-gce.j2 similarity index 100% rename from ipxe/disks/netboot.xyz-gce rename to roles/netbootxyz/templates/disks/netboot.xyz-gce.j2 diff --git a/ipxe/disks/netboot.xyz-packet b/roles/netbootxyz/templates/disks/netboot.xyz-packet.j2 similarity index 100% rename from ipxe/disks/netboot.xyz-packet rename to roles/netbootxyz/templates/disks/netboot.xyz-packet.j2 diff --git a/ipxe/disks/netboot.xyz b/roles/netbootxyz/templates/disks/netboot.xyz.j2 similarity index 51% rename from ipxe/disks/netboot.xyz rename to roles/netbootxyz/templates/disks/netboot.xyz.j2 index fb3d12549e..295f76c581 100644 --- a/ipxe/disks/netboot.xyz +++ b/roles/netbootxyz/templates/disks/netboot.xyz.j2 @@ -5,21 +5,27 @@ set boldoff ${esc:string}[22m set fg_gre ${esc:string}[32m set fg_cya ${esc:string}[36m set fg_whi ${esc:string}[37m +set TFTP_ERR Local TFTP failed... attempting remote HTTPS set HTTPS_ERR HTTPS appears to have failed... attempting HTTP set HTTP_ERR HTTP has failed, localbooting... -set version 1.04 +set site_name {{ site_name }} +set boot_domain {{ boot_domain }} +set version {{ boot_version }} :start -echo ${bold}${fg_gre}netboot.xyz ${fg_whi}v${version}${boldoff} +echo ${bold}${fg_gre}${site_name} - ${fg_whi}v${version}${boldoff} +iseq ${site_name} netboot.xyz || echo ${bold}${fg_whi}Powered by ${fg_gre}netboot.xyz${fg_whi}${boldoff} prompt --key m --timeout 4000 Hit the ${bold}m${boldoff} key to open failsafe menu... && goto failsafe || goto dhcp :dhcp echo dhcp || goto netconfig +isset ${next-server} && iseq ${filename} {{ site_name }}.kpxe && goto tftpmenu || +isset ${next-server} && iseq ${filename} {{ site_name }}.efi && goto tftpmenu || goto menu :failsafe -menu netboot.xyz Failsafe Menu +menu ${boot_domain} Failsafe Menu item localboot Boot to local drive item netconfig Manual network configuration item retry Retry boot @@ -40,15 +46,24 @@ echo -n Subnet mask: && read net${net}/netmask echo -n Gateway: && read net${net}/gateway echo -n DNS: && read dns ifopen net${net} -echo Attempting chainload of netboot.xyz... +echo Attempting chainload of ${boot_domain}... goto menu || goto failsafe +:tftpmenu +isset ${hostname} && chain --autofree tftp://${next-server}/HOSTNAME-${hostname}.ipxe || echo Custom boot by Hostname not found trying MAC... +chain --autofree tftp://${next-server}/MAC-${mac:hexraw}.ipxe || echo Custom boot by MAC not found booting default... +chain --autofree tftp://${next-server}/menu.ipxe || echo ${TFTP_ERR} && goto menu + :menu +{% if bootloader_https_enabled | bool %} set conn_type https -chain --autofree https://boot.netboot.xyz/menu.ipxe || echo ${HTTPS_ERR} +chain --autofree https://${boot_domain}/menu.ipxe || echo ${HTTPS_ERR} sleep 5 +{% endif %} +{% if bootloader_http_enabled | bool %} set conn_type http -chain --autofree http://boot.netboot.xyz/menu.ipxe || echo ${HTTP_ERR} +chain --autofree http://${boot_domain}/menu.ipxe || echo ${HTTP_ERR} +{% endif %} goto localboot :localboot diff --git a/roles/netbootxyz/templates/index.html.j2 b/roles/netbootxyz/templates/index.html.j2 new file mode 100644 index 0000000000..593456b73d --- /dev/null +++ b/roles/netbootxyz/templates/index.html.j2 @@ -0,0 +1,66 @@ + + + + {{ site_name }} BootLoaders - Powered by netboot.xyz + + + +
+             _   _                 _                    
+  _ __   ___| |_| |__   ___   ___ | |_  __  ___   _ ____
+ | '_ \ / _ \ __| '_ \ / _ \ / _ \| __| \ \/ / | | |_  /
+ | | | |  __/ |_| |_) | (_) | (_) | |_ _ >  <| |_| |/ / 
+ |_| |_|\___|\__|_.__/ \___/ \___/ \__(_)_/\_\\__, /___|
+                                              |___/     
+

+ Version: {{ boot_version }}
+ Powered by netboot.xyz +

+

Legacy (PCBIOS) iPXE Bootloaders

+ + + + + + + + + {% for bootloader_name in bootloader_disks %} + {% for item in bootloaders.legacy %} + + + + + + {% endfor %} + {% endfor %} +
Type Bootloader Description
{{ item.type }} {{ bootloader_name }}{{ item.output_bin }} {{ item.desc }}
+ +

UEFI iPXE Bootloaders

+ + + + + + + + + + {% for bootloader_name in bootloader_disks %} + {% for item in bootloaders.uefi %} + + + + + + {% endfor %} + {% endfor %} +
Type Bootloader Description
{{ item.type }} {{ bootloader_name }}{{ item.output_bin }} {{ item.desc }}
+
+ + diff --git a/src/alpinelinux.ipxe b/roles/netbootxyz/templates/menu/alpinelinux.ipxe.j2 similarity index 64% rename from src/alpinelinux.ipxe rename to roles/netbootxyz/templates/menu/alpinelinux.ipxe.j2 index 813bbfc756..07159dcc65 100644 --- a/src/alpinelinux.ipxe +++ b/roles/netbootxyz/templates/menu/alpinelinux.ipxe.j2 @@ -9,21 +9,22 @@ goto ${menu} :alpinelinux clear alpine_version -set os Alpine Linux +set os {{ releases.alpinelinux.name }} iseq ${arch} x86_64 && set bootarch x86_64 || set bootarch x86 menu ${os} [${bootarch}] - Image Sig Checks: [${img_sigs_enabled}] -item --gap Latest Releases -item v3.10 ${space} ${os} 3.10 -item --gap Development Releases -item edge ${space} ${os} Edge (development) +item --gap Releases +{% for item in releases.alpinelinux.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose alpine_version || goto alpine_exit goto boot :boot -set base-url http://${alpinelinux_mirror} +set base-url ${alpinelinux_mirror} set dir ${alpinelinux_base_dir}/${alpine_version}/releases/${bootarch}/netboot -set repo-url ${base-url}/${alpinelinux_base_dir}/${alpine_version}/main +set repo-url ${alpinelinux_mirror}/${alpinelinux_base_dir}/${alpine_version}/main imgfree +iseq ${alpine_version} edge && goto edge_boot || kernel ${base-url}/${dir}/vmlinuz-vanilla ${ipparam} alpine_repo=${repo-url} modules=loop,squashfs modloop=${base-url}/${dir}/modloop-vanilla quiet nomodeset initrd ${base-url}/${dir}/initramfs-vanilla echo @@ -39,6 +40,15 @@ echo Signatures verified! echo :skip_sigs boot + +:edge_boot +kernel ${base-url}/${dir}/vmlinuz-lts ${ipparam} alpine_repo=${repo-url} modules=loop,squashfs modloop=${base-url}/${dir}/modloop-lts quiet nomodeset +initrd ${base-url}/${dir}/initramfs-lts +echo +echo MD5sums: +md5sum vmlinuz-lts initramfs-lts +boot + goto alpine_exit :alpine_exit diff --git a/src/archlinux.ipxe b/roles/netbootxyz/templates/menu/archlinux.ipxe.j2 similarity index 72% rename from src/archlinux.ipxe rename to roles/netbootxyz/templates/menu/archlinux.ipxe.j2 index 9e84f3fa09..d62c76517c 100644 --- a/src/archlinux.ipxe +++ b/roles/netbootxyz/templates/menu/archlinux.ipxe.j2 @@ -19,12 +19,13 @@ set ipparam BOOTIF=${netX/mac} ip=${ip}::${gateway}:${netmask} goto ${menu} || :archlinux -set os Arch Linux +set os {{ releases.archlinux.name }} clear arch_version -menu ${os} - ${arch} - Image Sig Checks: [${img_sigs_enabled}] -menu Arch Linux +menu ${os} - ${arch} item --gap Latest Releases -item 2019.12.01 2019.12.01 +{% for item in releases.archlinux.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose arch_version || goto archlinux_exit goto boot @@ -37,18 +38,9 @@ initrd http://${archlinux_mirror}/${dir}/x86_64/archiso.img echo echo MD5sums: md5sum vmlinuz archiso.img -iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs -:verify_sigs -echo -echo Checking signatures... -imgverify vmlinuz ${sigs}${dir}/x86_64/vmlinuz.sig || goto error -imgverify archiso.img ${sigs}${dir}/x86_64/archiso.img.sig || goto error -echo Signatures verified! -echo -:skip_sigs boot goto archlinux_exit :archlinux_exit clear menu -exit 0 +exit 0 \ No newline at end of file diff --git a/src/blackarch.ipxe b/roles/netbootxyz/templates/menu/blackarch.ipxe.j2 similarity index 74% rename from src/blackarch.ipxe rename to roles/netbootxyz/templates/menu/blackarch.ipxe.j2 index 0a6f75c9d4..596bbce667 100644 --- a/src/blackarch.ipxe +++ b/roles/netbootxyz/templates/menu/blackarch.ipxe.j2 @@ -6,10 +6,12 @@ goto ${menu} :blackarch -set os BlackArch Linux +set os {{ releases.blackarch.name }} menu ${os} Installers item --gap Official Releases -item 2019.06.01 ${space} ${os} 2019.06.01 +{% for item in releases.blackarch.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose blackarch_version || goto blackarch_exit goto blackarch_boot @@ -22,4 +24,4 @@ goto blackarch_exit :blackarch_exit clear menu -exit 0 +exit 0 \ No newline at end of file diff --git a/src/boot.cfg b/roles/netbootxyz/templates/menu/boot.cfg.j2 similarity index 62% rename from src/boot.cfg rename to roles/netbootxyz/templates/menu/boot.cfg.j2 index 93c1f4ffca..ab3672abbf 100644 --- a/src/boot.cfg +++ b/roles/netbootxyz/templates/menu/boot.cfg.j2 @@ -2,74 +2,41 @@ :global_vars # set site name -set site_name netboot.xyz +set site_name {{ site_name }} # set boot domain -set boot_domain boot.netboot.xyz +set boot_domain {{ boot_domain }} # set location of memdisk -set memdisk http://${boot_domain}/memdisk +set memdisk {{ memdisk_location }} # signature check enabled? -set sigs_enabled true +set sigs_enabled {{ sigs_enabled | default(false) | bool }} # image signatures check enabled? -set img_sigs_enabled true +set img_sigs_enabled {{ img_sigs_enabled | default(false) | bool }} # set location of signatures for sources -set sigs http://${boot_domain}/sigs/ +set sigs {{ sigs_location }} # set location of latest iPXE set ipxe_disk netboot.xyz-undionly.kpxe # set location of custom netboot.xyz live assets -set live_endpoint https://github.com/netbootxyz +set live_endpoint {{ live_endpoint }} ################## # official mirrors ################## :mirrors -### Alpine Linux -set alpinelinux_mirror dl-cdn.alpinelinux.org -set alpinelinux_base_dir alpine - -### ArchLinux -set archlinux_mirror mirror.rackspace.com -set archlinux_base_dir archlinux - -### CentOS -set centos_mirror mirror.centos.org -set centos_base_dir centos - -### Debian -set debian_mirror deb.debian.org -set debian_base_dir debian - -### Devuan -set devuan_mirror auto.mirror.devuan.org -set devuan_base_dir devuan - -### Fedora -set fedora_mirror mirrors.kernel.org -set fedora_base_dir fedora - -### Mageia -set mageia_mirror mirrors.kernel.org -set mageia_base_dir mageia - -### OpenSUSE -set opensuse_mirror download.opensuse.org -set opensuse_base_dir distribution/leap - -### Slackware -set slackware_mirror mirror.rackspace.com -set slackware_base_dir slackware - -### Ubuntu -set ubuntu_mirror archive.ubuntu.com -set ubuntu_base_dir ubuntu - - +{% 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 }} + +{% endif %} +{% endfor %} ################################################# # determine architectures and enable menu options ################################################# @@ -88,14 +55,11 @@ goto architectures_end :x86_64 goto architectures_end :arm64 -set menu_linux 0 -set menu_linux_arm 1 set menu_freedos 0 set menu_live 0 set menu_security 0 set menu_windows 0 set menu_utils 0 -set menu_utils_arm 1 goto architectures_end :architectures_end goto clouds @@ -129,15 +93,12 @@ goto clouds_end :packet_arm64 set console console=ttyAMA0,115200 set ipxe_disk netboot.xyz-packet-arm64.efi -set menu_linux 0 -set menu_linux_arm 1 set menu_bsd 0 set menu_freedos 0 set menu_live 0 set menu_security 0 set menu_windows 0 set menu_utils 0 -set menu_utils_arm 1 goto clouds_end :clouds_end diff --git a/src/bsd.ipxe b/roles/netbootxyz/templates/menu/bsd.ipxe.j2 similarity index 77% rename from src/bsd.ipxe rename to roles/netbootxyz/templates/menu/bsd.ipxe.j2 index 5de790d16f..3fcaa8cc94 100644 --- a/src/bsd.ipxe +++ b/roles/netbootxyz/templates/menu/bsd.ipxe.j2 @@ -9,10 +9,11 @@ iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} # BSD based systems item --gap BSD Based Operating Systems -item freebsd ${space} FreeBSD -item mirbsd ${space} MirBSD (i386 only) -item openbsd ${space} OpenBSD - +{% for key, value in releases.items() | sort(attribute='1.name') %} +{% if value.enabled is defined and value.menu == "bsd" and value.enabled | bool %} +item {{ key }} ${space} {{ value.name }} +{% endif %} +{% endfor %} # Options item --gap Options: iseq ${arch} x86_64 && set bits 64 || set bits 32 diff --git a/src/centos.ipxe b/roles/netbootxyz/templates/menu/centos.ipxe.j2 similarity index 84% rename from src/centos.ipxe rename to roles/netbootxyz/templates/menu/centos.ipxe.j2 index 2a022a3f3f..9f7ab4c354 100644 --- a/src/centos.ipxe +++ b/roles/netbootxyz/templates/menu/centos.ipxe.j2 @@ -10,16 +10,16 @@ goto ${menu} || :centos clear osversion -set os CentOS +set os {{ releases.centos.name }} menu ${os} - ${arch} - Image Sig Checks: [${img_sigs_enabled}] -item 8.0.1905 ${os} 8.0 -item 8-stream ${os} 8.0 Stream -item 7.7.1908 ${os} 7.7 +{% for item in releases.centos.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} isset ${osversion} || choose osversion || goto linux_menu echo ${cls} set dir ${centos_base_dir}/${osversion}/BaseOS/${arch}/os iseq ${osversion} 7.7.1908 && set dir ${centos_base_dir}/${osversion}/os/${arch} || -set repo http://${centos_mirror}/${dir} +set repo ${centos_mirror}/${dir} goto boottype :boottype @@ -60,8 +60,8 @@ goto boottype :bootos_images imgfree -kernel http://${centos_mirror}/${dir}/images/pxeboot/vmlinuz repo=${repo} ${params} ${console} ${ipparam} initrd=initrd.img -initrd http://${centos_mirror}/${dir}/images/pxeboot/initrd.img +kernel ${centos_mirror}/${dir}/images/pxeboot/vmlinuz repo=${repo} ${params} ${console} ${ipparam} initrd=initrd.img +initrd ${centos_mirror}/${dir}/images/pxeboot/initrd.img echo echo MD5sums: md5sum vmlinuz initrd.img diff --git a/src/coreos.ipxe b/roles/netbootxyz/templates/menu/coreos.ipxe.j2 similarity index 52% rename from src/coreos.ipxe rename to roles/netbootxyz/templates/menu/coreos.ipxe.j2 index f3a8cc2e4d..f723b2cedd 100644 --- a/src/coreos.ipxe +++ b/roles/netbootxyz/templates/menu/coreos.ipxe.j2 @@ -2,31 +2,31 @@ # Fedora CoreOS (Preview) # https://getfedora.org/coreos/ +# https://github.com/coreos/coreos-installer/blob/master/README.md#installing-from-pxe goto ${menu} :coreos -set os Fedora CoreOS +set os {{ releases.coreos.name }} isset ${install_device} || set install_device sda isset ${ignition_url} || set ignition_url skip menu ${os} item --gap ${os}: -item beta ${space} ${os} 30 +{% for item in releases.coreos.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item install_dev ${space} Set install device: ${install_device} item ignition_config ${space} Set ignition config url: ${ignition_url} -choose --default ${menu} menu || goto coreos_exit +choose --default ${core_version} core_version || goto coreos_exit echo ${cls} -goto ${menu} || +goto core_boot || goto coreos_exit -:stable -:beta -:alpha -set release ${menu} -set base_url https://builds.coreos.fedoraproject.org/prod/streams/testing/builds -set build_version 30.20190716.1 -kernel ${base_url}/${build_version}/x86_64/fedora-coreos-${build_version}-installer-kernel nomodeset rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=${install_device} coreos.inst.ignition_url=${ignition_url} ${console} coreos.inst.image_url=${base_url}/${build_version}/x86_64/fedora-coreos-${build_version}-metal.raw.xz initrd=fedora-coreos-${build_version}-installer-initramfs.img -initrd ${base_url}/${build_version}/x86_64/fedora-coreos-${build_version}-installer-initramfs.img +:core_boot +set base_url ${coreos_mirror}/${coreos_base_dir} +set build_version ${core_version} +kernel ${base_url}/${build_version}/x86_64/fedora-coreos-${build_version}-installer-kernel-x86_64 nomodeset rd.neednet=1 coreos.inst.install_dev=${install_device} coreos.inst.ignition_url=${ignition_url} ${console} coreos.inst.stream=testing initrd=fedora-coreos-${build_version}-installer-initramfs.x86_64.img +initrd ${base_url}/${build_version}/x86_64/fedora-coreos-${build_version}-installer-initramfs.x86_64.img boot goto coreos_exit diff --git a/src/debian.ipxe b/roles/netbootxyz/templates/menu/debian.ipxe.j2 similarity index 81% rename from src/debian.ipxe rename to roles/netbootxyz/templates/menu/debian.ipxe.j2 index ac10852f56..fca4823488 100644 --- a/src/debian.ipxe +++ b/roles/netbootxyz/templates/menu/debian.ipxe.j2 @@ -11,12 +11,13 @@ clear debian_version clear older_release menu ${os} - ${arch_a} - Image Sig Checks: [${img_sigs_enabled}] item --gap Latest Releases -item buster ${space} ${os} 10.0 (buster) -item stretch ${space} ${os} 9.0 (stretch) -item jessie ${space} ${os} 8.0 (jessie) +{% for item in releases.debian.versions.stable %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item --gap Testing Releases -item bullseye ${space} ${os} bullseye (testing) -item sid ${space} ${os} sid (unstable) +{% for item in releases.debian.versions.testing %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item --gap Older Releases item older_release ${space} Set release codename... choose debian_version || goto debian_exit @@ -25,7 +26,7 @@ goto mirrorcfg :older_release set older_release true -set debian_mirror archive.debian.org +set debian_mirror {{ releases.debian.archive_mirror }} echo Setting mirror to ${debian_mirror} clear debian_version echo -n Please set enter code name of release: ${} && read debian_version @@ -33,6 +34,7 @@ set dir ${debian_base_dir}/dists/${debian_version}/main/installer-${arch_a}/curr goto deb_boot_type :mirrorcfg +set debian_mirror ${debian_mirror} set mirrorcfg mirror/suite=${debian_version} set dir ${debian_base_dir}/dists/${debian_version}/main/installer-${arch_a}/current/images/netboot/ goto deb_boot_type @@ -75,8 +77,8 @@ goto deb_boot :deb_boot imgfree echo Boot parameters: ${install_params} -- quiet ${params} -kernel http://${debian_mirror}/${dir}/linux ${install_params} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz -initrd http://${debian_mirror}/${dir}/initrd.gz +kernel ${debian_mirror}/${dir}/linux ${install_params} ${netcfg} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz +initrd ${debian_mirror}/${dir}/initrd.gz echo echo MD5sums: md5sum linux initrd.gz diff --git a/src/devuan.ipxe b/roles/netbootxyz/templates/menu/devuan.ipxe.j2 similarity index 82% rename from src/devuan.ipxe rename to roles/netbootxyz/templates/menu/devuan.ipxe.j2 index 7f5325488c..cc1a4a53f3 100644 --- a/src/devuan.ipxe +++ b/roles/netbootxyz/templates/menu/devuan.ipxe.j2 @@ -11,10 +11,13 @@ clear devuan_version clear older_release menu ${os} - ${arch_a} - Image Sig Checks: [${img_sigs_enabled}] item --gap Latest Releases -item ascii ${space} ${os} ascii (stable) -item jessie ${space} ${os} 1.0 (jessie) +{% for item in releases.devuan.versions.stable %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item --gap Testing Releases -item beowulf ${space} ${os} beowulf (testing) +{% for item in releases.devuan.versions.testing %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose devuan_version || goto devuan_exit goto mirrorcfg @@ -61,8 +64,8 @@ goto devuan_boot :devuan_boot imgfree echo Boot parameters: ${install_params} -- quiet ${params} -kernel http://${devuan_mirror}/${dir}/linux ${install_params} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz -initrd http://${devuan_mirror}/${dir}/initrd.gz +kernel ${devuan_mirror}/${dir}/linux ${install_params} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz +initrd ${devuan_mirror}/${dir}/initrd.gz echo echo MD5sums: md5sum linux initrd.gz diff --git a/src/fedora.ipxe b/roles/netbootxyz/templates/menu/fedora.ipxe.j2 similarity index 76% rename from src/fedora.ipxe rename to roles/netbootxyz/templates/menu/fedora.ipxe.j2 index d22e7ba6db..79935f57bb 100644 --- a/src/fedora.ipxe +++ b/roles/netbootxyz/templates/menu/fedora.ipxe.j2 @@ -12,12 +12,12 @@ goto ${menu} || clear osversion clear sku_type clear ova -set os Fedora -menu Fedora - ${arch} - Image Sig Checks: [${img_sigs_enabled}] +set os {{ releases.fedora.name }} +menu ${os} - ${arch} - Image Sig Checks: [${img_sigs_enabled}] item --gap Latest Releases -item 31 ${space} ${os} 31 -item 30 ${space} ${os} 30 -item 29 ${space} ${os} 29 +{% for item in releases.fedora.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} iseq ${arch} x86_64 && item rawhide ${space} ${os} rawhide || isset ${osversion} || choose osversion || goto linux_menu set ova ${os} ${osversion} @@ -27,13 +27,10 @@ goto product_sku menu ${os} ${arch} sku type item Everything ${ova} Everything item Server ${ova} Server -item Workstation ${ova} Workstation -item Atomic ${ova} Atomic iseq ${arch} x86_64 && item Silverblue ${ova} Silverblue || isset ${sku_type} || choose sku_type || goto fedora set dir ${fedora_base_dir}/releases/${osversion}/${sku_type}/${arch}/os iseq ${osversion} rawhide && set dir ${fedora_base_dir}/development/${osversion}/${sku_type}/${arch}/os || -iseq ${sku_type} Atomic && iseq ${osversion} 29 && set dir fedora-alt/atomic/stable/Fedora-Atomic-29-20181025.1/AtomicHost/x86_64/os || set ova ${ova} ${sku_type} echo ${cls} goto boottype @@ -60,8 +57,8 @@ goto boot :boot imgfree -kernel http://${fedora_mirror}/${dir}/images/pxeboot/vmlinuz repo=http://${fedora_mirror}/${dir} ${params} ${console} ${ipparam} initrd=initrd.img -initrd http://${fedora_mirror}/${dir}/images/pxeboot/initrd.img +kernel ${fedora_mirror}/${dir}/images/pxeboot/vmlinuz repo=${fedora_mirror}/${dir} ${params} ${console} ${ipparam} initrd=initrd.img +initrd ${fedora_mirror}/${dir}/images/pxeboot/initrd.img echo echo MD5sums: md5sum vmlinuz initrd.img diff --git a/src/flatcar.ipxe b/roles/netbootxyz/templates/menu/flatcar.ipxe.j2 similarity index 84% rename from src/flatcar.ipxe rename to roles/netbootxyz/templates/menu/flatcar.ipxe.j2 index ce8b201b9b..f3dfd1ef3f 100644 --- a/src/flatcar.ipxe +++ b/roles/netbootxyz/templates/menu/flatcar.ipxe.j2 @@ -10,13 +10,12 @@ goto ${menu} :flatcar -set os Flatcar Linux +set os {{ releases.flatcar.name }} 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 --gap ${os} +{% for item in releases.flatcar.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item ignition_config ${space} Set flatcar.config.url: ${flatcar.config.url} choose --default ${menu} menu || goto flatcar_exit echo ${cls} diff --git a/src/freebsd.ipxe b/roles/netbootxyz/templates/menu/freebsd.ipxe.j2 similarity index 56% rename from src/freebsd.ipxe rename to roles/netbootxyz/templates/menu/freebsd.ipxe.j2 index 2af3b38ae7..80fd8cae76 100644 --- a/src/freebsd.ipxe +++ b/roles/netbootxyz/templates/menu/freebsd.ipxe.j2 @@ -4,19 +4,16 @@ # http://www.freebsd.org :freebsd_menu -menu Please pick a FreeBSD version -item 12.0 FreeBSD 12.0 -item 11.2 FreeBSD 11.2 -item 11.1 FreeBSD 11.1 -item 11.0 FreeBSD 11.0 -item 10.4 FreeBSD 10.4 +set os {{ releases.freebsd.name }} +menu ${os} +{% for item in releases.freebsd.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose ver || goto freebsd_exit -iseq ${ver} 12.0 && set image_ver 12.0-RELEASE || -iseq ${ver} 11.2 && set image_ver 11.2-RELEASE || -iseq ${ver} 11.1 && set image_ver 11.1-RELEASE || -iseq ${ver} 11.0 && set image_ver 11.0-RELEASE || -iseq ${ver} 10.4 && set image_ver 10.4-RELEASE || +{% for item in releases.freebsd.versions %} +iseq ${ver} {{ item.code_name }} && set image_ver {{ item.code_name }}-RELEASE || +{% endfor %} iseq ${arch} x86_64 && goto freebsd_x64 || set freebsd_arch i386 @@ -27,11 +24,9 @@ set freebsd_arch amd64 goto boot_freebsd :boot_freebsd -iseq ${ver} 12.0 && set image_subdir 12/${freebsd_arch} || -iseq ${ver} 11.2 && set image_subdir 11/${freebsd_arch} || -iseq ${ver} 11.1 && set image_subdir 11/${freebsd_arch} || -iseq ${ver} 11.0 && set image_subdir 11/${freebsd_arch} || -iseq ${ver} 10.4 && set image_subdir 10/${freebsd_arch} || +{% for item in releases.freebsd.versions %} +iseq ${ver} {{ item.code_name }} && set image_subdir {{ item.image_subdir }}/${freebsd_arch} || +{% endfor %} set src https://mfsbsd.vx.sk/files/images/${image_subdir}/mfsbsd-${image_ver}-${freebsd_arch}.img imgfree echo This loads an mfsbsd installer (http://mfsbsd.vx.sk/). diff --git a/src/freedos.ipxe b/roles/netbootxyz/templates/menu/freedos.ipxe.j2 similarity index 51% rename from src/freedos.ipxe rename to roles/netbootxyz/templates/menu/freedos.ipxe.j2 index 3d3bed95dd..9a837c4ac6 100644 --- a/src/freedos.ipxe +++ b/roles/netbootxyz/templates/menu/freedos.ipxe.j2 @@ -4,10 +4,12 @@ # http://www.freedos.org :freedos_menu -menu FreeDOS -item --gap FreeDOS -item FD12FULL ${space} FreeDOS 1.2 Full Installer -item FD12LITE ${space} FreeDOS 1.2 Lite Installer +set os {{ releases.freedos.name }} +menu ${os} +item --gap ${os} +{% for item in releases.freedos.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose freedos_version || goto freedos_exit echo ${cls} goto freedos_install || goto freedos_exit @@ -15,7 +17,7 @@ goto freedos_install || goto freedos_exit :freedos_install imgfree kernel ${memdisk} -initrd http://www.freedos.org/download/download/${freedos_version}.zip +initrd ${freedos_mirror}/${freedos_base_dir}/${freedos_version}.zip boot :freedos_exit diff --git a/src/gentoo.ipxe b/roles/netbootxyz/templates/menu/gentoo.ipxe.j2 similarity index 84% rename from src/gentoo.ipxe rename to roles/netbootxyz/templates/menu/gentoo.ipxe.j2 index df51ca2901..fcc245b7fe 100644 --- a/src/gentoo.ipxe +++ b/roles/netbootxyz/templates/menu/gentoo.ipxe.j2 @@ -10,9 +10,11 @@ goto ${menu} :gentoo -set os gentoo -menu Gentoo ${arch_a} -item 20160204 Gentoo Minimal CD 20160204 (amd64) +set os {{ releases.gentoo.name }} +menu ${os} ${arch_a} +{% for item in releases.gentoo.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose gentoo_version || goto gentoo_exit goto ${gentoo_version} diff --git a/src/ipfire.ipxe b/roles/netbootxyz/templates/menu/ipfire.ipxe.j2 similarity index 66% rename from src/ipfire.ipxe rename to roles/netbootxyz/templates/menu/ipfire.ipxe.j2 index 2be7877a2f..64982b09fe 100644 --- a/src/ipfire.ipxe +++ b/roles/netbootxyz/templates/menu/ipfire.ipxe.j2 @@ -7,19 +7,20 @@ goto ${menu} || :ipfire clear osversion -set os IPFire +set os {{ releases.ipfire.name }} menu ${os} - Image Sig Checks: [${img_sigs_enabled}] -item 2.21-core126 ${space} ${os} 2.21 Core 126 +{% for item in releases.ipfire.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} isset ${osversion} || choose osversion || goto linux_menu echo ${cls} -set ipfire_mirror downloads.ipfire.org -set dir releases/ipfire-2.x/${osversion}/images/x86_64 +set dir ${ipfire_base_dir}/${osversion}/images/x86_64 goto ipfire_images :ipfire_images imgfree -kernel https://${ipfire_mirror}/${dir}/vmlinuz ${console} vga=791 initrd=instroot -initrd https://${ipfire_mirror}/${dir}/instroot +kernel ${ipfire_mirror}/${dir}/vmlinuz ${console} vga=791 initrd=instroot +initrd ${ipfire_mirror}/${dir}/instroot echo echo MD5sums: md5sum vmlinuz instroot diff --git a/src/kali.ipxe b/roles/netbootxyz/templates/menu/kali.ipxe.j2 similarity index 52% rename from src/kali.ipxe rename to roles/netbootxyz/templates/menu/kali.ipxe.j2 index aa90cda264..c35ee31485 100644 --- a/src/kali.ipxe +++ b/roles/netbootxyz/templates/menu/kali.ipxe.j2 @@ -6,13 +6,15 @@ goto ${menu} || :kali -set os Kali Linux -menu ${os} - ${arch_a} -item rolling ${os} Rolling Edition (2019.4) +set os {{ releases.kali.name }} +menu ${os} - ${arch_a} +{% for item in releases.kali.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose version || goto kali_exit :deb_boot_type -set dir kali/dists/kali-${version}/main/installer-${arch_a}/current/images/netboot +set dir ${kali_base_dir}/dists/kali-${version}/main/installer-${arch_a}/current/images/netboot menu ${os} boot parameters item text ${os} text based install choose --default ${type} type || goto kali @@ -26,8 +28,8 @@ goto deb_boot :deb_boot imgfree -kernel http://http.kali.org/${dir}/linux vga=788 ${console} -- quiet initrd=initrd.gz -initrd http://http.kali.org/${dir}/initrd.gz +kernel ${kali_mirror}/${dir}/linux vga=788 ${console} -- quiet initrd=initrd.gz +initrd ${kali_mirror}/${dir}/initrd.gz echo echo MD5sums: md5sum linux initrd.gz diff --git a/roles/netbootxyz/templates/menu/linux.ipxe.j2 b/roles/netbootxyz/templates/menu/linux.ipxe.j2 new file mode 100644 index 0000000000..3e625a4138 --- /dev/null +++ b/roles/netbootxyz/templates/menu/linux.ipxe.j2 @@ -0,0 +1,29 @@ +#!ipxe + +goto ${menu} || + +:linux_menu +menu Linux Installers - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap Linux Distros: +{% for key, value in releases.items() | sort(attribute='1.name') %} +{% if value.enabled is defined and value.menu == "linux" and value.enabled | bool %} +item {{ key }} ${space} {{ value.name }} +{% endif %} +{% endfor %} +choose menu || goto linux_exit +echo ${cls} +goto ${menu} || +iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu + +:verify_sigs +imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error +goto change_menu + +:change_menu +chain ${menu}.ipxe || goto error +goto linux_menu + +:linux_exit +clear menu +exit 0 diff --git a/src/live-backbox.ipxe b/roles/netbootxyz/templates/menu/live-backbox.ipxe.j2 similarity index 50% rename from src/live-backbox.ipxe rename to roles/netbootxyz/templates/menu/live-backbox.ipxe.j2 index e63f7d3577..987828803f 100644 --- a/src/live-backbox.ipxe +++ b/roles/netbootxyz/templates/menu/live-backbox.ipxe.j2 @@ -11,10 +11,19 @@ item 6 ${space} ${os} 6 choose live_version || goto live_exit goto ${live_version} -:6 -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/6-b44ce5ee/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 6-boot +{% for key, value in endpoints.items() | sort %} +{% if value.os == "BackBox" 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 %} :6-boot imgfree diff --git a/roles/netbootxyz/templates/menu/live-debian.ipxe.j2 b/roles/netbootxyz/templates/menu/live-debian.ipxe.j2 new file mode 100644 index 0000000000..35c403f331 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-debian.ipxe.j2 @@ -0,0 +1,59 @@ +#!ipxe + +goto ${menu} || + +:live_menu +set os Debian Live +menu ${os} - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap ${os} Versions +item buster ${space} ${os} 10 (buster) +choose live_version || goto live_exit +menu ${os} ${live_version} +item --gap ${os} Flavors +goto ${live_version} + +:stretch +{% for key, value in endpoints.items() | sort %} +{% if value.os == "debian" and 'squash' in key and value.version == "9" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% endif %} +{% endfor %} +goto flavor_select + +:buster +{% for key, value in endpoints.items() | sort %} +{% if value.os == "debian" and 'squash' in key and value.version == "10" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% 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 == "debian" 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 }} +goto boot +{% endif %} +{% endfor %} +{% endif %} +{% endfor %} + +:boot +imgfree +kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd +initrd ${kernel_url}initrd +boot + +:live_exit +clear menu +exit 0 diff --git a/roles/netbootxyz/templates/menu/live-elementary.ipxe.j2 b/roles/netbootxyz/templates/menu/live-elementary.ipxe.j2 new file mode 100644 index 0000000000..fc4a2b491b --- /dev/null +++ b/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 (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 diff --git a/roles/netbootxyz/templates/menu/live-fedora.ipxe.j2 b/roles/netbootxyz/templates/menu/live-fedora.ipxe.j2 new file mode 100644 index 0000000000..b528e18aa6 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-fedora.ipxe.j2 @@ -0,0 +1,49 @@ +#!ipxe + +isset ${dhcp-server} && set ipparam ip=dhcp || set ipparam ip=${ip}::${gateway}:${netmask}:::none nameserver=${dns} +set ipparam BOOTIF=${netX/mac} ${ipparam} + +goto ${menu} || + +:live_menu +set os Fedora Live +menu ${os} - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap ${os} Versions +item 31 ${space} ${os} 31 +choose live_version || goto live_exit +menu ${os} ${live_version} +item --gap ${os} Flavors +goto ${live_version} + +:31 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "fedora" and value.version == 31 %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% 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 == "fedora" %} +:{{ key }} +set live_url ${live_endpoint}{{ value.path }} +goto boot +{% endif %} +{% endfor %} + +:boot +imgfree +kernel ${live_url}vmlinuz ${ipparam} root=live:${live_url}squashfs.img ro rd.live.image rd.lvm=0 rd.luks=0 rd.md=0 rd.dm=0 initrd=initrd +initrd ${live_url}initrd +boot + +:live_exit +clear menu +exit 0 + diff --git a/roles/netbootxyz/templates/menu/live-kali.ipxe.j2 b/roles/netbootxyz/templates/menu/live-kali.ipxe.j2 new file mode 100644 index 0000000000..5c3806b057 --- /dev/null +++ b/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 + diff --git a/roles/netbootxyz/templates/menu/live-manjaro.ipxe.j2 b/roles/netbootxyz/templates/menu/live-manjaro.ipxe.j2 new file mode 100644 index 0000000000..04f43c9cc1 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-manjaro.ipxe.j2 @@ -0,0 +1,44 @@ +#!ipxe + +goto ${menu} || + +:live_menu +menu Manjaro Live - Current Arch [ ${arch} ] +item --gap Currently during boot you need to press ctrl+d/ctrl+c +item --gap repeatedly when init hangs on starting a download +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} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 driver=free tz=UTC lang=en_US keytable=us systemdshow_status=1 apparmor=1 security=apparmor +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 + diff --git a/roles/netbootxyz/templates/menu/live-mint.ipxe.j2 b/roles/netbootxyz/templates/menu/live-mint.ipxe.j2 new file mode 100644 index 0000000000..e5b8bb3fd5 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-mint.ipxe.j2 @@ -0,0 +1,52 @@ +#!ipxe + +goto ${menu} || + +:live_menu +set os Mint Live +menu ${os} - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap ${os} Versions +item 19 ${space} ${os} 19 +choose live_version || goto live_exit +menu ${os} ${live_version} +item --gap ${os} Flavors +goto ${live_version} + +:19 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "mint" and 'squash' in key and value.version == "19" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% 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 == "mint" 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 {{ value.version }}-boot +{% endif %} +{% endfor %} + +:19-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 + diff --git a/src/live-peppermint.ipxe b/roles/netbootxyz/templates/menu/live-peppermint.ipxe.j2 similarity index 50% rename from src/live-peppermint.ipxe rename to roles/netbootxyz/templates/menu/live-peppermint.ipxe.j2 index c3f5918d9e..99400b0718 100644 --- a/src/live-peppermint.ipxe +++ b/roles/netbootxyz/templates/menu/live-peppermint.ipxe.j2 @@ -11,10 +11,19 @@ item 10 ${space} ${os} 10 choose live_version || goto live_exit goto ${live_version} -:10 -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/10-3bce362b/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 10-boot +{% for key, value in endpoints.items() | sort %} +{% if value.os == "peppermint" 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 %} :10-boot imgfree diff --git a/src/live-popos.ipxe b/roles/netbootxyz/templates/menu/live-popos.ipxe.j2 similarity index 59% rename from src/live-popos.ipxe rename to roles/netbootxyz/templates/menu/live-popos.ipxe.j2 index 67ff281fe1..9098baa4fa 100644 --- a/src/live-popos.ipxe +++ b/roles/netbootxyz/templates/menu/live-popos.ipxe.j2 @@ -12,14 +12,19 @@ item 19.10 ${space} ${os} 19.10 choose live_version || goto live_exit goto ${live_version} -:18.04 -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/57-b1e9a9cc/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:19.10 -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/10-317de200/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot +{% 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 diff --git a/roles/netbootxyz/templates/menu/live-q4os.ipxe.j2 b/roles/netbootxyz/templates/menu/live-q4os.ipxe.j2 new file mode 100644 index 0000000000..579576e119 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-q4os.ipxe.j2 @@ -0,0 +1,52 @@ +#!ipxe + +goto ${menu} || + +:live_menu +set os Q4OS Live +menu ${os} - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap ${os} Versions +item 3.9 ${space} ${os} 3.9 +choose live_version || goto live_exit +menu ${os} ${live_version} +item --gap ${os} Flavors +goto ${live_version} + +:3.9 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "Q4OS" and 'squash' in key and value.version == "3.9" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% 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 == "Q4OS" 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 {{ value.version }}-boot +{% endif %} +{% endfor %} + +:3.9-boot +imgfree +kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd +initrd ${kernel_url}initrd +boot + +:live_exit +clear menu +exit 0 + diff --git a/src/live-tails.ipxe b/roles/netbootxyz/templates/menu/live-tails.ipxe.j2 similarity index 58% rename from src/live-tails.ipxe rename to roles/netbootxyz/templates/menu/live-tails.ipxe.j2 index 2954952193..aab8de04e4 100644 --- a/src/live-tails.ipxe +++ b/roles/netbootxyz/templates/menu/live-tails.ipxe.j2 @@ -5,16 +5,26 @@ goto ${menu} || :live_menu set os Tails menu ${os} - Current Arch [ ${arch} ] +item --gap Currently networking is not functional for this live image 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} -:tails-4.0-default-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/4.0-41d3900f/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.2-1-fbccf8d7/ +{% 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 diff --git a/roles/netbootxyz/templates/menu/live-ubuntu.ipxe.j2 b/roles/netbootxyz/templates/menu/live-ubuntu.ipxe.j2 new file mode 100644 index 0000000000..23df6141d5 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-ubuntu.ipxe.j2 @@ -0,0 +1,67 @@ +#!ipxe + +goto ${menu} || + +:live_menu +set os Ubuntu Live +menu ${os} - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap ${os} Versions +item bionic ${space} ${os} 18.04 +item eoan ${space} ${os} 19.10 +choose live_version || goto live_exit +menu ${os} ${live_version} +item --gap ${os} Flavors +goto ${live_version} + +:bionic +{% for key, value in endpoints.items() | sort %} +{% if value.os == "ubuntu" and 'squash' in key and value.version == "18.04" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% endif %} +{% endfor %} +goto flavor_select + +:eoan +{% for key, value in endpoints.items() | sort %} +{% if value.os == "ubuntu" and 'squash' in key and value.version == "19.10" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% 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 == "ubuntu" 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 {{ 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 + diff --git a/src/live-voyager.ipxe b/roles/netbootxyz/templates/menu/live-voyager.ipxe.j2 similarity index 56% rename from src/live-voyager.ipxe rename to roles/netbootxyz/templates/menu/live-voyager.ipxe.j2 index a5f13c3c1e..b19bfa3532 100644 --- a/src/live-voyager.ipxe +++ b/roles/netbootxyz/templates/menu/live-voyager.ipxe.j2 @@ -11,26 +11,27 @@ item bionic ${space} ${os} Bionic item buster ${space} ${os} Buster item eoan ${space} ${os} Eoan choose live_version || goto live_exit +goto ${live_version} :bionic -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/bionic-c535c643/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ +set squash_url ${live_endpoint}{{ endpoints["voyager-bionic-squash"].path }}filesystem.squashfs +set kernel_url ${live_endpoint}{{ endpoints["ubuntu-18.04-live-kernel"].path }} imgfree kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=http fetch=${squash_url} initrd=initrd initrd ${kernel_url}initrd boot :buster -set squash_url ${live_endpoint}/debian-squash/releases/download/buster-1e606829/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ +set squash_url ${live_endpoint}{{ endpoints["voyager-buster-squash"].path }}filesystem.squashfs +set kernel_url ${live_endpoint}{{ endpoints["debian-10-live-kernel"].path }} imgfree kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd initrd ${kernel_url}initrd boot :eoan -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/eoan-5a6a8fab/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ +set squash_url ${live_endpoint}{{ endpoints["voyager-eoan-squash"].path }}filesystem.squashfs +set kernel_url ${live_endpoint}{{ endpoints["ubuntu-19.10-live-kernel"].path }} imgfree kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} initrd=initrd initrd ${kernel_url}initrd diff --git a/roles/netbootxyz/templates/menu/live-zorin.ipxe.j2 b/roles/netbootxyz/templates/menu/live-zorin.ipxe.j2 new file mode 100644 index 0000000000..5df5b7ca15 --- /dev/null +++ b/roles/netbootxyz/templates/menu/live-zorin.ipxe.j2 @@ -0,0 +1,52 @@ +#!ipxe + +goto ${menu} || + +:live_menu +set os Zorin Live +menu ${os} - Current Arch [ ${arch} ] +iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} +item --gap ${os} Versions +item 15 ${space} ${os} 15 +choose live_version || goto live_exit +menu ${os} ${live_version} +item --gap ${os} Flavors +goto ${live_version} + +:15 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "zorin" and 'squash' in key and value.version == "15" %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% 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 == "zorin" 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 {{ value.version }}-boot +{% endif %} +{% endfor %} + +:15-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 + diff --git a/src/live.ipxe b/roles/netbootxyz/templates/menu/live.ipxe.j2 similarity index 96% rename from src/live.ipxe rename to roles/netbootxyz/templates/menu/live.ipxe.j2 index d868c4df44..c2d485e9b0 100644 --- a/src/live.ipxe +++ b/roles/netbootxyz/templates/menu/live.ipxe.j2 @@ -16,6 +16,7 @@ item live-manjaro ${space} Manjaro item live-mint ${space} Mint item live-peppermint ${space} Peppermint item live-popos ${space} Pop OS +item live-tails ${space} Tails item live-ubuntu ${space} Ubuntu item live-voyager ${space} Voyager item live-zorin ${space} Zorin OS diff --git a/src/mageia.ipxe b/roles/netbootxyz/templates/menu/mageia.ipxe.j2 similarity index 78% rename from src/mageia.ipxe rename to roles/netbootxyz/templates/menu/mageia.ipxe.j2 index 009c815f38..1dd09d72ac 100644 --- a/src/mageia.ipxe +++ b/roles/netbootxyz/templates/menu/mageia.ipxe.j2 @@ -9,10 +9,11 @@ isset ${dhcp-server} && set network dhcp || set network static,ip:${ip},netmask: goto ${menu} || :mageia -set os Mageia -menu Mageia - ${arch} - Image Sig Checks: [${img_sigs_enabled}] -item 7.1 ${os} 7.1 -item cauldron ${os} cauldron +set os {{ releases.mageia.name }} +menu ${os} - ${arch} - Image Sig Checks: [${img_sigs_enabled}] +{% for item in releases.mageia.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose version || goto mageia_exit goto mageia_boot @@ -21,8 +22,8 @@ set dir ${mageia_base_dir}/distrib/${version}/x86_64 && set dir2 isolinux/x86_64 iseq ${arch} i386 && set dir ${mageia_base_dir}/distrib/${version}/i586 && set dir2 isolinux/i386 || set automatic method:http,network:${network},server:${mageia_mirror},directory:/${dir} imgfree -kernel http://${mageia_mirror}/${dir}/${dir2}/vmlinuz -initrd http://${mageia_mirror}/${dir}/${dir2}/all.rdz +kernel ${mageia_mirror}/${dir}/${dir2}/vmlinuz +initrd ${mageia_mirror}/${dir}/${dir2}/all.rdz imgargs vmlinuz automatic=${automatic} vga=788 splash=silent ${console} initrd=all.rdz echo echo MD5sums: diff --git a/src/menu.ipxe b/roles/netbootxyz/templates/menu/menu.ipxe.j2 similarity index 72% rename from src/menu.ipxe rename to roles/netbootxyz/templates/menu/menu.ipxe.j2 index c232b38521..60108a23ea 100644 --- a/src/menu.ipxe +++ b/roles/netbootxyz/templates/menu/menu.ipxe.j2 @@ -2,26 +2,29 @@ :start chain --autofree boot.cfg || +ntp {{ time_server }} || iseq ${cls} serial && goto ignore_cls || set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J" set cls ${cls:string} :ignore_cls +{% if 'x' in boot_version %} :version_check -set latest_version 1.04 +set latest_version {{ boot_version }} echo ${cls} iseq ${version} ${latest_version} && goto version_up2date || echo -echo Updated version of netboot.xyz is available: +echo Updated version of {{ site_name }} is available: echo echo Running version.....${version} echo Updated version.....${latest_version} echo -echo Please download the latest version from netboot.xyz. +echo Please download the latest version from {{ site_name }}. echo echo Attempting to chain to latest version... chain --autofree http://${boot_domain}/ipxe/${ipxe_disk} || :version_up2date +{% endif %} isset ${arch} && goto skip_arch_detect || cpuid --ext 29 && set arch x86_64 || set arch i386 @@ -40,27 +43,33 @@ menu ${site_name} item --gap Default: item local ${space} Boot from local hdd item --gap Distributions: -iseq ${menu_linux} 1 && item linux ${space} Linux Installs || -iseq ${menu_linux_arm} 1 && item linux-arm ${space} Linux Installs || -iseq ${menu_live} 1 && item live ${space} Live CDs (experimental) || +iseq ${menu_linux} 1 && item linux ${space} Linux Network Installs || +iseq ${menu_live} 1 && item live ${space} Live CDs || iseq ${menu_bsd} 1 && item bsd ${space} BSD Installs || iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS || iseq ${menu_security} 1 && item security ${space} Security Related || iseq ${menu_windows} 1 && item windows ${space} Windows || item --gap Tools: -iseq ${menu_utils} 1 && item utils ${space} Utilities || -iseq ${menu_utils_arm} 1 && item utils-arm ${space} Utilities || +iseq ${menu_utils} 1 && item utils-${platform} ${space} Utilities || iseq ${arch} x86_64 && set bits 64 || set bits 32 item changebits ${space} Architecture: ${arch} (${bits}bit) item shell ${space} iPXE shell item news ${space} netboot.xyz news item netinfo ${space} Network card info +{% if sigs_menu | bool %} item --gap Signature Checks: item sig_check ${space} netboot.xyz [ enabled: ${sigs_enabled} ] item img_sigs_check ${space} Images [ enabled: ${img_sigs_enabled} ] -isset ${github_user} && item --gap Custom Menu: || -isset ${github_user} && item nbxyz-custom ${space} ${github_user}'s Custom Menu || -isset ${menu} && set timeout 0 || set timeout 300000 +{% endif %} +{% if custom_github_menus | bool %} +isset ${github_user} && item --gap Custom Github Menu: || +isset ${github_user} && item custom-github ${space} ${github_user}'s Custom Menu || +{% endif %} +{% if custom_generate_menus | bool %} +item --gap Custom User Menus: || +item custom-user ${space} Custom User Menus +{% endif %} +isset ${menu} && set timeout 0 || set timeout {{ boot_timeout }} choose --timeout ${timeout} --default ${menu} menu || goto local echo ${cls} goto ${menu} || @@ -101,6 +110,15 @@ goto main_menu iseq ${img_sigs_enabled} true && set img_sigs_enabled false || set img_sigs_enabled true goto main_menu -:nbxyz-custom +:news +chain https://boot.netboot.xyz/news.ipxe || +chain news.ipxe || goto error +goto main_menu + +:custom-github chain https://raw.githubusercontent.com/${github_user}/netboot.xyz-custom/master/custom.ipxe || goto error goto main_menu + +:custom-user +chain custom/custom.ipxe +goto main_menu diff --git a/src/news.ipxe b/roles/netbootxyz/templates/menu/news.ipxe.j2 similarity index 100% rename from src/news.ipxe rename to roles/netbootxyz/templates/menu/news.ipxe.j2 diff --git a/roles/netbootxyz/templates/menu/nixos.ipxe.j2 b/roles/netbootxyz/templates/menu/nixos.ipxe.j2 new file mode 100644 index 0000000000..78d57b2d4a --- /dev/null +++ b/roles/netbootxyz/templates/menu/nixos.ipxe.j2 @@ -0,0 +1,21 @@ +#!ipxe + +# NixOS +# https://nixos.org/ + +set os {{ releases.nixos.name }} +menu ${os} +item --gap Official Releases +{% for item in releases.nixos.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} +choose version || goto nixos_exit +{% for item in releases.nixos.versions %} +iseq ${version} {{ item.code_name }} && set link https://hydra.nixos.org/job/nixos/release-{{ item.code_name }}/nixos.netboot.x86_64-linux/latest-finished/download/netboot.ipxe || +{% endfor %} +chain ${link} +goto nixos_exit + +:nixos_exit +clear menu +exit 0 diff --git a/roles/netbootxyz/templates/menu/openbsd.ipxe.j2 b/roles/netbootxyz/templates/menu/openbsd.ipxe.j2 new file mode 100644 index 0000000000..00697a134a --- /dev/null +++ b/roles/netbootxyz/templates/menu/openbsd.ipxe.j2 @@ -0,0 +1,33 @@ +#!ipxe + +# OpenBSD Operating System +# http://www.openbsd.org + +:openbsd_menu +set os {{ releases.openbsd.name }} +menu ${os} +{% for item in releases.openbsd.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} +choose ver || goto openbsd_exit +{% for item in releases.openbsd.versions %} +iseq ${ver} {{ item.code_name }} && set image_ver {{ item.image_ver }} || +{% endfor %} +iseq ${arch} x86_64 && goto openbsd_x64 || +set openbsd_arch i386 +goto boot_openbsd + +:openbsd_x64 +set openbsd_arch amd64 +goto boot_openbsd + +:boot_openbsd +set src ${openbsd_mirror}/${openbsd_base_dir}/${ver}/${openbsd_arch}/cd${image_ver}.iso +imgfree +initrd ${src} +chain ${memdisk} iso raw +exit + +:openbsd_exit +clear menu +exit 0 \ No newline at end of file diff --git a/src/opensuse.ipxe b/roles/netbootxyz/templates/menu/opensuse.ipxe.j2 similarity index 88% rename from src/opensuse.ipxe rename to roles/netbootxyz/templates/menu/opensuse.ipxe.j2 index b8ac79082d..e41ac0b1ff 100644 --- a/src/opensuse.ipxe +++ b/roles/netbootxyz/templates/menu/opensuse.ipxe.j2 @@ -58,18 +58,17 @@ set netsetup ${netsetup} BOOTIF=${netX/mac} set distro opensuse menu openSUSE - ${arch} - Image Sig Checks: [${img_sigs_enabled}] -item 15.1 openSUSE Leap 15.1 -item 15.0 openSUSE Leap 15.0 -item 42.3 openSUSE Leap 42.3 -item tumbleweed openSUSE tumbleweed +{% for item in releases.opensuse.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose version || goto opensuse_exit set dir ${opensuse_base_dir}/${version}/repo/oss iseq ${version} tumbleweed && set dir ${version}/repo/oss || imgfree -kernel http://${opensuse_mirror}/${dir}/boot/x86_64/loader/linux -initrd http://${opensuse_mirror}/${dir}/boot/x86_64/loader/initrd -imgargs linux ${netsetup} install=http://${opensuse_mirror}/${dir} ${params} ${console} initrd=initrd +kernel ${opensuse_mirror}/${dir}/boot/x86_64/loader/linux +initrd ${opensuse_mirror}/${dir}/boot/x86_64/loader/initrd +imgargs linux ${netsetup} install=${opensuse_mirror}/${dir} ${params} ${console} initrd=initrd echo echo MD5sums: md5sum linux initrd diff --git a/src/parrotsec.ipxe b/roles/netbootxyz/templates/menu/parrotsec.ipxe.j2 similarity index 75% rename from src/parrotsec.ipxe rename to roles/netbootxyz/templates/menu/parrotsec.ipxe.j2 index c175f937cb..a375626797 100644 --- a/src/parrotsec.ipxe +++ b/roles/netbootxyz/templates/menu/parrotsec.ipxe.j2 @@ -6,10 +6,12 @@ goto ${menu} :parrotsec -set os Parrot Security +set os {{ releases.parrotsec.name }} menu ${os} Installers item --gap Official Releases -item stable ${space} ${os} Stable Netinstall +{% for item in releases.parrotsec.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose parrotsec_version || goto parrotsec_exit goto parrotsec_boot @@ -22,4 +24,4 @@ goto parrotsec_exit :parrotsec_exit clear menu -exit 0 +exit 0 \ No newline at end of file diff --git a/roles/netbootxyz/templates/menu/rancheros.ipxe.j2 b/roles/netbootxyz/templates/menu/rancheros.ipxe.j2 new file mode 100644 index 0000000000..2bb2139d5c --- /dev/null +++ b/roles/netbootxyz/templates/menu/rancheros.ipxe.j2 @@ -0,0 +1,31 @@ +#!ipxe + +# RancherOS +# http://rancher.com/rancher-os/ + +:rancheros_menu +set os {{ releases.rancheros.name }} +set url ${rancheros_mirror} +menu ${os} +{% for item in releases.rancheros.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} +choose version || goto rancheros_exit +goto ${version} + +:latest +echo ${cls} +set folder ${rancheros_base_dir} +goto boot + +:boot +echo Login in with username: rancher, password: rancher +echo To install: ros install -d /dev/sda1 +imgfree +kernel ${url}/${folder}/vmlinuz rancher.state.autoformat=[/dev/sda] rancher.password=rancher initrd=initrd +initrd ${url}/${folder}/initrd +boot + +:rancheros_exit +clear menu +exit 0 diff --git a/src/rhel.ipxe b/roles/netbootxyz/templates/menu/rhel.ipxe.j2 similarity index 100% rename from src/rhel.ipxe rename to roles/netbootxyz/templates/menu/rhel.ipxe.j2 diff --git a/src/scientific.ipxe b/roles/netbootxyz/templates/menu/scientific.ipxe.j2 similarity index 75% rename from src/scientific.ipxe rename to roles/netbootxyz/templates/menu/scientific.ipxe.j2 index e929e621dc..456d5c1cfb 100644 --- a/src/scientific.ipxe +++ b/roles/netbootxyz/templates/menu/scientific.ipxe.j2 @@ -12,18 +12,17 @@ goto ${menu} || clear osversion set os Scientific Linux menu ${os} ${arch} -item 7.7 ${os} 7.7 -item 7.6 ${os} 7.6 -item 6.10 ${os} 6.10 -item 6.9 ${os} 6.9 +{% for item in releases.scientific.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item other Choose other version [o] isset ${osversion} || choose osversion || goto linux_menu iseq ${osversion} other || goto scientific_skip_read_osversion echo ${cls} echo -n Enter version: ${} && read osversion :scientific_skip_read_osversion -set dir linux/scientific/${osversion}/${arch}/os -set repo http://ftp1.scientificlinux.org/${dir} +set dir ${scientific_base_dir}/${osversion}/${arch}/os +set repo ${scientific_mirror}/${dir} goto boottype @@ -50,8 +49,8 @@ goto bootos_images :bootos_images imgfree -kernel http://ftp1.scientificlinux.org/${dir}/images/pxeboot/vmlinuz repo=${repo} ${params} ${console} ${ipparam} -initrd http://ftp1.scientificlinux.org/${dir}/images/pxeboot/initrd.img +kernel ${scientific_mirror}/${dir}/images/pxeboot/vmlinuz repo=${repo} ${params} ${console} ${ipparam} +initrd ${scientific_mirror}/${dir}/images/pxeboot/initrd.img boot goto linux_menu diff --git a/src/security.ipxe b/roles/netbootxyz/templates/menu/security.ipxe.j2 similarity index 70% rename from src/security.ipxe rename to roles/netbootxyz/templates/menu/security.ipxe.j2 index 7263083a5d..3f3adec2b8 100644 --- a/src/security.ipxe +++ b/roles/netbootxyz/templates/menu/security.ipxe.j2 @@ -6,9 +6,11 @@ goto ${menu} || menu Security Distributions - Current Arch [ ${arch} ] iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} item --gap Security Distributions -item blackarch ${space} BlackArch Linux -item kali ${space} Kali Linux -item parrotsec ${space} Parrot Security +{% for key, value in releases.items() | sort %} +{% if value.enabled is defined and value.menu == "security" and value.enabled | bool %} +item {{ key }} ${space} {{ value.name }} +{% endif %} +{% endfor %} choose menu || goto security_exit echo ${cls} goto ${menu} || @@ -24,4 +26,4 @@ goto security_menu :security_exit clear menu -exit 0 +exit 0 \ No newline at end of file diff --git a/src/slackware.ipxe b/roles/netbootxyz/templates/menu/slackware.ipxe.j2 similarity index 72% rename from src/slackware.ipxe rename to roles/netbootxyz/templates/menu/slackware.ipxe.j2 index 30cdbacf39..0b1abf505d 100644 --- a/src/slackware.ipxe +++ b/roles/netbootxyz/templates/menu/slackware.ipxe.j2 @@ -10,9 +10,9 @@ set os slackware iseq ${arch} x86_64 && set sbits 64 || clear sbits menu ${os} -item current ${os} Current -item 14.2 ${os} 14.2 -item 14.1 ${os} 14.1 +{% for item in releases.slackware.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item --key o other Choose other version [o] choose version || exit 0 iseq ${version} other || goto skip_read_version @@ -24,8 +24,8 @@ goto boot :boot imgfree -kernel http://${slackware_mirror}/${dir}/kernels/huge.s/bzImage -initrd http://${slackware_mirror}/${dir}/isolinux/initrd.img +kernel ${slackware_mirror}/${dir}/kernels/huge.s/bzImage +initrd ${slackware_mirror}/${dir}/isolinux/initrd.img imgargs bzImage load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s ${params} ${console} isset ${debug} && prompt || boot diff --git a/src/tinycore.ipxe b/roles/netbootxyz/templates/menu/tinycore.ipxe.j2 similarity index 54% rename from src/tinycore.ipxe rename to roles/netbootxyz/templates/menu/tinycore.ipxe.j2 index c66b1c1c73..f23a7222cd 100644 --- a/src/tinycore.ipxe +++ b/roles/netbootxyz/templates/menu/tinycore.ipxe.j2 @@ -3,20 +3,20 @@ # Tiny Core Linux # http://tinycorelinux.net/downloads.html -set tinycore_mirror tinycorelinux.net +set tinycore_mirror {{ releases.tinycore.mirror }} :tinycore_menu set dir 10.x/x86/release menu Tiny Core Linux 10.x -item Core ${space} Core [ISO] -item TinyCore ${space} TinyCore [ISO] -item CorePlus ${space} CorePlus [ISO] +{% for item in releases.tinycore.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} choose version || goto tinycore_exit echo ${cls} kernel ${memdisk} iso raw ${params} -initrd http://${tinycore_mirror}/${dir}/${version}-current.iso +initrd ${tinycore_mirror}/${dir}/${version}-current.iso boot :tinycore_exit diff --git a/src/ubuntu.ipxe b/roles/netbootxyz/templates/menu/ubuntu.ipxe.j2 similarity index 83% rename from src/ubuntu.ipxe rename to roles/netbootxyz/templates/menu/ubuntu.ipxe.j2 index 9d4f42e909..16f851b006 100644 --- a/src/ubuntu.ipxe +++ b/roles/netbootxyz/templates/menu/ubuntu.ipxe.j2 @@ -10,10 +10,9 @@ set os Ubuntu clear ubuntu_version menu ${os} - ${arch_a} - Image Sig Checks: [${img_sigs_enabled}] item --gap Latest Releases -iseq ${arch_a} amd64 && item eoan ${space} ${os} 19.10 Eoan Ermine || -item disco ${space} ${os} 19.04 Disco Dingo -item bionic ${space} ${os} 18.04 LTS Bionic Beaver -item xenial ${space} ${os} 16.04 LTS Xenial Xerus +{% for item in releases.ubuntu.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} item --gap Older Releases item older_release ${space} Set release codename... choose ubuntu_version || goto ubuntu_exit @@ -22,7 +21,7 @@ goto mirrorcfg :older_release set older_release true -set ubuntu_mirror old-releases.ubuntu.com +set ubuntu_mirror {{ releases.ubuntu.archive_mirror }} echo Setting mirror to ${ubuntu_mirror} clear ubuntu_version echo -n Please set enter code name of release: ${} && read ubuntu_version @@ -34,7 +33,6 @@ set mirrorcfg mirror/suite=${ubuntu_version} set dir ${ubuntu_base_dir}/dists/${ubuntu_version}-updates/main/installer-${arch_a}/current/images/netboot/ iseq ${ubuntu_version} eoan && set dir ${ubuntu_base_dir}/dists/${ubuntu_version}/main/installer-${arch_a}/current/images/netboot/ || - :deb_boot_type menu ${os} [${ubuntu_version}] Installer item --gap Install types @@ -63,8 +61,8 @@ goto deb_boot :deb_boot set dir ${dir}${menu}-installer/${arch_a} imgfree -kernel http://${ubuntu_mirror}/${dir}/linux ${install_params} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz -initrd http://${ubuntu_mirror}/${dir}/initrd.gz +kernel ${ubuntu_mirror}/${dir}/linux ${install_params} ${mirrorcfg} ${console} -- quiet ${params} initrd=initrd.gz +initrd ${ubuntu_mirror}/${dir}/initrd.gz echo echo MD5sums: md5sum linux initrd.gz diff --git a/roles/netbootxyz/templates/menu/utils-efi.ipxe.j2 b/roles/netbootxyz/templates/menu/utils-efi.ipxe.j2 new file mode 100644 index 0000000000..7cf55d7438 --- /dev/null +++ b/roles/netbootxyz/templates/menu/utils-efi.ipxe.j2 @@ -0,0 +1,90 @@ +#!ipxe + +menu Utilities - Image Sig Checks: [${img_sigs_enabled}] +item --gap Utilities: +{% for key, value in utilities.items() | sort(attribute='1.name') %} +{% if value.enabled | bool and value.menu == "efi" %} +item {{ key }} ${space} {{ value.name }} +{% endif %} +{% endfor %} +item --gap netboot.xyz tools: +item nbxyz-custom ${space} Set Github username [user: ${github_user}] +item testdistro ${space} Test Distribution ISO +item testpr ${space} Test forked netboot.xyz branch or hash +choose --default ${menu} menu || goto utils_exit +echo ${cls} +goto ${menu} || +chain ${menu}.ipxe || goto utils_exit +goto utils_exit + +{% for key, value in utilities.items() | sort %} +{% if value.enabled | bool and value.menu == "efi" %} +:{{ key }} +set util_path {{ value.util_path }} +set util_file {{ value.util_path | basename }} +set util_version {{ value.version }} +goto boot_{{ value.type }} +{% endif %} +{% endfor %} + +:boot_memdisk +imgfree +kernel ${memdisk} iso raw +initrd --name ${util_file} ${util_path} +echo +echo MD5sums: +md5sum memdisk ${util_file} +iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs +:verify_sigs +echo +echo Checking signatures... +imgverify memdisk ${sigs}memdisk.sig || goto error +imgverify ${util_file} ${sigs}${menu}/${util_file}.sig || goto error +echo Signatures verified! +echo +:skip_sigs +boot +goto utils_exit + +:boot_memtest +chain https://${util_path} && goto main_menu || +goto utils_exit + +:nbxyz-custom +echo EXPERIMENTAL +echo +echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom. +echo You can then customize your fork as needed and set up your own custom options. +echo Once your username is set, a custom option will appear on the main menu. +echo +echo -n Please enter your Github username: ${} && read github_user +goto utils_exit + +:testdistro +echo This option will allow you to test booting an ISO using memdisk. Please +echo specify the URL of the ISO you want to test and it will automatically +echo attempt to load the ISO using memdisk. +echo -n URL: ${} && read distro_iso +kernel ${memdisk} iso raw +initrd ${distro_iso} +boot +goto utils_exit + +:testpr +clear github_user +clear github_branch_or_hash +echo This will chainload into a testing branch of netboot.xyz. You'll need to enter +echo your Github username and the first part of the commit hash of the commit you want +echo to test or the branch name. This assumes you are testing from a forked netboot.xyz +echo repo. +echo +echo -n Specify Github username: ${} && read github_user +echo -n Specify Github branch name or commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_branch_or_hash +echo +echo Attempting to chainload branch or hash: +chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_branch_or_hash}/src/menu.ipxe || echo Unable to find Github branch or hash... && sleep 5 && goto utils_exit +goto utils_exit + +:utils_exit +clear menu +exit 0 diff --git a/roles/netbootxyz/templates/menu/utils-pcbios.ipxe.j2 b/roles/netbootxyz/templates/menu/utils-pcbios.ipxe.j2 new file mode 100644 index 0000000000..1bd78ad15f --- /dev/null +++ b/roles/netbootxyz/templates/menu/utils-pcbios.ipxe.j2 @@ -0,0 +1,90 @@ +#!ipxe + +menu Utilities - Image Sig Checks: [${img_sigs_enabled}] +item --gap Utilities: +{% for key, value in utilities.items() | sort(attribute='1.name') %} +{% if value.enabled | bool and value.menu == "pcbios" %} +item {{ key }} ${space} {{ value.name }} +{% endif %} +{% endfor %} +item --gap netboot.xyz tools: +item nbxyz-custom ${space} Set Github username [user: ${github_user}] +item testdistro ${space} Test Distribution ISO +item testpr ${space} Test forked netboot.xyz branch or hash +choose --default ${menu} menu || goto utils_exit +echo ${cls} +goto ${menu} || +chain ${menu}.ipxe || goto utils_exit +goto utils_exit + +{% for key, value in utilities.items() | sort %} +{% if value.enabled | bool and value.menu == "pcbios" %} +:{{ key }} +set util_path {{ value.util_path }} +set util_file {{ value.util_path | basename }} +set util_version {{ value.version }} +goto boot_{{ value.type }} +{% endif %} +{% endfor %} + +:boot_memdisk +imgfree +kernel ${memdisk} iso raw +initrd --name ${util_file} ${util_path} +echo +echo MD5sums: +md5sum memdisk ${util_file} +iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs +:verify_sigs +echo +echo Checking signatures... +imgverify memdisk ${sigs}memdisk.sig || goto error +imgverify ${util_file} ${sigs}${menu}/${util_file}.sig || goto error +echo Signatures verified! +echo +:skip_sigs +boot +goto utils_exit + +:boot_memtest +chain https://${util_path} && goto main_menu || +goto utils_exit + +:nbxyz-custom +echo EXPERIMENTAL +echo +echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom. +echo You can then customize your fork as needed and set up your own custom options. +echo Once your username is set, a custom option will appear on the main menu. +echo +echo -n Please enter your Github username: ${} && read github_user +goto utils_exit + +:testdistro +echo This option will allow you to test booting an ISO using memdisk. Please +echo specify the URL of the ISO you want to test and it will automatically +echo attempt to load the ISO using memdisk. +echo -n URL: ${} && read distro_iso +kernel ${memdisk} iso raw +initrd ${distro_iso} +boot +goto utils_exit + +:testpr +clear github_user +clear github_branch_or_hash +echo This will chainload into a testing branch of netboot.xyz. You'll need to enter +echo your Github username and the first part of the commit hash of the commit you want +echo to test or the branch name. This assumes you are testing from a forked netboot.xyz +echo repo. +echo +echo -n Specify Github username: ${} && read github_user +echo -n Specify Github branch name or commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_branch_or_hash +echo +echo Attempting to chainload branch or hash: +chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_branch_or_hash}/src/menu.ipxe || echo Unable to find Github branch or hash... && sleep 5 && goto utils_exit +goto utils_exit + +:utils_exit +clear menu +exit 0 diff --git a/src/windows.ipxe b/roles/netbootxyz/templates/menu/windows.ipxe.j2 similarity index 97% rename from src/windows.ipxe rename to roles/netbootxyz/templates/menu/windows.ipxe.j2 index d97145ed3e..35ef169e0c 100644 --- a/src/windows.ipxe +++ b/roles/netbootxyz/templates/menu/windows.ipxe.j2 @@ -41,7 +41,7 @@ goto windows isset ${win_base_url} && goto boot || echo URL not set... && goto url_set :boot -kernel http://${boot_domain}/wimboot +kernel {{ wimboot_location }} initrd ${win_base_url}/${win_arch}/bootmgr bootmgr initrd ${win_base_url}/${win_arch}/boot/bcd bcd initrd ${win_base_url}/${win_arch}/boot/boot.sdi boot.sdi @@ -56,4 +56,4 @@ imgverify wimboot ${sigs}wimboot.sig || goto error boot :windows_exit -exit 0 +exit 0 \ No newline at end of file diff --git a/roles/netbootxyz/tests/inventory b/roles/netbootxyz/tests/inventory new file mode 100644 index 0000000000..2fbb50c4a8 --- /dev/null +++ b/roles/netbootxyz/tests/inventory @@ -0,0 +1 @@ +localhost diff --git a/roles/netbootxyz/tests/test.yml b/roles/netbootxyz/tests/test.yml new file mode 100644 index 0000000000..a16cd5c1a6 --- /dev/null +++ b/roles/netbootxyz/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - netbootxyz diff --git a/roles/netbootxyz/vars/debian.yml b/roles/netbootxyz/vars/debian.yml new file mode 100644 index 0000000000..3551ac9af0 --- /dev/null +++ b/roles/netbootxyz/vars/debian.yml @@ -0,0 +1,14 @@ +--- +netbootxyz_packages: + - apache2 + - binutils-dev + - binutils-aarch64-linux-gnu + - dosfstools + - gcc-aarch64-linux-gnu + - build-essential + - genisoimage + - git + - isolinux + - liblzma-dev + - syslinux + - syslinux-common diff --git a/roles/netbootxyz/vars/main.yml b/roles/netbootxyz/vars/main.yml new file mode 100644 index 0000000000..ed97d539c0 --- /dev/null +++ b/roles/netbootxyz/vars/main.yml @@ -0,0 +1 @@ +--- diff --git a/roles/netbootxyz/vars/redhat.yml b/roles/netbootxyz/vars/redhat.yml new file mode 100644 index 0000000000..161d36f520 --- /dev/null +++ b/roles/netbootxyz/vars/redhat.yml @@ -0,0 +1,10 @@ +--- +netbootxyz_packages: + - dosfstools + - gcc + - genisoimage + - git + - httpd + - minizip-devel + - syslinux + - xz-devel diff --git a/roles/netbootxyz/vars/ubuntu.yml b/roles/netbootxyz/vars/ubuntu.yml new file mode 100644 index 0000000000..3551ac9af0 --- /dev/null +++ b/roles/netbootxyz/vars/ubuntu.yml @@ -0,0 +1,14 @@ +--- +netbootxyz_packages: + - apache2 + - binutils-dev + - binutils-aarch64-linux-gnu + - dosfstools + - gcc-aarch64-linux-gnu + - build-essential + - genisoimage + - git + - isolinux + - liblzma-dev + - syslinux + - syslinux-common diff --git a/script/build_release b/script/build_release new file mode 100755 index 0000000000..5fce3474fd --- /dev/null +++ b/script/build_release @@ -0,0 +1,67 @@ +#!/bin/bash +set -e + +TYPE=$1 +HARD_RELEASE="2.x" +HARD_RC="2.x-RC" +LIVE_URL="staging.boot.netboot.xyz" + +# Set boot domain +if [[ "${TYPE}" == "dev" ]]; then + BOOT_DOMAIN="s3.amazonaws.com/${BUCKET_DEV}/${TRAVIS_COMMIT}" + BOOT_VERSION="Development" +elif [[ "${TYPE}" == "pr" ]]; then + BOOT_DOMAIN="test.com" + BOOT_VERSION="test" +elif [[ "${TYPE}" == "rc" ]]; then + BOOT_VERSION=$(cat version.txt)-RC + BOOT_DOMAIN="${LIVE_URL}/${BOOT_VERSION}" +elif [[ "${TYPE}" == "release" ]]; then + BOOT_VERSION=$(cat version.txt) + BOOT_DOMAIN="${LIVE_URL}/${BOOT_VERSION}" +fi +sed -i \ + "/^#boot_version/c\boot_version: \"${BOOT_VERSION}\"" \ + user_overrides.yml +sed -i \ + "/^#boot_domain/c\boot_domain: ${BOOT_DOMAIN}" \ + user_overrides.yml + +# Build release +docker build -t localbuild -f Dockerfile-build . +docker run --rm -it -v $(pwd):/buildout localbuild + +# Generate folder outputs +mkdir -p s3out +cp -r buildout/* s3out/ +mkdir -p githubout +mv buildout/ipxe/* githubout/ +cd buildout +rm -Rf ipxe +tar -czf menus.tar.gz * +mv menus.tar.gz ../githubout +cd .. + + +# Latest style endpoints for RC and Live +if [[ "${TYPE}" == "release" ]] || [[ "${TYPE}" == "rc" ]]; then + rm -Rf buildout/ + if [[ "${TYPE}" == "release" ]]; then + sed -i \ + -e "/^boot_version/c\boot_version: \"${HARD_RELEASE}\"" \ + -e "/^boot_domain/c\boot_domain: ${LIVE_URL}" \ + user_overrides.yml + docker build -t localbuild -f Dockerfile-build . + docker run --rm -it -v $(pwd):/buildout localbuild + fi + if [[ "${TYPE}" == "rc" ]]; then + sed -i \ + -e "/^boot_version/c\boot_version: \"${HARD_RC}\"" \ + -e "/^boot_domain/c\boot_domain: ${LIVE_URL}/rc" \ + user_overrides.yml + docker build -t localbuild -f Dockerfile-build . + docker run --rm -it -v $(pwd):/buildout localbuild + fi + mkdir -p s3out-latest + cp -r buildout/* s3out-latest/ +fi diff --git a/script/message b/script/message new file mode 100755 index 0000000000..2636e7d6a9 --- /dev/null +++ b/script/message @@ -0,0 +1,41 @@ +#!/bin/bash + +TYPE=$1 + +if [ "${TYPE}" == "dev-push" ]; then + BOOT_URL="https://s3.amazonaws.com/${BUCKET_DEV}/${TRAVIS_COMMIT}/index.html" +elif [ "${TYPE}" == "rc-push" ]; then + BOOT_URL="https://staging.boot.netboot.xyz/$(cat version.txt)-RC/index.html" +elif [ "${TYPE}" == "live-push" ]; then + BOOT_URL="https://staging.boot.netboot.xyz/$(cat version.txt)/index.html" +fi + + +# send status to discord +if [ "${TYPE}" == "failure" ]; then + curl -X POST -H "Content-Type: application/json" --data \ + '{ + "avatar_url": "https://avatars.io/twitter/travisci", + "embeds": [ + { + "color": 16711680, + "description": "__**Failed to Build**__ \n**Build:** '${TRAVIS_BUILD_WEB_URL}'\n**Status:** Failure\n**Change:** https://github.com/netbootxyz/netboot.xyz/commit/'${TRAVIS_COMMIT}'\n" + } + ], + "username": "Travis CI" + }' \ + ${DISCORD_HOOK_URL} +else + curl -X POST -H "Content-Type: application/json" --data \ + '{ + "avatar_url": "https://avatars.io/twitter/travisci", + "embeds": [ + { + "color": 1681177, + "description": "__**Boot Menu Published**__ \n**Files:** '${BOOT_URL}' \n**Build:** '${TRAVIS_BUILD_WEB_URL}'\n**Change:** https://github.com/netbootxyz/netboot.xyz/commit/'${TRAVIS_COMMIT}'\n" + } + ], + "username": "Travis CI" + }' \ + ${DISCORD_HOOK_URL} +fi diff --git a/script/netbootxyz-overrides.yml b/script/netbootxyz-overrides.yml new file mode 100644 index 0000000000..7c5c231faa --- /dev/null +++ b/script/netbootxyz-overrides.yml @@ -0,0 +1,9 @@ +--- +sigs_menu: true +sigs_enabled: true +img_sigs_enabled: false +bootloader_multiple: true +bootloader_disks: + - "netboot.xyz" + - "netboot.xyz-packet" +generate_signatures: true \ No newline at end of file diff --git a/script/pre_install b/script/pre_install new file mode 100755 index 0000000000..9eb8deea9b --- /dev/null +++ b/script/pre_install @@ -0,0 +1,4 @@ +#!/bin/bash + +# Install aws cli +sudo pip install awscli tornado diff --git a/script/prep-release.sh b/script/prep-release.sh deleted file mode 100755 index c8c6ea00ac..0000000000 --- a/script/prep-release.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -# prep release for upload to production container - -set -e - -# make ipxe directory to store ipxe disks -mkdir -p build/ipxe - -# pull down upstream iPXE -git clone --depth 1 https://github.com/ipxe/ipxe.git ipxe_build - -# copy iPXE config overrides into source tree -cp ipxe/local/* ipxe_build/src/config/local/ - -# copy certs into source tree -cp script/*.crt ipxe_build/src/ - -# build iPXE disks -cd ipxe_build/src - -# get current iPXE hash -IPXE_HASH=`git log -n 1 --pretty=format:"%H"` - -# generate netboot.xyz iPXE disks -make bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe \ -EMBED=../../ipxe/disks/netboot.xyz TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt -mv bin/ipxe.dsk ../../build/ipxe/netboot.xyz.dsk -mv bin/ipxe.iso ../../build/ipxe/netboot.xyz.iso -mv bin/ipxe.lkrn ../../build/ipxe/netboot.xyz.lkrn -mv bin/ipxe.usb ../../build/ipxe/netboot.xyz.usb -mv bin/ipxe.kpxe ../../build/ipxe/netboot.xyz.kpxe -mv bin/undionly.kpxe ../../build/ipxe/netboot.xyz-undionly.kpxe - -# generate netboot.xyz iPXE disk for Google Compute Engine -make bin/ipxe.usb CONFIG=cloud EMBED=../../ipxe/disks/netboot.xyz-gce \ -TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt -cp -f bin/ipxe.usb disk.raw -tar Sczvf netboot.xyz-gce.tar.gz disk.raw -mv netboot.xyz-gce.tar.gz ../../build/ipxe/netboot.xyz-gce.tar.gz - -# generate netboot.xyz-packet legacy iPXE disk -make bin/undionly.kpxe \ -EMBED=../../ipxe/disks/netboot.xyz-packet TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt -mv bin/undionly.kpxe ../../build/ipxe/netboot.xyz-packet.kpxe - -# generate EFI iPXE disks -cp config/local/general.h.efi config/local/general.h -make clean -make bin-x86_64-efi/ipxe.efi \ -EMBED=../../ipxe/disks/netboot.xyz TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt -mkdir -p efi_tmp -dd if=/dev/zero of=efi_tmp/ipxe.img count=2880 -mformat -i efi_tmp/ipxe.img -m 0xf8 -f 2880 -mmd -i efi_tmp/ipxe.img ::efi ::efi/boot -mcopy -i efi_tmp/ipxe.img bin-x86_64-efi/ipxe.efi ::efi/boot/bootx64.efi -genisoimage -o ipxe.eiso -eltorito-alt-boot -e ipxe.img -no-emul-boot efi_tmp -mv bin-x86_64-efi/ipxe.efi ../../build/ipxe/netboot.xyz.efi -mv ipxe.eiso ../../build/ipxe/netboot.xyz-efi.iso - -# generate netboot.xyz-packet efi iPXE disk -make bin-x86_64-efi/ipxe.efi \ -EMBED=../../ipxe/disks/netboot.xyz-packet TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt -mv bin-x86_64-efi/ipxe.efi ../../build/ipxe/netboot.xyz-packet.efi - -# iPXE workaround -# http://lists.ipxe.org/pipermail/ipxe-devel/2018-August/006254.html -# apply patch to fix arm64 builds on amd64 builds -sed -i '/WORKAROUND_CFLAGS/d' arch/arm64/Makefile - -# generate EFI arm64 iPXE disk -make clean -make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 \ -EMBED=../../ipxe/disks/netboot.xyz TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt \ -bin-arm64-efi/snp.efi -mv bin-arm64-efi/snp.efi ../../build/ipxe/netboot.xyz-arm64.efi - -# generate netboot.xyz-packet-arm64 iPXE disk -make clean -make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 \ -EMBED=../../ipxe/disks/netboot.xyz-packet TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt \ -bin-arm64-efi/snp.efi -mv bin-arm64-efi/snp.efi ../../build/ipxe/netboot.xyz-packet-arm64.efi - -# generate arm64 experimental -cp config/local/nap.h.efi config/local/nap.h -cp config/local/usb.h.efi config/local/usb.h -make clean -make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 \ -EMBED=../../ipxe/disks/netboot.xyz TRUST=ca-ipxe-org.crt,ca-netboot-xyz.crt \ -bin-arm64-efi/snp.efi -mv bin-arm64-efi/snp.efi ../../build/ipxe/netboot.xyz-arm64-experimental.efi - -# return to root -cd ../.. - -# generate header for sha256-checksums file -cd build/ -CURRENT_TIME=`date` -cat > netboot.xyz-sha256-checksums.txt <> ../netboot.xyz-sha256-checksums.txt -done -cat ../netboot.xyz-sha256-checksums.txt -mv ../netboot.xyz-sha256-checksums.txt . -cd ../.. - -# generate signatures for netboot.xyz source files -mkdir sigs -for src_file in `ls src` -do - openssl cms -sign -binary -noattr -in src/$src_file \ - -signer script/codesign.crt -inkey script/codesign.key -certfile script/ca-netboot-xyz.crt -outform DER \ - -out sigs/$src_file.sig - echo Generated signature for $src_file... -done -mv sigs src/ - -# delete index.html so that we don't overwrite existing content type -rm src/index.html - -# copy iPXE src code into build directory -cp -R src/* build/ diff --git a/script/secrets.tar.enc b/script/secrets.tar.enc deleted file mode 100644 index 7412e2c8d1..0000000000 Binary files a/script/secrets.tar.enc and /dev/null differ diff --git a/site.yml b/site.yml new file mode 100644 index 0000000000..5400dbc20e --- /dev/null +++ b/site.yml @@ -0,0 +1,8 @@ +--- +- hosts: localhost + user: root + roles: + - netbootxyz + vars_files: + - endpoints.yml + - user_overrides.yml diff --git a/src/index.html b/src/index.html deleted file mode 100644 index a62f838c5d..0000000000 --- a/src/index.html +++ /dev/null @@ -1,7 +0,0 @@ -#!ipxe -#### boot.netboot.xyz initial loader #### -#### see https://netboot.xyz for more information #### -set conn_type https -chain --autofree https://boot.netboot.xyz/menu.ipxe || echo HTTPS failed... attempting HTTP... -set conn_type http -chain --autofree http://boot.netboot.xyz/menu.ipxe || echo HTTP failed, localbooting... diff --git a/src/linux-arm.ipxe b/src/linux-arm.ipxe deleted file mode 100644 index 0e62146ea2..0000000000 --- a/src/linux-arm.ipxe +++ /dev/null @@ -1,37 +0,0 @@ -#!ipxe - -goto ${menu} || - -:linux_menu -menu Linux Installers - ARM ARCH **EXPERIMENTAL** Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap Popular Linux Operating Systems: -item centos ${space} CentOS -item debian ${space} Debian -item fedora ${space} Fedora -item opensuse ${space} openSUSE -item ubuntu ${space} Ubuntu -item --gap All Others: -#item alpinelinux ${space} Alpine Linux -#item devuan ${space} Devuan -#item coreos ${space} Fedora CoreOS (Preview) -#item flatcar ${space} Flatcar -#item nixos ${space} NixOS -item rhel ${space} Red Hat Enterprise Linux -#item tinycore ${space} Tiny Core Linux -choose menu || goto linux_exit -echo ${cls} -goto ${menu} || -iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu - -:verify_sigs -imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error -goto change_menu - -:change_menu -chain ${menu}.ipxe || goto error -goto linux_menu - -:linux_exit -clear menu -exit 0 diff --git a/src/linux.ipxe b/src/linux.ipxe deleted file mode 100644 index 00d91932e6..0000000000 --- a/src/linux.ipxe +++ /dev/null @@ -1,44 +0,0 @@ -#!ipxe - -goto ${menu} || - -:linux_menu -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 debian ${space} Debian -item fedora ${space} Fedora -item mageia ${space} Mageia -item opensuse ${space} openSUSE -item ubuntu ${space} Ubuntu -item --gap All Others: -item alpinelinux ${space} Alpine Linux -item devuan ${space} Devuan -item coreos ${space} Fedora CoreOS (Preview) -item flatcar ${space} Flatcar -item gentoo ${space} Gentoo Linux -item ipfire ${space} IPFire -item nixos ${space} NixOS -item rancheros ${space} RancherOS -item rhel ${space} Red Hat Enterprise Linux -item scientific ${space} Scientific -item slackware ${space} Slackware -item tinycore ${space} Tiny Core Linux -choose menu || goto linux_exit -echo ${cls} -goto ${menu} || -iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu - -:verify_sigs -imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error -goto change_menu - -:change_menu -chain ${menu}.ipxe || goto error -goto linux_menu - -:linux_exit -clear menu -exit 0 diff --git a/src/live-debian.ipxe b/src/live-debian.ipxe deleted file mode 100644 index 4a9cd12a85..0000000000 --- a/src/live-debian.ipxe +++ /dev/null @@ -1,76 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -set os Debian Live -menu ${os} - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap ${os} Versions -item buster ${space} ${os} 10 (buster) -choose live_version || goto live_exit -menu ${os} ${live_version} -item --gap ${os} Flavors -goto ${live_version} - -:stretch -goto flavor_select - -:buster -item debian-10-cinnamon-squash ${space} Debian 10 Cinnamon -item debian-10-default-squash ${space} Debian 10 Core -item debian-10-gnome-squash ${space} Debian 10 Gnome -item debian-10-kde-squash ${space} Debian 10 Kde -item debian-10-lxde-squash ${space} Debian 10 Lxde -item debian-10-lxqt-squash ${space} Debian 10 Lxqt -item debian-10-mate-squash ${space} Debian 10 Mate -item debian-10-xfce-squash ${space} Debian 10 Xfce -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:debian-10-cinnamon-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-51162b7a/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-default-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-600c59c0/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-gnome-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-787d3b4a/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-kde-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-88a7a1a3/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-lxde-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-30a4aa90/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-lxqt-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-39d7e341/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-mate-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-466ca031/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot -:debian-10-xfce-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/10.2.0-a0eae41d/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto boot - -:boot -imgfree -kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd -initrd ${kernel_url}initrd -boot - -:live_exit -clear menu -exit 0 diff --git a/src/live-elementary.ipxe b/src/live-elementary.ipxe deleted file mode 100644 index f372221926..0000000000 --- a/src/live-elementary.ipxe +++ /dev/null @@ -1,27 +0,0 @@ -#!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.1 (Hera) -choose live_version || goto live_exit -goto ${live_version} - -:elementaryos-5-default-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/5-14ff2c98/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto boot - -: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 diff --git a/src/live-fedora.ipxe b/src/live-fedora.ipxe deleted file mode 100644 index 1c559ef2d7..0000000000 --- a/src/live-fedora.ipxe +++ /dev/null @@ -1,69 +0,0 @@ -#!ipxe - -isset ${dhcp-server} && set ipparam ip=dhcp || set ipparam ip=${ip}::${gateway}:${netmask}:::none nameserver=${dns} -set ipparam BOOTIF=${netX/mac} ${ipparam} - -goto ${menu} || - -:live_menu -set os Fedora Live -menu ${os} - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap ${os} Versions -item 31 ${space} ${os} 31 -choose live_version || goto live_exit -menu ${os} ${live_version} -item --gap ${os} Flavors -goto ${live_version} - -:31 -item fedora-31-Cinnamon ${space} Fedora 31 Cinnamon -item fedora-31-KDE ${space} Fedora 31 Kde -item fedora-31-LXDE ${space} Fedora 31 Lxde -item fedora-31-LXQt ${space} Fedora 31 Lxqt -item fedora-31-MATE_Compiz ${space} Fedora 31 Mate_compiz -item fedora-31-SoaS ${space} Fedora 31 Soas -item fedora-31-Xfce ${space} Fedora 31 Xfce -item fedora-31-gnome ${space} Fedora 31 Gnome -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:fedora-31-Cinnamon -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-5a52a02a/ -goto boot -:fedora-31-KDE -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-dfbbe3cc/ -goto boot -:fedora-31-LXDE -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-c23f0dc4/ -goto boot -:fedora-31-LXQt -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-19db8480/ -goto boot -:fedora-31-MATE_Compiz -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-29013501/ -goto boot -:fedora-31-SoaS -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-28104ec6/ -goto boot -:fedora-31-Xfce -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-00e3a627/ -goto boot -:fedora-31-gnome -set live_url ${live_endpoint}/fedora-assets/releases/download/1.9-808bb0da/ -goto boot - -:boot -imgfree -kernel ${live_url}vmlinuz ${ipparam} root=live:${live_url}squashfs.img ro rd.live.image rd.lvm=0 rd.luks=0 rd.md=0 rd.dm=0 initrd=initrd -initrd ${live_url}initrd -boot - -:live_exit -clear menu -exit 0 - diff --git a/src/live-kali.ipxe b/src/live-kali.ipxe deleted file mode 100644 index e10304bc7c..0000000000 --- a/src/live-kali.ipxe +++ /dev/null @@ -1,64 +0,0 @@ -#!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 -item kali-gnome-squash ${space} Kali Rolling GNOME -item kali-kde-squash ${space} Kali Rolling KDE -item kali-light-squash ${space} Kali Rolling LIGHT -item kali-lxde-squash ${space} Kali Rolling LXDE -item kali-mate-squash ${space} Kali Rolling MATE -item kali-xfce-squash ${space} Kali Rolling XFCE -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:kali-gnome-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/2019.4-734e93c5/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ -goto boot -:kali-kde-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/2019.4-d761db15/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ -goto boot -:kali-light-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/2019.4-544b485d/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ -goto boot -:kali-lxde-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/2019.4-78e57944/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ -goto boot -:kali-mate-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/2019.4-0e4d0210/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ -goto boot -:kali-xfce-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/2019.4-00ef2578/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/5.3.9-3kali1-e9b26579/ -goto boot - -: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 - diff --git a/src/live-manjaro.ipxe b/src/live-manjaro.ipxe deleted file mode 100644 index bde64faf9a..0000000000 --- a/src/live-manjaro.ipxe +++ /dev/null @@ -1,52 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -menu Manjaro Live - Current Arch [ ${arch} ] -item --gap Currently during boot you need to press ctrl+d/ctrl+c -item --gap repeatedly when init hangs on starting a download -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap Manjaro Live -item manjaro-18.1.0-default-squash ${space} Manjaro 18.1.0 Architect -item manjaro-18.1.0-gnome-squash ${space} Manjaro 18.1.0 Gnome -item manjaro-18.1.0-kde-squash ${space} Manjaro 18.1.0 Kde -item manjaro-18.1.0-xfce-squash ${space} Manjaro 18.1.0 Xfce -choose menu || goto live_exit -echo ${cls} -goto ${menu} || -iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu - -:manjaro-18.1.0-default-squash -imgfree -set fetch_url ${live_endpoint}/manjaro-squash/releases/download/18.1.0-a9fc9ad4/ -kernel ${live_endpoint}/manjaro-core-18.x/releases/download/4.19.69-1-MANJARO-6946b4cf/vmlinuz misobasedir=manjaro ip=dhcp miso_http_srv=${fetch_url} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 driver=free tz=UTC lang=en_US keytable=us systemdshow_status=1 apparmor=1 security=apparmor -initrd ${live_endpoint}/manjaro-core-18.x/releases/download/4.19.69-1-MANJARO-6946b4cf/initrd -boot -:manjaro-18.1.0-gnome-squash -imgfree -set fetch_url ${live_endpoint}/manjaro-squash/releases/download/18.1.0-f94efa23/ -kernel ${live_endpoint}/manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/vmlinuz misobasedir=manjaro ip=dhcp miso_http_srv=${fetch_url} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 driver=free tz=UTC lang=en_US keytable=us systemdshow_status=1 apparmor=1 security=apparmor -initrd ${live_endpoint}/manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/initrd -boot -:manjaro-18.1.0-kde-squash -imgfree -set fetch_url ${live_endpoint}/manjaro-squash/releases/download/18.1.0-a3f2c12b/ -kernel ${live_endpoint}/manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/vmlinuz misobasedir=manjaro ip=dhcp miso_http_srv=${fetch_url} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 driver=free tz=UTC lang=en_US keytable=us systemdshow_status=1 apparmor=1 security=apparmor -initrd ${live_endpoint}/manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/initrd -boot -:manjaro-18.1.0-xfce-squash -imgfree -set fetch_url ${live_endpoint}/manjaro-squash/releases/download/18.1.0-5dc05378/ -kernel ${live_endpoint}/manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/vmlinuz misobasedir=manjaro ip=dhcp miso_http_srv=${fetch_url} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 driver=free tz=UTC lang=en_US keytable=us systemdshow_status=1 apparmor=1 security=apparmor -initrd ${live_endpoint}/manjaro-core-18.x/releases/download/5.2.11-1-MANJARO-e2cddd8e/initrd -boot - -:change_menu -chain ${menu}.ipxe || goto error -goto live_menu - -:live_exit -clear menu -exit 0 - diff --git a/src/live-mint.ipxe b/src/live-mint.ipxe deleted file mode 100644 index a471430baf..0000000000 --- a/src/live-mint.ipxe +++ /dev/null @@ -1,49 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -set os Mint Live -menu ${os} - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap ${os} Versions -item 19 ${space} ${os} 19 -choose live_version || goto live_exit -menu ${os} ${live_version} -item --gap ${os} Flavors -goto ${live_version} - -:19 -item mint-19-cinnamon-squash ${space} Mint 19 Cinnamon -item mint-19-mate-squash ${space} Mint 19 Mate -item mint-19-xfce-squash ${space} Mint 19 Xfce -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:mint-19-cinnamon-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/19.2-0830904d/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 19-boot -:mint-19-mate-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/19.2-0b1e2ee6/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 19-boot -:mint-19-xfce-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/19.2-69724a44/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 19-boot - -:19-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 - diff --git a/src/live-q4os.ipxe b/src/live-q4os.ipxe deleted file mode 100644 index 037d51feaf..0000000000 --- a/src/live-q4os.ipxe +++ /dev/null @@ -1,44 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -set os Q4OS Live -menu ${os} - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap ${os} Versions -item 3.9 ${space} ${os} 3.9 -choose live_version || goto live_exit -menu ${os} ${live_version} -item --gap ${os} Flavors -goto ${live_version} - -:3.9 -item q4os-3.9-default-squash ${space} Q4os 3.9 Trinity -item q4os-3.9-plasma-squash ${space} Q4os 3.9 Plasma -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:q4os-3.9-default-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/3.9-a721c7cc/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto 3.9-boot -:q4os-3.9-plasma-squash -set squash_url ${live_endpoint}/debian-squash/releases/download/3.9-8b894afb/filesystem.squashfs -set kernel_url ${live_endpoint}/debian-core-10/releases/download/4.19.67-2+deb10u1-4acbfed0/ -goto 3.9-boot - -:3.9-boot -imgfree -kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd -initrd ${kernel_url}initrd -boot - -:live_exit -clear menu -exit 0 - diff --git a/src/live-ubuntu.ipxe b/src/live-ubuntu.ipxe deleted file mode 100644 index 1ef4c7b10b..0000000000 --- a/src/live-ubuntu.ipxe +++ /dev/null @@ -1,114 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -set os Ubuntu Live -menu ${os} - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap ${os} Versions -item bionic ${space} ${os} 18.04 -item eoan ${space} ${os} 19.10 -choose live_version || goto live_exit -menu ${os} ${live_version} -item --gap ${os} Flavors -goto ${live_version} - -:bionic -item ubuntu-18.04-Budgie-squash ${space} Ubuntu 18.04 Budgie -item ubuntu-18.04-KDE-squash ${space} Ubuntu 18.04 Kde -item ubuntu-18.04-LXDE-squash ${space} Ubuntu 18.04 Lxde -item ubuntu-18.04-MATE-squash ${space} Ubuntu 18.04 Mate -item ubuntu-18.04-default-squash ${space} Ubuntu 18.04 Unity -item ubuntu-18.04-kylin-squash ${space} Ubuntu 18.04 Kylin -item ubuntu-18.04-xfce-squash ${space} Ubuntu 18.04 Xfce -goto flavor_select - -:eoan -item ubuntu-19.10-Budgie-squash ${space} Ubuntu 19.10 Budgie -item ubuntu-19.10-KDE-squash ${space} Ubuntu 19.10 Kde -item ubuntu-19.10-LXDE-squash ${space} Ubuntu 19.10 Lxde -item ubuntu-19.10-MATE-squash ${space} Ubuntu 19.10 Mate -item ubuntu-19.10-default-squash ${space} Ubuntu 19.10 Unity -item ubuntu-19.10-kylin-squash ${space} Ubuntu 19.10 Kylin -item ubuntu-19.10-xfce-squash ${space} Ubuntu 19.10 Xfce -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:ubuntu-18.04-Budgie-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-fbf44fff/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-18.04-KDE-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-33e8e2f8/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-18.04-LXDE-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-2f9cd5be/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-18.04-MATE-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-c629718a/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-18.04-default-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-9e60a38f/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-18.04-kylin-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-8c2102eb/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-18.04-xfce-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/18.04.3-d9bd73c3/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 18.04-boot -:ubuntu-19.10-Budgie-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/945f7f4b-85bee8cf/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot -:ubuntu-19.10-KDE-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/9854741e-b243fefb/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot -:ubuntu-19.10-LXDE-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/8b8b0336-f53591b5/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot -:ubuntu-19.10-MATE-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/b8a2a185-48069fc4/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot -:ubuntu-19.10-default-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/ee829212-575f2ecf/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot -:ubuntu-19.10-kylin-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/e7831484-762c8439/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot -:ubuntu-19.10-xfce-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/862cad91-9437400f/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-19.10/releases/download/5.3.0.18.21-aa695b8a/ -goto 19.10-boot - -: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 - diff --git a/src/live-zorin.ipxe b/src/live-zorin.ipxe deleted file mode 100644 index 37d82085ec..0000000000 --- a/src/live-zorin.ipxe +++ /dev/null @@ -1,44 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -set os Zorin Live -menu ${os} - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap ${os} Versions -item 15 ${space} ${os} 15 -choose live_version || goto live_exit -menu ${os} ${live_version} -item --gap ${os} Flavors -goto ${live_version} - -:15 -item zorin-15-gnome-squash ${space} Zorin 15 Gnome -item zorin-15-xfce-squash ${space} Zorin 15 Xfce -goto flavor_select - -:flavor_select -choose flavor || goto live_menu -echo ${cls} -goto ${flavor} || - -:zorin-15-gnome-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/15-171ddffc/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 15-boot -:zorin-15-xfce-squash -set squash_url ${live_endpoint}/ubuntu-squash/releases/download/15-24926a26/filesystem.squashfs -set kernel_url ${live_endpoint}/ubuntu-core-18.04/releases/download/4.15.0.20.23-91c3d317/ -goto 15-boot - -:15-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 - diff --git a/src/livegrml.ipxe b/src/livegrml.ipxe deleted file mode 100644 index e8e08b8938..0000000000 --- a/src/livegrml.ipxe +++ /dev/null @@ -1,51 +0,0 @@ -#!ipxe - -# Grml Live Linux -# https://grml.org - -goto ${menu} - -:livegrml -set os Grml Live Linux -menu ${os} -item --gap Versions -item grml-full ${space} ${os} 2018.12 Full -item grml-small ${space} ${os} 2018.12 Small -choose livegrml_version || goto livegrml_exit -echo ${cls} -goto ${livegrml_version} || -chain ${menu}.ipxe || goto livegrml_exit -goto livegrml_exit - -:grml-full -set util_path download.grml.org/grml64-full_2018.12.iso -set util_file grml64-full_2018.12.iso -goto boot_memdisk - -:grml-small -set util_path download.grml.org/grml64-small_2018.12.iso -set util_file grml64-small_2018.12.iso -goto boot_memdisk - -:boot_memdisk -imgfree -kernel ${memdisk} iso raw -initrd --name ${util_file} http://${util_path} -echo -echo MD5sums: -md5sum memdisk ${util_file} -iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs -:verify_sigs -echo -echo Checking signatures... -imgverify memdisk ${sigs}memdisk.sig || goto error -imgverify ${util_file} ${sigs}${menu}/${util_file}.sig || goto error -echo Signatures verified! -echo -:skip_sigs -boot -goto livegrml_exit - -:livegrml_exit -clear menu -exit 0 diff --git a/src/mirbsd.ipxe b/src/mirbsd.ipxe deleted file mode 100644 index 14057ca8df..0000000000 --- a/src/mirbsd.ipxe +++ /dev/null @@ -1,22 +0,0 @@ -#!ipxe - -# MirOS BSD Operating System -# https://www.mirbsd.org/ - -:mirbsd_menu -menu Please pick a MirOS version -item mirbsd ${space} MirBSD (i386) Latest -choose mirbsd_version || goto mirbsd_exit -goto boot_mirbsd - -:boot_mirbsd -imgfree -kernel https://www.mirbsd.org/MirOS/current/bsd4me.com -module https://www.mirbsd.org/MirOS/current/bsd4me.rd -module https://www.mirbsd.org/MirOS/webstuff/netboot.xyz/boot.cfg -boot -goto mirbsd_exit - -:mirbsd_exit -clear menu -exit 0 diff --git a/src/netinfo.ipxe b/src/netinfo.ipxe deleted file mode 100644 index 3ee6139ff2..0000000000 --- a/src/netinfo.ipxe +++ /dev/null @@ -1,21 +0,0 @@ -#!ipxe - -menu Network info -item --gap MAC: -item mac ${space} ${netX/mac} -item --gap IP/mask: -item ip ${space} ${netX/ip}/${netX/netmask} -item --gap Gateway: -item gw ${space} ${netX/gateway} -item --gap Domain: -item domain ${space} ${netX/domain} -item --gap DNS: -item dns ${space} ${netX/dns} -item --gap DHCP server: -item dhcpserver ${space} ${netX/dhcp-server} -item --gap Next-server: -item nextserver ${space} ${next-server} -item --gap Filename: -item filename ${space} ${netX/filename} -choose empty || -exit diff --git a/src/nixos.ipxe b/src/nixos.ipxe deleted file mode 100644 index befe43ab53..0000000000 --- a/src/nixos.ipxe +++ /dev/null @@ -1,21 +0,0 @@ -#!ipxe - -# NixOS -# https://nixos.org/ - -set os Nixos Linux -menu ${os} -item --gap Official Releases -item 19.09 ${space} Nixos 19.09 -item 19.03 ${space} Nixos 19.03 -item unstable ${space} Nixos unstable -choose version || goto nixos_exit -iseq ${version} 19.09 && set link https://hydra.nixos.org/job/nixos/release-19.09/nixos.netboot.x86_64-linux/latest-finished/download/netboot.ipxe || -iseq ${version} 19.03 && set link https://hydra.nixos.org/job/nixos/release-19.03/nixos.netboot.x86_64-linux/latest-finished/download/netboot.ipxe || -iseq ${version} unstable && set link https://hydra.nixos.org/job/nixos/trunk-combined/nixos.netboot.x86_64-linux/latest-finished/download/netboot.ipxe || -chain ${link} -goto nixos_exit - -:nixos_exit -clear menu -exit 0 diff --git a/src/openbsd.ipxe b/src/openbsd.ipxe deleted file mode 100644 index 02cbcbd3d9..0000000000 --- a/src/openbsd.ipxe +++ /dev/null @@ -1,37 +0,0 @@ -#!ipxe - -# OpenBSD Operating System -# http://www.openbsd.org - -:openbsd_menu -menu OpenBSD -item 6.6 OpenBSD 6.6 -item 6.5 OpenBSD 6.5 -item 6.4 OpenBSD 6.4 -item 6.3 OpenBSD 6.3 -item snapshots OpenBSD 6.4 Latest Snapshot -choose ver || goto openbsd_exit -iseq ${ver} 6.6 && set image_ver 66 || -iseq ${ver} 6.5 && set image_ver 65 || -iseq ${ver} 6.4 && set image_ver 64 || -iseq ${ver} 6.3 && set image_ver 63 || -iseq ${ver} snapshots && set image_ver 66 || - -iseq ${arch} x86_64 && goto openbsd_x64 || -set openbsd_arch i386 -goto boot_openbsd - -:openbsd_x64 -set openbsd_arch amd64 -goto boot_openbsd - -:boot_openbsd -set src http://ftp.openbsd.org/pub/OpenBSD/${ver}/${openbsd_arch}/cd${image_ver}.iso -imgfree -initrd ${src} -chain ${memdisk} iso raw -exit - -:openbsd_exit -clear menu -exit 0 diff --git a/src/rancheros.ipxe b/src/rancheros.ipxe deleted file mode 100644 index 312a845adc..0000000000 --- a/src/rancheros.ipxe +++ /dev/null @@ -1,28 +0,0 @@ -#!ipxe - -# RancherOS -# http://rancher.com/rancher-os/ - -:rancheros_menu -set url releases.rancher.com -menu RancherOS -item latest RancherOS Latest (20 MB) -choose version || goto rancheros_exit -goto ${version} - -:latest -echo ${cls} -set folder os/latest -goto boot - -:boot -echo Login in with username: rancher, password: rancher -echo To install: ros install -d /dev/sda1 -imgfree -kernel http://${url}/${folder}/vmlinuz rancher.state.autoformat=[/dev/sda] rancher.password=rancher initrd=initrd -initrd http://${url}/${folder}/initrd -boot - -:rancheros_exit -clear menu -exit 0 diff --git a/src/utils-arm.ipxe b/src/utils-arm.ipxe deleted file mode 100644 index 2a4650d7ee..0000000000 --- a/src/utils-arm.ipxe +++ /dev/null @@ -1,40 +0,0 @@ -#!ipxe - -menu Utilities - Image Sig Checks: [${img_sigs_enabled}] -item --gap Utilities: -item nbxyz-custom ${space} Set Github username [user: ${github_user}] -item testpr ${space} Test forked netboot.xyz branch or hash -choose --default ${menu} menu || goto utils_exit -echo ${cls} -goto ${menu} || -chain ${menu}.ipxe || goto utils_exit -goto utils_exit - -:nbxyz-custom -echo EXPERIMENTAL -echo -echo Make sure you have a fork of https://github.com/antonym/netboot.xyz-custom. -echo You can then customize your fork as needed and set up your own custom options. -echo Once your username is set, a custom option will appear on the main menu. -echo -echo -n Please enter your Github username: ${} && read github_user -goto utils_exit - -:testpr -clear github_user -clear github_branch_or_hash -echo This will chainload into a testing branch of netboot.xyz. You'll need to enter -echo your Github username and the first part of the commit hash of the commit you want -echo to test or the branch name. This assumes you are testing from a forked netboot.xyz -echo repo. -echo -echo -n Specify Github username: ${} && read github_user -echo -n Specify Github branch name or commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_branch_or_hash -echo -echo Attempting to chainload branch or hash: -chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_branch_or_hash}/src/menu.ipxe || echo Unable to find Github branch or hash... && sleep 5 && goto utils_exit -goto utils_exit - -:utils_exit -clear menu -exit 0 diff --git a/src/utils.ipxe b/src/utils.ipxe deleted file mode 100644 index 66c50753ff..0000000000 --- a/src/utils.ipxe +++ /dev/null @@ -1,163 +0,0 @@ -#!ipxe - -menu Utilities - Image Sig Checks: [${img_sigs_enabled}] -item --gap Utilities: -item alt_linux_rescue ${space} ALT Linux Rescue -item avg ${space} AVG Rescue CD -item breakin ${space} Breakin -item clonezilla ${space} Clonezilla -item dban ${space} DBAN -item gparted ${space} GParted -item memtest-501 ${space} Memtest86+ 5.01 -item supergrub ${space} Super Grub2 Disk -item sysrcd ${space} SystemRescueCD -item ubcd ${space} Ultimate Boot CD (UBCD) -item --gap netboot.xyz tools: -item nbxyz-custom ${space} Set Github username [user: ${github_user}] -item testdistro ${space} Test Distribution ISO -item testpr ${space} Test forked netboot.xyz branch or hash -choose --default ${menu} menu || goto utils_exit -echo ${cls} -goto ${menu} || -chain ${menu}.ipxe || goto utils_exit -goto utils_exit - -:alt_linux_rescue -iseq ${arch} x86_64 && goto alt_linux_rescue_x64 || -set util_path nightly.altlinux.org/p8/release/alt-p8-rescue-20180312-i586.iso -set util_file alt-p8-rescue-20180312-i586.iso -goto boot_memdisk - -:alt_linux_rescue_x64 -set util_path nightly.altlinux.org/p8/release/alt-p8-rescue-20180312-x86_64.iso -set util_file alt-p8-rescue-20180312-x86_64.iso -goto boot_memdisk - -:avg -set avg_version 160420a12074 -set util_path download.avg.com/filedir/inst/avg_arl_cdi_all_120_${avg_version}.iso -set util_file avg_arl_cdi_all_120_${avg_version}.iso -goto boot_memdisk - -:breakin -set breakin_version 4.26.1-53 -set util_path www.advancedclustering.com/wp-content/uploads/2017/02/bootimage-${breakin_version}.iso -set util_file bootimage-${breakin_version}.iso -goto boot_memdisk - -:clonezilla -set clonezilla_version 2.6.2-15 -set util_path master.dl.sourceforge.net/project/clonezilla/clonezilla_live_stable/${clonezilla_version}/clonezilla-live-${clonezilla_version}-amd64.iso -set util_file clonezilla-live-${clonezilla_version}-amd64.iso -goto boot_memdisk - -:dban -set dban_version 2.3.0 -set util_path master.dl.sourceforge.net/project/dban/dban/dban-${dban_version}/dban-${dban_version}_i586.iso -set util_file dban-${dban_version}_i586.iso -goto boot_memdisk - -:gparted -set gparted_version 1.0.0-3 -set util_path master.dl.sourceforge.net/project/gparted/gparted-live-stable/${gparted_version}/gparted-live-${gparted_version}-amd64.iso -set util_file gparted-live-${gparted_version}-amd64.iso -goto boot_memdisk - -:memtest-501 -set util_path boot.netboot.xyz/utils/memtest86-5.01.0 -set util_file memtest86-5.01.0 -goto boot_memtest - -:supergrub -set supergrub_version 2.04s1 -set util_path master.dl.sourceforge.net/project/supergrub2/${supergrub_version}/super_grub2_disk_${supergrub_version}/super_grub2_disk_hybrid_${supergrub_version}.iso -set util_file super_grub2_disk_hybrid_${supergrub_version}.iso -goto boot_memdisk - -:sysrcd -set sysrcdpath master.dl.sourceforge.net/project/netboot-xyz/distros/sysresccd-x86/4.8.1 -kernel --name altker64 https://${sysrcdpath}/altker64 setkmap=no net.ifnames=0 backstore=off -initrd --name initram.igz https://${sysrcdpath}/initram.igz -initrd --name sysrcd.dat https://${sysrcdpath}/sysrcd.dat /sysrcd.dat -echo -echo MD5sums: -md5sum altker64 initram.igz sysrcd.dat -iseq ${img_sigs_enabled} true && goto verify_sigs_sysrcd || goto skip_sigs_sysrcd -:verify_sigs_sysrcd -echo -echo Checking signatures... -imgverify altker64 ${sigs}${menu}/altker64.sig || goto error -imgverify initram.igz ${sigs}${menu}/initram.igz.sig || goto error -imgverify sysrcd.dat ${sigs}${menu}/sysrcd.dat.sig || goto error -echo Signatures verified! -echo -:skip_sigs_sysrcd -boot -goto utils_exit - -:ubcd -set util_path mirror.sysadminguide.net/ubcd/ubcd538.iso -set util_file ubcd538.iso -goto boot_memdisk - -:boot_memdisk -imgfree -kernel ${memdisk} iso raw -initrd --name ${util_file} http://${util_path} -echo -echo MD5sums: -md5sum memdisk ${util_file} -iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs -:verify_sigs -echo -echo Checking signatures... -imgverify memdisk ${sigs}memdisk.sig || goto error -imgverify ${util_file} ${sigs}${menu}/${util_file}.sig || goto error -echo Signatures verified! -echo -:skip_sigs -boot -goto utils_exit - -:boot_memtest -chain https://${util_path} && goto main_menu || -goto utils_exit - -:nbxyz-custom -echo EXPERIMENTAL -echo -echo Make sure you have a fork of https://github.com/antonym/netboot.xyz-custom. -echo You can then customize your fork as needed and set up your own custom options. -echo Once your username is set, a custom option will appear on the main menu. -echo -echo -n Please enter your Github username: ${} && read github_user -goto utils_exit - -:testdistro -echo This option will allow you to test booting an ISO using memdisk. Please -echo specify the URL of the ISO you want to test and it will automatically -echo attempt to load the ISO using memdisk. -echo -n URL: ${} && read distro_iso -kernel ${memdisk} iso raw -initrd ${distro_iso} -boot -goto utils_exit - -:testpr -clear github_user -clear github_branch_or_hash -echo This will chainload into a testing branch of netboot.xyz. You'll need to enter -echo your Github username and the first part of the commit hash of the commit you want -echo to test or the branch name. This assumes you are testing from a forked netboot.xyz -echo repo. -echo -echo -n Specify Github username: ${} && read github_user -echo -n Specify Github branch name or commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_branch_or_hash -echo -echo Attempting to chainload branch or hash: -chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_branch_or_hash}/src/menu.ipxe || echo Unable to find Github branch or hash... && sleep 5 && goto utils_exit -goto utils_exit - -:utils_exit -clear menu -exit 0 diff --git a/user_overrides.yml b/user_overrides.yml new file mode 100644 index 0000000000..9f90e43d03 --- /dev/null +++ b/user_overrides.yml @@ -0,0 +1,31 @@ +--- + +# overrides defaults in netbootxyz role +generate_menus: true +generate_disks: true +generate_checksums: true + +# set desired site name +#site_name: mysitename.com + +# set desired boot domain +#boot_domain: boot.mysitename.com + +# set boot version +#boot_version: "2.x" + +#bootloader_tftp_enabled: false +#bootloader_https_enabled: true +#bootloader_http_enabled: true + +# set release overrides from standard netboot.xyz defaults +#release_overrides: +# alpinelinux: +# name: "Alpine Linux" +# fedora: +# mirror: "mirrors.kernel.org" + +# set utilities_overrides from standard netboot.xyz defaults +#utilities_overrides: +# supergrub: +# enabled: false diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..6ae756c479 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.9.9