├── ipxe.iso ├── memdisk ├── wimboot ├── ipxe.kpxe ├── undionly.kpxe ├── netboot.xyz.kpxe ├── undionly64.kpxe ├── script.ipxe ├── netboot-undionly.kpxe ├── undionly-office.kpxe ├── undionly64_normal.kpxe ├── boot └── hostname-mini.ipxe ├── boot.ipxe ├── boot.ipxe.cfg ├── preseed.cfg ├── config └── ESXi │ └── boot.cfg └── menu.ipxe /ipxe.iso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/ipxe.iso -------------------------------------------------------------------------------- /memdisk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/memdisk -------------------------------------------------------------------------------- /wimboot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/wimboot -------------------------------------------------------------------------------- /ipxe.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/ipxe.kpxe -------------------------------------------------------------------------------- /undionly.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/undionly.kpxe -------------------------------------------------------------------------------- /netboot.xyz.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/netboot.xyz.kpxe -------------------------------------------------------------------------------- /undionly64.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/undionly64.kpxe -------------------------------------------------------------------------------- /script.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | dhcp 4 | chain --autofree tftp://${next-server}/boot.ipxe 5 | -------------------------------------------------------------------------------- /netboot-undionly.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/netboot-undionly.kpxe -------------------------------------------------------------------------------- /undionly-office.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/undionly-office.kpxe -------------------------------------------------------------------------------- /undionly64_normal.kpxe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veelove/netboot-tftp/HEAD/undionly64_normal.kpxe -------------------------------------------------------------------------------- /boot/hostname-mini.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | echo 3 | echo Booting 您的電腦名稱 4 | set menu-default centos 5 | set menu-timeout 1000 6 | chain --replace --autofree ${menu-url} 7 | -------------------------------------------------------------------------------- /boot.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | # Global variables used by all other iPXE scripts 4 | chain --autofree boot.ipxe.cfg || 5 | 6 | # Boot //hostname-.ipxe 7 | # if hostname DHCP variable is set and script is present 8 | isset ${hostname} && chain --replace --autofree ${boot-dir}hostname-${hostname}.ipxe || 9 | 10 | # Boot //uuid-.ipxe 11 | # if SMBIOS UUID variable is set and script is present 12 | isset ${uuid} && chain --replace --autofree ${boot-dir}uuid-${uuid}.ipxe || 13 | 14 | # Boot //mac-010203040506.ipxe if script is present 15 | chain --replace --autofree ${boot-dir}mac-${mac:hexraw}.ipxe || 16 | 17 | # Boot //pci-8086100e.ipxe if one type of 18 | # PCI Intel adapter is present and script is present 19 | chain --replace --autofree ${boot-dir}pci-${pci/${busloc}.0.2}${pci/${busloc}.2.2}.ipxe || 20 | 21 | # Boot //chip-82541pi.ipxe if one type of 22 | # PCI Intel adapter is present and script is present 23 | chain --replace --autofree ${boot-dir}chip-${chip}.ipxe || 24 | 25 | # Boot /menu.ipxe script if all other options have been exhausted 26 | chain --replace --autofree ${menu-url} || 27 | -------------------------------------------------------------------------------- /boot.ipxe.cfg: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | # OPTIONAL: Base URL used to resolve most other resources 4 | # Should always end with a slash 5 | set boot-url tftp://${next-server}/ 6 | 7 | set nas_ip 10.10.10.250 8 | 9 | # OPTIONAL: What URL to use when sanbooting 10 | # Usually ${boot-url} is used, but required until NFS supports block device API 11 | # Should always end with a slash 12 | set sanboot-url http://${nas_ip}:88/Install/ 13 | 14 | # OPTIONAL: Relative directory to boot.ipxe used to 15 | # override boot script for specific clients 16 | set boot-dir boot/ 17 | 18 | # REQUIRED: Absolute URL to the menu script, used by boot.ipxe 19 | # and commonly used at the end of simple override scripts 20 | # in ${boot-dir}. 21 | set menu-url ${boot-url}menu.ipxe 22 | 23 | # OPTIONAL: iSCSI server location and iSCSI IQNs 24 | # Must be specified as an IP, some clients have issues with name resolution 25 | # Initiator IQN is also calculated to use hostname, if present 26 | set iscsi-server ${nas_ip} 27 | set base-iqn iqn.2000-01.com.synology 28 | set base-iscsi iscsi:10.10.10.250:::1:iqn.2000-01.com.synology:ipxe.ESXI 29 | isset ${hostname} && set initiator-iqn ${base-iqn}:${hostname} || set initiator-iqn ${base-iqn}:${mac} 30 | 31 | # OPTIONAL: URL to report memtest results to 32 | set memtest-report-url http://boot.smidsrod.lan/memtest-report.cgi 33 | -------------------------------------------------------------------------------- /preseed.cfg: -------------------------------------------------------------------------------- 1 | # Disable framebuffer, it's usually slower, especially on VMs 2 | d-i debian-installer/framebuffer boolean false 3 | 4 | # Controls whether or not the hardware clock is set to UTC 5 | d-i clock-setup/utc boolean false 6 | # You may set this to any valid setting for $TZ; see the contents of 7 | # /usr/share/zoneinfo/ for valid values 8 | d-i mirror/country string manual 9 | d-i mirror/http/hostname string archive.ubuntu.com 10 | d-i mirror/http/directory string /ubuntu 11 | # Controls whether to use NTP to set the clock during the install 12 | d-i clock-setup/ntp boolean true 13 | 14 | # Skip creation of a root account (normal user account will be able to 15 | # use sudo). The default is false; preseed this to true if you want to set 16 | # a root password. 17 | d-i passwd/root-login boolean false 18 | 19 | # The kernel image (meta) package to be installed; "none" can be used if no 20 | # kernel is to be installed. 21 | d-i base-installer/kernel/image string linux-generic 22 | 23 | # Disk setup (partman) 24 | # Suppress question if it is okay to not have swap 25 | # We don't use disk for swap on iSCSI, we have enough memory 26 | d-i partman-basicfilesystems/no_swap boolean false 27 | 28 | # This will prevent the installer from ejecting the CD during the reboot, 29 | # which is useful in some situations. 30 | d-i cdrom-detect/eject boolean false 31 | 32 | # This command is run just before the install finishes, but when there is 33 | # still a usable /target directory. You can chroot to /target and use it 34 | # directly, or use the apt-install and in-target commands to easily install 35 | # packages and run commands in the target system. 36 | 37 | -------------------------------------------------------------------------------- /config/ESXi/boot.cfg: -------------------------------------------------------------------------------- 1 | bootstate=0 2 | title=Loading ESXi installer 3 | timeout=5 4 | prefix=http://192.168.1.252:88/Install/ESXi/x86_64 5 | kernel=b.b00 6 | kernelopt=cdromBoot runweasel netdevice=vmnic0 7 | modules=jumpstrt.gz --- useropts.gz --- features.gz --- k.b00 --- chardevs.b00 --- user.b00 --- procfs.b00 --- uc_intel.b00 --- uc_amd.b00 --- vmx.v00 --- vim.v00 --- sb.v00 --- s.v00 --- ata_liba.v00 --- ata_pata.v00 --- ata_pata.v01 --- ata_pata.v02 --- ata_pata.v03 --- ata_pata.v04 --- ata_pata.v05 --- ata_pata.v06 --- ata_pata.v07 --- block_cc.v00 --- bnxtnet.v00 --- brcmfcoe.v00 --- char_ran.v00 --- ehci_ehc.v00 --- elxiscsi.v00 --- elxnet.v00 --- hid_hid.v00 --- i40en.v00 --- iavmd.v00 --- igbn.v00 --- ima_qla4.v00 --- ipmi_ipm.v00 --- ipmi_ipm.v01 --- ipmi_ipm.v02 --- iser.v00 --- ixgben.v00 --- lpfc.v00 --- lpnic.v00 --- lsi_mr3.v00 --- lsi_msgp.v00 --- lsi_msgp.v01 --- lsi_msgp.v02 --- misc_cni.v00 --- misc_dri.v00 --- mtip32xx.v00 --- ne1000.v00 --- nenic.v00 --- net_bnx2.v00 --- net_bnx2.v01 --- net_cdc_.v00 --- net_cnic.v00 --- net_e100.v00 --- net_e100.v01 --- net_enic.v00 --- net_fcoe.v00 --- net_forc.v00 --- net_igb.v00 --- net_ixgb.v00 --- net_libf.v00 --- net_mlx4.v00 --- net_mlx4.v01 --- net_nx_n.v00 --- net_tg3.v00 --- net_usbn.v00 --- net_vmxn.v00 --- nhpsa.v00 --- nmlx4_co.v00 --- nmlx4_en.v00 --- nmlx4_rd.v00 --- nmlx5_co.v00 --- nmlx5_rd.v00 --- ntg3.v00 --- nvme.v00 --- nvmxnet3.v00 --- nvmxnet3.v01 --- ohci_usb.v00 --- pvscsi.v00 --- qcnic.v00 --- qedentv.v00 --- qfle3.v00 --- qfle3f.v00 --- qfle3i.v00 --- qflge.v00 --- sata_ahc.v00 --- sata_ata.v00 --- sata_sat.v00 --- sata_sat.v01 --- sata_sat.v02 --- sata_sat.v03 --- sata_sat.v04 --- scsi_aac.v00 --- scsi_adp.v00 --- scsi_aic.v00 --- scsi_bnx.v00 --- scsi_bnx.v01 --- scsi_fni.v00 --- scsi_hps.v00 --- scsi_ips.v00 --- scsi_isc.v00 --- scsi_lib.v00 --- scsi_meg.v00 --- scsi_meg.v01 --- scsi_meg.v02 --- scsi_mpt.v00 --- scsi_mpt.v01 --- scsi_mpt.v02 --- scsi_qla.v00 --- shim_isc.v00 --- shim_isc.v01 --- shim_lib.v00 --- shim_lib.v01 --- shim_lib.v02 --- shim_lib.v03 --- shim_lib.v04 --- shim_lib.v05 --- shim_vmk.v00 --- shim_vmk.v01 --- shim_vmk.v02 --- smartpqi.v00 --- uhci_usb.v00 --- usb_stor.v00 --- usbcore_.v00 --- vmkata.v00 --- vmkfcoe.v00 --- vmkplexe.v00 --- vmkusb.v00 --- vmw_ahci.v00 --- xhci_xhc.v00 --- elx_esx_.v00 --- btldr.t00 --- weaselin.t00 --- esx_dvfi.v00 --- esx_ui.v00 --- lsu_hp_h.v00 --- lsu_lsi_.v00 --- lsu_lsi_.v01 --- lsu_lsi_.v02 --- lsu_lsi_.v03 --- native_m.v00 --- qlnative.v00 --- rste.v00 --- vmware_e.v00 --- vsan.v00 --- vsanheal.v00 --- vsanmgmt.v00 --- tools.t00 --- xorg.v00 --- imgdb.tgz --- imgpayld.tgz 8 | build= 9 | updated=0 10 | -------------------------------------------------------------------------------- /menu.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | # Variables are specified in boot.ipxe.cfg 4 | 5 | # Some menu defaults 6 | # set menu-timeout 0 if no client-specific settings found 7 | isset ${menu-timeout} || set menu-timeout 0 8 | set submenu-timeout ${menu-timeout} 9 | isset ${menu-default} || set menu-default exit 10 | 11 | # Figure out if client is 64-bit capable 12 | cpuid --ext 29 && set arch x64 || set arch x86 13 | cpuid --ext 29 && set archl amd64 || set archl i386 14 | 15 | ###################### MAIN MENU #################################### 16 | 17 | :start 18 | menu iPXE boot menu for ${initiator-iqn} 19 | item --gap -- ------------------------- Operating systems ------------------------------ 20 | item --key w windows Boot Windows from iSCSI 21 | item --key u ubuntu Boot Ubuntu from iSCSI 22 | item --key u centos Boot CentOS from iSCSI 23 | item --key u esxi Boot ESXi from iSCSI 24 | item --gap -- ------------------------- Tools and utilities ---------------------------- 25 | item --key d menu-diag System tools... 26 | item --key i menu-install Installers... 27 | item --gap -- ------------------------- Advanced options ------------------------------- 28 | item --key c config Configure settings 29 | item shell Drop to iPXE shell 30 | item reboot Reboot computer 31 | item 32 | item --key x exit Exit iPXE and continue BIOS boot 33 | choose --timeout ${menu-timeout} --default ${menu-default} selected || goto cancel 34 | set menu-timeout 0 35 | goto ${selected} 36 | 37 | :cancel 38 | echo You cancelled the menu, dropping you to a shell 39 | 40 | :shell 41 | echo Type 'exit' to get the back to the menu 42 | shell 43 | set menu-timeout 0 44 | set submenu-timeout 0 45 | goto start 46 | 47 | :failed 48 | echo Booting failed, dropping to shell 49 | goto shell 50 | 51 | :reboot 52 | reboot 53 | 54 | :exit 55 | exit 56 | 57 | :config 58 | config 59 | goto start 60 | 61 | :back 62 | set submenu-timeout 0 63 | clear submenu-default 64 | goto start 65 | 66 | ############ MAIN MENU ITEMS ############ 67 | 68 | :windows 69 | echo Booting Windows from iSCSI for ${initiator-iqn} 70 | set netX/gateway ${iscsi-server} 71 | set root-path ${base-iscsi}:${hostname}.Windows 72 | set keep-san 1 73 | sanboot ${root-path} || goto failed 74 | goto start 75 | 76 | :ubuntu 77 | echo Booting Ubuntu from iSCSI for ${initiator-iqn} 78 | set root-path ${base-iscsi}:${hostname}.Ubuntu 79 | set keep-san 1 80 | sanboot ${root-path} || goto failed 81 | goto start 82 | 83 | :centos 84 | echo Booting CentOS from iSCSI for ${initiator-iqn} 85 | set root-path ${base-iscsi}:${hostname}.CentOS 86 | set keep-san 1 87 | sanboot ${root-path} || goto failed 88 | goto start 89 | 90 | :esxi 91 | echo Booting ESXi from iSCSI for iqn.2000-01.com.synology:ipxe.ESXI 92 | set root-path iscsi:10.10.10.250:::1:iqn.2000-01.com.synology:ipxe.ESXI 93 | set keep-san 1 94 | sanboot ${root-path} || goto failed 95 | goto start 96 | 97 | ###################### SYSTEM TOOL MENU ############################# 98 | 99 | :menu-diag 100 | menu Diagnostic tools 101 | item memtest Memtest86+ 102 | item winpe WinPE 103 | item 104 | item --key 0x08 back Back to top menu... 105 | iseq ${menu-default} menu-diag && isset ${submenu-default} && goto menu-diag-timed || 106 | choose selected && goto ${selected} || goto start 107 | :menu-diag-timed 108 | choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start 109 | 110 | :memtest 111 | set base-url http://${nas_ip}:88/tools 112 | initrd ${base-url}/memtest86_5.01.iso 113 | chain memdisk iso raw || goto failed 114 | goto start 115 | 116 | :winpe 117 | set base-url http://${nas_ip}:88/tools 118 | initrd ${base-url}/UQi_USBsys_10th.iso 119 | chain memdisk iso raw || goto failed 120 | goto start 121 | 122 | ############################ INSTALLER MENU ######################### 123 | 124 | :menu-install 125 | menu Installers for ${initiator-iqn} 126 | item winpe-install Hook Windows iSCSI and boot WinPE for intallation 127 | item ubuntu-install Hook Ubuntu ${archl} iSCSI and install 128 | item centos-install Hook CentOS ${archl} iSCSI and install 129 | item esxi-install Hook ESXi ${archl} iSCSI and install 130 | item 131 | item --key 0x08 back Back to top menu... 132 | iseq ${menu-default} menu-install && isset ${submenu-default} && goto menu-install-timed || 133 | choose selected && goto ${selected} || goto start 134 | :menu-install-timed 135 | choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start 136 | 137 | :winpe-install 138 | echo Booting Windows PE ${arch} installer for ${initiator-iqn} 139 | echo (for installing Windows) 140 | set netX/gateway ${iscsi-server} 141 | set root-path ${base-iscsi}:${hostname}.Windows 142 | set keep-san 1 143 | echo sanhook start... 144 | sanhook ${root-path} || goto failed 145 | echo set base url starting 146 | set base-url http://${nas_ip}:88/Install/WinPE 147 | kernel wimboot 148 | initrd ${base-url}/x64/Boot/BCD bcd 149 | initrd ${base-url}/x64/Boot/boot.sdi boot.sdi 150 | initrd ${base-url}/x64/sources/boot.wim boot.wim 151 | boot || goto failed 152 | goto start 153 | 154 | :ubuntu-install 155 | echo Starting Ubuntu 16.04 ${archl} installer for ${initiator-iqn} 156 | set root-path ${base-iscsi}:${hostname}.Ubuntu 157 | cpuid --ext 29 && set arch amd64 || set arch x86 158 | set base-url ${sanboot-url}Ubuntu16/${arch} 159 | kernel ${base-url}/netboot/linux 160 | initrd ${base-url}/netboot/initrd.gz 161 | imgargs linux auto=true fb=false url=${base-url}/./preseed.cfg DEBCONF_DEBUG=5 netcfg/get_hostname=${hostname}.Ubuntu partman-iscsi/login/address=${iscsi-server} partman-iscsi/login/targets=${base-iqn}:${hostname}.Ubuntu 162 | boot || goto failed 163 | goto start 164 | 165 | :centos-install 166 | echo Starting CentOS 7 ${archl} installer for ${initiator-iqn} 167 | set root-path ${base-iscsi}:${hostname}.CentOS 168 | set base-url ${sanboot-url}CentOS/x86_64 169 | set keep-san 1 170 | sanhook ${root-path} || goto failed 171 | kernel ${base-url}/images/pxeboot/vmlinuz initrd=initrd.img repo=${base-url} 172 | initrd ${base-url}/images/pxeboot/initrd.img 173 | boot || goto failed 174 | goto start 175 | 176 | :esxi-install 177 | echo Starting ESXi 6.7 installer for iqn.2000-01.com.synology:ipxe.ESXI 178 | set root-path iscsi:10.10.10.250:::1:iqn.2000-01.com.synology:ipxe.ESXI 179 | set base-url http://10.10.10.250:88/Install/ESXI 180 | set keep-san 1 181 | sanhook ${root-path} || goto failed 182 | initrd ${base-url}/123.iso 183 | chain memdisk iso raw || goto failed 184 | goto start 185 | --------------------------------------------------------------------------------