#!ipxe set boot-url http://${next-server} set iscsi-server 192.168.1.248 set iqn iqn.2000-01.com.synology:ds210.name set nfs-server ${next-server} #set boot-url http://192.168.1.100 # Setup some basic convenience variables set menu-timeout 5000 set submenu-timeout ${menu-timeout} # Ensure we have menu-default set to something isset ${menu-default} || set menu-default exit ######## MAIN MENU ################### :start menu Welcome to iPXE's Boot Menu item item --gap -- ------------------------- Utilities ------------------------------ item bootsan Boot On San (iscsi:${iscsi-server}::::${iqn}) item bootaoe Boot On AOE (e0.0) item pxelinux pxelinux item grub4dos grub4dos #item grub_cd boot to dvd (via grub4dos) #item grub_startrom boot to startrom.0 (via grub4dos) item grub_hd0 boot to hd0 (via grub4dos) item hdt hdt #item netbootme Netboot.Me #item undi_dos undi_dos item disk_util Disk Utilities item winpe Live Systemes item linux Install Linux Distros item --gap -- ------------------------------ Advanced --------------------------------- item config Configure settings item shell Enter iPXE shell item reboot Reboot item exit Exit (boot local disk) choose --default exit --timeout 30000 target && goto ${target} ########## UTILITY ITEMS #################### :shell echo Type exit to get the back to the menu shell set menu-timeout 0 goto start :failed echo Booting failed, dropping to shell goto shell :reboot reboot :exit exit :cancel echo You cancelled the menu, dropping you to a shell :config config goto start :back set submenu-timeout 0 clear submenu-default goto start ################################ disk utilities :disk_util menu Disk Utilities item macrium Boot macrium linux (sanboot) item hbcd Boot hbcd (memdisk) item partlogic Boot partlogic (memdisk) item pmagic Boot pmagic (memdisk) item redobackup Boot redobackup via NFS item clonezilla Boot clonezilla via HTTP item partition_wizard Boot Partition Wizard (memdisk) item back Back to top menu... iseq ${menu-default} menu-recovery && isset ${submenu-default} && goto menu-recovery-timed || choose selected && goto ${selected} || goto start :menu-recovery-timed choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start :macrium sanboot --no-describe ${boot-url}/_iso/rescue.iso goto start :partlogic initrd ${boot-url}/images/partlogic-0.71.img kernel ${boot-url}/memdisk || goto failed boot || goto failed goto start :pmagic #sanboot ${boot-url}/images/pmagic/pmagic_2013_02_28.iso || goto failed #halts on "probing EDD" #dhcp net0 #if chainloaded initrd ${boot-url}/images/pmagic/pmagic_2013_02_28.iso kernel ${boot-url}/memdisk iso || goto failed boot || goto failed goto start :partition_wizard initrd ${boot-url}/_iso/pwhe8.iso kernel ${boot-url}/memdisk iso || goto failed boot || goto failed goto start :redobackup kernel ${boot-url}/_ISO/redobackup/casper/vmlinuz boot=casper netboot=nfs nfsroot=${nfs-server}:/g/_ISO/redobackup #kernel ${boot-url}/_ISO/redobackup/casper/vmlinuz boot=casper netboot=nfs #you then need to specify /g/_ISO/redobackup in option 17 initrd ${boot-url}/_ISO/redobackup/casper/initrd.lz boot || goto failed goto start :clonezilla kernel ${boot-url}/_ISO/clonezilla/live/vmlinuz boot=live config noswap nolocales edd=on nomodeset vga=788 nosplash noprompt fetch=${boot-url}/_ISO/clonezilla/live/filesystem.squashfs initrd ${boot-url}/_ISO/clonezilla/live/initrd.img boot || goto failed goto start :hbcd #open iso with iso editor and remove pmagic to make it ligther initrd ${boot-url}/images/hbcd152.iso kernel ${boot-url}/memdisk iso raw || goto failed boot || goto failed goto start ################################# winpe :winpe menu Boot WinPe item memdisk_winpe Boot winpe via memdisk item sanboot_winpe Boot winpe via sanboot item wimboot Boot winpe via wimboot #item winpe3 wimboot winpe3 autodetect cpu #item winpe3x86 wimboot winpe3x86 item ubuntu-live ubuntu-live (nfs) item dsl Damn Small Linux item grml grml (nfs) item back Back to top menu... iseq ${menu-default} menu-recovery && isset ${submenu-default} && goto menu-recovery-timed || choose selected && goto ${selected} || goto start :menu-recovery-timed choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start :wimboot kernel ${boot-url}/wimboot initrd ${boot-url}/BOOTMGR BOOTMGR initrd ${boot-url}/BOOT/BCD BCD initrd ${boot-url}/BOOT/BOOT.SDI BOOT.SDI initrd ${boot-url}/SOURCES/BOOT.WIM BOOT.WIM boot || goto failed goto start :memdisk_winpe initrd ${boot-url}/images/winre.iso chain ${boot-url}/memdisk iso raw || goto failed #loads but halts after windows logo goto start :sanboot_winpe sanboot --no-describe ${boot-url}/images/winre.iso || goto failed goto start :winpe3 cpuid --ext 29 && set arch amd64 || set arch x86 kernel ${boot-url}/wimboot initrd ${boot-url}/${arch}/ISO/bootmgr bootmgr initrd ${boot-url}/${arch}/ISO/boot/bcd BCD initrd ${boot-url}/${arch}/ISO/boot/boot.sdi boot.sdi initrd ${boot-url}/${arch}/winpe.wim boot.wim boot || goto failed goto start :winpe3x86 set arch x86 kernel ${boot-url}/wimboot initrd ${boot-url}/${arch}/ISO/bootmgr bootmgr initrd ${boot-url}/${arch}/ISO/boot/bcd BCD initrd ${boot-url}/${arch}/ISO/boot/boot.sdi boot.sdi initrd ${boot-url}/${arch}/winpe.wim boot.wim boot || goto failed goto start :ubuntu-live kernel ${boot-url}/_ISO/ubuntu.13.04/casper/vmlinuz root=/dev/nfs boot=casper netboot=nfs nfsroot=${nfs-server}:/g/_ISO/ubuntu.13.04 quiet splash initrd ${boot-url}/_ISO/ubuntu.13.04/casper/initrd.lz boot || goto failed goto start :grml initrd ${boot-url}/_iso/grml/boot/grml32small/initrd.img chain ${boot-url}/_iso/grml/boot/grml32small/vmlinuz root=/dev/nfs rw nfsroot=${nfs-server}:/g/_ISO/grml/live/grml32-small live-media-path=/ boot=live lang=us nomce apm=power-off noprompt noeject vga=791 :dsl kernel ${boot-url}/images/dsl4410/linux24 ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=789 nomce noapic quiet nopcmcia noagp noswap base initrd ${boot-url}/images/dsl4410/minirt24.gz boot || goto failed goto start ################################# linux :linux menu Install Linux item ubuntu-installer ubuntu-installer over internet (memdisk) item ubuntu-installer-http ubuntu-installer over internet item centos-installer centos-installer over internet (memdisk) item opensuse-installer opensuse-installer over internet (sanboot) item debian-installer debian-installer over internet (memdisk) item fedora-installer fedora-installer bfo (memdisk) item back Back to top menu... iseq ${menu-default} menu-recovery && isset ${submenu-default} && goto menu-recovery-timed || choose selected && goto ${selected} || goto start :menu-recovery-timed choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start :ubuntu-installer-http cpuid --ext 29 && set arch amd64 || set arch i386 #cpuid --ext 29 && set arch x64 || set arch x86 set base-url http://no.archive.ubuntu.com/ubuntu/dists/raring/main/installer-${arch}/current/images/netboot/ubuntu-installer/${arch} kernel ${base-url}/linux initrd ${base-url}/initrd.gz #imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg boot || goto failed goto start :ubuntu-installer initrd ${boot-url}/ubuntu-installer/i386/ubuntu-13.04-mini.iso chain ${boot-url}/memdisk iso || goto failed #kernel ${boot-url}/ubuntu-installer/i386/linux #initrd ${boot-url}/ubuntu-installer/i386/initrd.gz boot || goto failed goto start :centos-installer initrd ${boot-url}/centos-installer/i386/CentOS-6.4-i386-netinstall.iso chain ${boot-url}/memdisk iso || goto failed #kernel ${boot-url}/centos-installer/i386/vmlinuz #initrd ${boot-url}/centos-installer/i386/initrd.img #boot goto start :opensuse-installer sanboot --no-describe --keep ${boot-url}/opensuse-installer/openSUSE-12.3-NET-i586.iso || goto failed #initrd ${boot-url}/opensuse-installer/openSUSE-12.3-NET-i586.iso #chain ${boot-url}/memdisk iso raw || goto failed goto start :debian-installer #sanboot --no-describe --keep ${boot-url}/debian-installer/i386/mini.iso || goto failed #or initrd ${boot-url}/debian-installer/i386/mini.iso #initrd http://debian.mirrors.ovh.net/debian/dists/stable/main/installer-i386/current/images/netboot/mini.iso chain ${boot-url}/memdisk iso raw || goto failed goto start :fedora-installer #sanboot --no-describe --keep ${boot-url}/fedora-installer/i386/Fedora-18-i386-netinst.iso || goto failed #or #initrd ${boot-url}/fedora-installer/i386/Fedora-18-i386-netinst.iso #chain ${boot-url}/memdisk iso || goto failed #or #kernel ${boot-url}/fedora-installer/i386/vmlinuz #initrd ${boot-url}/fedora-installer/i386/initrd.img #boot kernel ${boot-url}/memdisk initrd ${boot-url}/fedora-installer/i386/bfo.dsk boot || goto failed goto start ######################## other items :pxelinux #dhcp dhcp net0 set 210:string tftp://${next-server}/ #set 210:string tftp://${dhcp-server}/ chain ${210:string}pxelinux.0 || goto failed goto start #use menu.ipxe as alt boot file name, not http://${dhcp-server}/menu.ipxe :grub4dos dhcp net0 #set netX/next-server 192.168.1.100 set 210:string tftp://${dhcp-server}/ chain ${210:string}grldr || goto failed goto start :grub_cd chain ${boot-url}/grub.exe --config-file="cdrom --init;map --hook;root (cd0);chainloader (cd0)" || goto failed goto start :grub_startrom chain ${boot-url}/grub.exe keeppxe --config-file="pxe detect;chainloader --force --raw (pd)/startrom.0" || goto failed goto start :grub_hd0 chain ${boot-url}/grub.exe --config-file="rootnoverify (hd0);chainloader +1" || goto failed goto start :undi_dos kernel ${boot-url}/memdisk keeppxe ACTION=install NETSHARE=sharename initrd ${boot-url}/images/undis3c.imz boot || goto failed goto start :bootsan #sanhook --drive 0x81 ${root-path} #hook a drive #sanboot --no-describe iscsi:10.0.4.1:::1:iqn.2010-04.org.ipxe.dolphin:liveinstall #boot from another media dhcp net0 set keep-san 1 #sanboot iscsi:${iscsi-server}:tcp:3260:0:${iqn} sanboot iscsi:${iscsi-server}::::${iqn} #boot || goto failed goto start :bootaoe dhcp net0 set keep-san 1 sanboot aoe:e0.0 #boot || goto failed goto start :hdt sanboot --no-describe ${boot-url}/_iso/hdt-0.5.2.iso || goto failed goto start :netbootme imgfree chain http://static.netboot.me/gpxe/netbootme.kpxe ####################################################### #Memdisk via iPXE vs. ISO Boot HTTP via iPXE: # #Memdisk via iPXE does the following things: #1) Emulates a CD-ROM allowing a Network-Based Install. #2) Masks actual system RAM because the environment memdisk creates "hides" a certain amount of RAM to allow for the ISO - This amount is generally 2x ISO Size (Maximum 2GB - I think). #3) Preloads the ISO into memory before executing the ISO. This slows boot time a bit. # #ISO Boot over HTTP via iPXE: #1) Does not emulate a CD-ROM. It is a Block Device. #2) Does not mask system RAM. #3) Executes as it reads: Faster than memdisk and no "preloading" of the ISO is required. #4) Does not hold the ISO as a readable device once the ISO is loaded unless loaded into the iBFT.