├── proxmox.ipxe ├── README.md ├── menu.ipxe └── boot.cfg /proxmox.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | goto ${menu} || 4 | 5 | :live_menu 6 | # Use Local Override 7 | set live_endpoint ${live_endpoint_local} 8 | 9 | set os Proxmox 10 | set pve_version 6.4-1 11 | set pve_opts vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw quiet initrd=initrd.iso.img 12 | set pve_url ${live_endpoint}/proxmox/${pve_version} 13 | 14 | menu ${os} 15 | item --gap ${os} - ${pve_version} 16 | item normal ${space} Install Proxmox ${pve_version} 17 | item debug ${space} Install Proxmox ${pve_version} (Debug Mode) 18 | choose live_version || goto live_exit 19 | imgfree 20 | goto ${live_version} 21 | 22 | :debug 23 | kernel ${pve_url}/linux26 ${pve_opts} splash=verbose proxdebug ${cmdline} 24 | goto boot 25 | 26 | :normal 27 | kernel ${pve_url}/linux26 ${pve_opts} splash=silent ${cmdline} 28 | goto boot 29 | 30 | :boot 31 | initrd ${pve_url}/initrd.iso.img 32 | boot 33 | 34 | :live_exit 35 | clear menu 36 | exit 0 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Adding Proxmox to your netboot.xyz installation 2 | 3 | To get Proxmox installable via netboot.xyz, you have a couple choices. You will need to host the assets to install Proxmox, as the ISO they provide won't work directly with netboot. You can then create a netboot-custom repository in GitHub that you can easily chain in from the hosted netboot.xyz implementation. Or you can self-host netboot.xyz and update the scripts locally. I've chosen to do the later, and am running [netboot.xyz in a container](https://hub.docker.com/r/linuxserver/netbootxyz). 4 | 5 | This has been tested as of May 2021 with Proxmox v.6.4-1 and netboot.xyz v.2.0.38. 6 | 7 | 8 | ## Creating Proxmox Assets for PXE 9 | Take the current [Proxmox ISO](https://www.proxmox.com/en/downloads/category/iso-images-pve) and run the `pve-iso-2-pxe.sh` script that you can find at [morph027/pve-iso-2-pxe](https://github.com/morph027/pve-iso-2-pxe). 10 | 11 | You'll need to host the assets the script derives from the ISO. Host them somewhere that is reachable from the machine that you're netboot'ing from. 12 | 13 | The assets should be stored in the following location: 14 | 15 | ```/proxmox/<>/``` 16 | 17 | So at the time of this writing, I have the following two files hosted at the following paths: 18 | 19 | ``` 20 | /proxmox/6.4-1/linux26 21 | /proxmox/6.4-1/initrd.iso.img 22 | ``` 23 | 24 | 25 | 26 | 27 | ## Adding Proxmox to the Menu Setup 28 | 29 | ### proxmox.ipxe 30 | First add the ```proxmox.ipxe``` file content from this repo to the location with the rest of your menus. If you are using the containerized version of netboot.xyz from above, this is easily achieved by creating a new menu in the netboot.xyz interface on port 3000. 31 | 32 | ### menu.ipxe 33 | In the `menu.ipxe` file, I added an item for Proxmox. I show the Proxmox option regardless of which architecture has been booted to, but have only tested it with x86 architectures. Add this line to add the Proxmox option to the main menu: 34 | 35 | ``` 36 | item proxmox ${space} Proxmox || 37 | ``` 38 | 39 | You can see an example ```menu.ipxe``` in this repo (line 39). 40 | 41 | ### boot.cfg 42 | Finally, I also added a variable to the `boot.cfg` file for the location of my local "live endpoint". This allows me to easily swap out whichever menus/oses that I want to install from my LAN very easily. Add the following around the top of your `boot.cfg` file. 43 | 44 | 45 | ``` 46 | # set location of local netboot.xyz live assets 47 | set live_endpoint_local http://<>:<> 48 | ``` 49 | 50 | Where `<>` and `<>` have been filled in with the ip and port of your local asset store/cache. For example: 51 | 52 | 53 | ``` 54 | # set location of local netboot.xyz live assets 55 | set live_endpoint_local http://192.168.1.2:8080 56 | ``` 57 | 58 | The ```proxmox.ipxe``` file utilizes the ```live_endpoint_local``` variable by replacing the value of ```live_endpoint```. 59 | 60 | You can see an example ```boot.cfg``` in this repo (lines 16-17). 61 | 62 | 63 | ## Boot and Install! 64 | 65 | Now you should be able to boot using PXE, to get to iPXE, to get to this updated netboot menu that now includes Proxmox! Happy VM'ng! 66 | -------------------------------------------------------------------------------- /menu.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | :start 4 | chain --autofree boot.cfg || 5 | echo Attempting to retrieve latest upstream version number... 6 | chain --timeout 5000 https://boot.netboot.xyz/version.ipxe || 7 | ntp 0.pool.ntp.org || 8 | iseq ${cls} serial && goto ignore_cls || 9 | set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J" 10 | set cls ${cls:string} 11 | :ignore_cls 12 | 13 | 14 | isset ${arch} && goto skip_arch_detect || 15 | cpuid --ext 29 && set arch x86_64 || set arch i386 16 | iseq ${buildarch} arm64 && set arch arm64 || 17 | :skip_arch_detect 18 | isset ${menu} && goto ${menu} || 19 | 20 | isset ${ip} || dhcp || echo DHCP failed 21 | 22 | :main_menu 23 | clear menu 24 | set space:hex 20:20 25 | set space ${space:string} 26 | iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} 27 | menu ${site_name} 28 | item --gap Default: 29 | item local ${space} Boot from local hdd 30 | item --gap Distributions: 31 | iseq ${menu_linux} 1 && item linux ${space} Linux Network Installs || 32 | iseq ${menu_linux_arm} 1 && item linux-arm ${space} Linux Network Installs || 33 | iseq ${menu_live} 1 && item live ${space} Live CDs || 34 | iseq ${menu_live_arm} 1 && item live-arm ${space} Live CDs || 35 | iseq ${menu_bsd} 1 && item bsd ${space} BSD Installs || 36 | iseq ${menu_unix} 1 && item unix ${space} Unix Network Installs || 37 | iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS || 38 | iseq ${menu_windows} 1 && item windows ${space} Windows || 39 | item proxmox ${space} Proxmox || 40 | item --gap Tools: 41 | iseq ${menu_utils} 1 && item utils-${platform} ${space} Utilities || 42 | iseq ${menu_utils_arm} 1 && item utils-arm ${space} Utilities || 43 | iseq ${arch} x86_64 && set bits 64 || set bits 32 44 | iseq ${arch} arm64 && set bits 64 || 45 | item changebits ${space} Architecture: ${arch} (${bits}bit) 46 | item shell ${space} iPXE shell 47 | item netinfo ${space} Network card info 48 | item lspci ${space} PCI Device List 49 | item about ${space} About netboot.xyz 50 | item --gap Signature Checks: 51 | item sig_check ${space} netboot.xyz [ enabled: ${sigs_enabled} ] 52 | isset ${github_user} && item --gap Custom Github Menu: || 53 | isset ${github_user} && item custom-github ${space} ${github_user}'s Custom Menu || 54 | isset ${custom_url} && item --gap Custom URL Menu: || 55 | isset ${custom_url} && item custom-url ${space} Custom URL Menu || 56 | isset ${menu} && set timeout 0 || set timeout ${boot_timeout} 57 | choose --timeout ${timeout} --default ${menu} menu || goto local 58 | echo ${cls} 59 | goto ${menu} || 60 | iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu 61 | 62 | :verify_sigs 63 | imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error 64 | goto change_menu 65 | 66 | :change_menu 67 | chain ${menu}.ipxe || goto error 68 | goto main_menu 69 | 70 | :error 71 | echo Error occured, press any key to return to menu ... 72 | prompt 73 | goto main_menu 74 | 75 | :local 76 | echo Booting from local disks ... 77 | exit 0 78 | 79 | :shell 80 | echo Type "exit" to return to menu. 81 | set menu main_menu 82 | shell 83 | goto main_menu 84 | 85 | :changebits 86 | iseq ${arch} x86_64 && set arch i386 || set arch x86_64 87 | goto main_menu 88 | 89 | :sig_check 90 | iseq ${sigs_enabled} true && set sigs_enabled false || set sigs_enabled true 91 | goto main_menu 92 | 93 | :about 94 | chain https://boot.netboot.xyz/about.ipxe || chain about.ipxe 95 | goto main_menu 96 | 97 | :custom-github 98 | chain https://raw.githubusercontent.com/${github_user}/netboot.xyz-custom/master/custom.ipxe || goto error 99 | goto main_menu 100 | 101 | :custom-url 102 | chain ${custom_url}/custom.ipxe || goto error 103 | goto main_menu 104 | 105 | :custom-user 106 | chain custom/custom.ipxe 107 | goto main_menu 108 | -------------------------------------------------------------------------------- /boot.cfg: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | :global_vars 4 | # set site name 5 | set site_name netboot.xyz 6 | 7 | # set boot domain 8 | set boot_domain boot.netboot.xyz/2.0.38 9 | 10 | # set location of memdisk 11 | set memdisk http://${boot_domain}/memdisk 12 | 13 | # set location of custom netboot.xyz live assets 14 | set live_endpoint https://github.com/netbootxyz 15 | 16 | # set location of local netboot.xyz live assets 17 | set live_endpoint_local http://192.168.1.2:8080 18 | 19 | # signature check enabled? 20 | set sigs_enabled false 21 | 22 | # set location of signatures for sources 23 | set sigs http://${boot_domain}/sigs/ 24 | 25 | # set location of latest iPXE 26 | iseq ${platform} efi && set ipxe_disk netboot.xyz-snponly.efi || set ipxe_disk netboot.xyz-undionly.kpxe 27 | 28 | # set default boot timeout 29 | set boot_timeout 300000 30 | 31 | ###################################### 32 | # Media Locations for Licensed Distros 33 | ###################################### 34 | 35 | set rhel_base_url 36 | set win_base_url 37 | 38 | ################## 39 | # official mirrors 40 | ################## 41 | :mirrors 42 | ### AlmaLinux 43 | set almalinux_mirror https://repo.almalinux.org 44 | set almalinux_base_dir almalinux 45 | 46 | ### Alpine Linux 47 | set alpinelinux_mirror http://dl-cdn.alpinelinux.org 48 | set alpinelinux_base_dir alpine 49 | 50 | ### Arch Linux 51 | set archlinux_mirror mirrors.evowise.com 52 | set archlinux_base_dir archlinux 53 | 54 | ### CentOS 55 | set centos_mirror http://mirror.centos.org 56 | set centos_base_dir centos 57 | 58 | ### Debian 59 | set debian_mirror http://deb.debian.org 60 | set debian_base_dir debian 61 | 62 | ### Devuan 63 | set devuan_mirror http://deb.devuan.org 64 | set devuan_base_dir devuan 65 | 66 | ### Fedora 67 | set fedora_mirror http://download.fedoraproject.org 68 | set fedora_base_dir pub/fedora/linux 69 | 70 | ### Fedora CoreOS 71 | set coreos_mirror https://builds.coreos.fedoraproject.org 72 | set coreos_base_dir prod/streams 73 | 74 | ### FreeDOS 75 | set freedos_mirror http://www.freedos.org 76 | set freedos_base_dir download/download 77 | 78 | ### IPFire 79 | set ipfire_mirror https://downloads.ipfire.org 80 | set ipfire_base_dir releases/ipfire-2.x 81 | 82 | ### Kali Linux 83 | set kali_mirror http://http.kali.org 84 | set kali_base_dir kali 85 | 86 | ### Mageia 87 | set mageia_mirror http://mirrors.kernel.org 88 | set mageia_base_dir mageia 89 | 90 | ### OpenBSD 91 | set openbsd_mirror http://ftp.openbsd.org 92 | set openbsd_base_dir pub/OpenBSD 93 | 94 | ### OpenSUSE 95 | set opensuse_mirror http://download.opensuse.org 96 | set opensuse_base_dir distribution/leap 97 | 98 | ### RancherOS 99 | set rancheros_mirror http://releases.rancher.com 100 | set rancheros_base_dir os/latest 101 | 102 | ### Rocky Linux 103 | set rockylinux_mirror http://download.rockylinux.org 104 | set rockylinux_base_dir pub/rocky 105 | 106 | ### Scientific Linux 107 | set scientific_mirror http://ftp1.scientificlinux.org 108 | set scientific_base_dir linux/scientific 109 | 110 | ### Slackware 111 | set slackware_mirror http://mirror.rackspace.com 112 | set slackware_base_dir slackware 113 | 114 | ### SmartOS 115 | set smartos_mirror https://netboot.joyent.com/os/ 116 | set smartos_base_dir /platform/i86pc/ 117 | 118 | ### Ubuntu 119 | set ubuntu_mirror http://archive.ubuntu.com 120 | set ubuntu_base_dir ubuntu 121 | 122 | ################################################# 123 | # determine architectures and enable menu options 124 | ################################################# 125 | :architectures 126 | set menu_linux 1 127 | set menu_bsd 1 128 | set menu_unix 1 129 | set menu_freedos 1 130 | set menu_live 1 131 | set menu_windows 1 132 | set menu_utils 1 133 | iseq ${buildarch} i386 && goto x86_64 || 134 | iseq ${buildarch} x86_64 && goto x86_64 || 135 | iseq ${buildarch} arm64 && goto arm64 || 136 | goto architectures_end 137 | :x86_64 138 | iseq ${platform} efi && goto efi || 139 | goto architectures_end 140 | :arm64 141 | set menu_linux 0 142 | set menu_linux_arm 1 143 | set menu_unix 0 144 | set menu_freedos 0 145 | set menu_live 0 146 | set menu_live_arm 1 147 | set menu_windows 0 148 | set menu_utils 0 149 | set menu_utils_arm 1 150 | iseq ${platform} efi && goto efi || 151 | goto architectures_end 152 | :efi 153 | set menu_bsd 0 154 | set menu_freedos 0 155 | set menu_unix 0 156 | goto architectures_end 157 | :architectures_end 158 | goto clouds 159 | 160 | ################################### 161 | # set iPXE cloud provider specifics 162 | ################################### 163 | :clouds 164 | iseq ${ipxe_cloud_config} gce && goto gce || 165 | iseq ${ipxe_cloud_config} packet && goto packet || 166 | goto clouds_end 167 | 168 | :gce 169 | set cmdline console=ttyS0,115200n8 170 | goto clouds_end 171 | 172 | :packet 173 | iseq ${buildarch} i386 && goto packet_x86_64 || 174 | iseq ${buildarch} x86_64 && goto packet_x86_64 || 175 | iseq ${buildarch} arm64 && goto packet_arm64 || 176 | goto clouds_end 177 | 178 | :packet_x86_64 179 | set cmdline console=ttyS1,115200n8 180 | iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe 181 | set menu_freedos 0 182 | set menu_windows 0 183 | set menu_utils 0 184 | goto clouds_end 185 | 186 | :packet_arm64 187 | set cmdline console=ttyAMA0,115200 188 | set ipxe_disk netboot.xyz-packet-arm64.efi 189 | set menu_bsd 0 190 | set menu_freedos 0 191 | set menu_live 0 192 | set menu_windows 0 193 | set menu_utils 0 194 | goto clouds_end 195 | 196 | :clouds_end 197 | goto end 198 | 199 | :end 200 | exit 201 | --------------------------------------------------------------------------------