#!ipxe

menu Lana iPXE menu
item clonezilla CloneZilla
item alpine-linux-lancache Alpine Linux Lancache
item centos7-pxe-live CentOS 7 Pxe Live Without Install
item debian-setup Debian 12 AutoInstall
item WinPE_Q330P_1 Q330P_1 Windows AutoInstall
item WinPE_Q330P_2 Q330P_2 Windows AutoInstall
item WinPE Windows Manual Setup
item ipxeshell iPXE Shell

choose os && goto ${os}

:clonezilla
set boot-url http://pxe.lana-france.com/clonezilla
kernel ${boot-url}/vmlinuz rd.driver.blacklist=amdgpu modprobe.blacklist=amdgpu boot=live union=overlay components noswap noprompt vga=788 keyboard-layouts=fr locales=fr_FR.UTF-8 fetch=${boot-url}/filesystem.squashfs
initrd ${boot-url}/initrd.img
boot || read void

:ipxeshell
shell

:centos7-pxe-live
set base http://ftp.riken.jp/Linux/centos/7/os/x86_64
kernel ${base}/images/pxeboot/vmlinuz initrd=initrd.img repo=${base}
initrd ${base}/images/pxeboot/initrd.img
boot || read void

:debian-setup
set base http://ftp.fr.debian.org/debian/dists/Debian12.5
kernel ${base}/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
initrd ${base}/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
initrd http://pxe.lana-france.com/debian/preseed.cfg preseed.cfg
imgargs linux vga=normal auto=true interface=auto netcfg/dhcp_timeout=60 netcfg/choose_interface=auto priority=critical net.ifnames=0
boot || read void

:alpine-linux-lancache
set mirror http://mirrors.ircam.fr/pub/alpine
set release ${mirror}/v3.19
set repo ${release}/main
set modloop ${release}/releases/x86_64/netboot/modloop-lts
set initrd ${release}/releases/x86_64/netboot/initramfs-lts
set pxe http://pxe.lana-france.com
set apkovl ${pxe}/apkovl/lancache.apkovl.tar.gz
set cmdline ip=dhcp modules=loop,squashfs nomodeset
kernel ${release}/releases/x86_64/netboot/vmlinuz-lts ${cmdline} modloop=${modloop} apkovl=${apkovl} alpine_repo=${repo} ssh_key=${pxe}/lana-ssh-keys
initrd ${initrd}
boot || read void

:WinPE
set arch amd64
kernel ${arch}/wimboot
initrd ${arch}/media/Boot/BCD BCD
initrd ${arch}/media/Boot/boot.sdi boot.sdi
initrd ${arch}/media/sources/boot.wim boot.wim
boot || read void

:WinPE_Q330P_1
set arch amd64
kernel ${arch}/wimboot
initrd --name install.bat ${arch}/install_q300p_1.bat install.bat
initrd ${arch}/winpeshl.ini winpeshl.ini
initrd ${arch}/media/Boot/BCD BCD
initrd ${arch}/media/Boot/boot.sdi boot.sdi
initrd ${arch}/media/sources/boot.wim boot.wim
boot || read void

:WinPE_Q330P_2
set arch amd64
kernel ${arch}/wimboot
initrd --name install.bat ${arch}/install_q300p_2.bat install.bat
initrd ${arch}/winpeshl.ini winpeshl.ini
initrd ${arch}/media/Boot/BCD BCD
initrd ${arch}/media/Boot/boot.sdi boot.sdi
initrd ${arch}/media/sources/boot.wim boot.wim
boot || read void
