Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
define:
- MIRRORS_HOST: mirrors.ustc.edu.cn
- PXE_HOST: pxe.ustc.edu.cn
- TFTP_EXPORT: /srv/tftp/data
- HTTP_EXPORT: /srv/http/data
- DOWNLOAD_POOL: download/
menu:
- name: Arch Linux
menu:
- name: Arch Linux (${version})
check_version:
- http_cat https://mirrors.ustc.edu.cn/archlinux/iso/
- regex \d{4}\.\d{2}\.\d{2}
generate_menu:
- kernel (http,${MIRRORS_HOST}/archlinux/iso/${version}/arch/boot/x86_64/vmlinuz
- initrd (http,${MIRRORS_HOST}/archlinux/iso/${version}/arch/boot/x86_64/archiso.img
- param ip=dhcp archiso_http_srv=https://${MIRRORS_HOST}/archlinux/iso/${version}/
- name: Ubuntu
menu:
- name: Ubuntu Live (${version})
check_version:
- debian_version https://${MIRRORS_HOST}/ubuntu/dists/
- regex [a-z]+
- latest 4
prepare:
- http_get https://${MIRRORS_HOST}/ubuntu-releases/${version}/ubuntu-${version}-desktop-amd64.iso ${DOWNLOAD_POOL}/ubuntu-${version}-desktop-amd64.iso
- extract ${DOWNLOAD_POOL}/ubuntu-${version}-desktop-amd64.iso /srv/http/data/ubuntu-${version}-desktop-amd64/
generate_menu:
- kernel (http,${PXE_HOST})/data/ubuntu-${version}-desktop-amd64/casper/vmlinuz.efi
- initrd (http,${PXE_HOST})/data/ubuntu-${version}-desktop-amd64/casper/initrd.lz
- param boot=live fetch=(http,${PXE_HOST})/data/ubuntu-${version}-desktop-amd64/casper/filesystem.squashfs locale=zh_CN
- name: Ubuntu Installer (${version})
check_version:
- httpcat https://mirrors.ustc.edu.cn/ubuntu/dists/
- regex
generate_menu:
- kernel (http,${MIRRORS_HOST})/ubuntu/dists/${codename}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux
- initrd (http,${MIRRORS_HOST})/ubuntu/dists/${codename}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz
- param
- name: Tools
include: tools.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment