pve-iso-2-pxe
pve-iso-2-pxe copied to clipboard
Proxmox 8.2 auto install with answer file.
Hello,
I used pve-sio-2-pxe script and ipxe example to get proxmox booted using ipxe. That worked without issues. However, I notice that this removes the ability to automatically install proxmox with an answer file.
If I use my custom iso that I made as per proxmox instructions, using a USB the automated installation works. However, when I run the custom iso through the pve-iso-2-pxe.sh. I then copy the initrd and linux26, automation is no longer possible.
Command to create custom iso with answer :
proxmox-auto-install-assistant prepare-iso /path/to/source.iso --fetch-from http --url "https://10.0.0.100/get_answer/"
Docs : https://pve.proxmox.com/wiki/Automated_Installation (Answer Fetched via HTTP)
I found a thread : https://forum.proxmox.com/threads/auto-install-through-pxe.146270/
There is a suggestion that adding : proxmox-start-auto-installer to kernel cmdline might required. My ipxe script looks like
set opts ?vga=791&video=vesafb:ywrap,mtrr&ramdisk_size=16777216&rw&quiet&initrd=initrd
set kernel ${webserver}/linux26${opts}&splash=verbose&proxdebug
initrd ${webserver}/initrd
chain ${kernel}
I tried adding proxmox-start-auto-installer at the end of the set kernel line with &proxmox-start-auto-installer, however that did not work.
I am wondering if anyone has run into this issue or has any guidance on how to proceed.
Thank you.
Haven't tested this feature yet, but will try later.
Is there a reason you're using the question marks within the opts and kernel?
Can you try
set opts "vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw quiet initrd=initrd"
set kernel "${webserver}/linux26 ${opts} splash=verbose proxdebug proxmox-start-auto-installer"
initrd ${webserver}/initrd
chain ${kernel}
Hello,
Thank you for your response. So I tried the above. I get the following error :
set opts "vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw quiet initrd=initrd"
set kernel "${webserver}/linux26 ${opts} splash=verbose proxdebug proxmox-start-auto-installer"
initrd ${webserver}/initrd
chain ${kernel}
It seems it puts %20 into the spaces, which then makes the boot fail. I found the way I did it from this issue here : https://github.com/morph027/pve-iso-2-pxe/issues/32
Quoting the above issue :
The iPXE client loaded initrd OK but then returned file-not-found errors when trying to load linux26 with options. I think the syntax, with spaces, is an issue. My workaround was to change the "opts" value into the form of a PHP query, starting with a "?" and then delimiting each key/value pair with an "&" character:
set opts "?vga=791&video=vesafb:ywrap,mtrr&ramdisk_size=16777216&rw&quiet&initrd=initrd" .. set kernel "${webserver}/proxmox/${pveversion}/linux26${opts}&splash=silent
Note the lack of spaces in the "set kernel" line.
Also I am using iPXE 1.2.1, don't know if that matters. Thank you.
This is the way I got it to work
#!ipxe
dhcp
set webserver http://pxe.mylab.home
set path ${webserver}/proxmox/8.2
initrd ${path}/initrd
chain ${path}/linux26 proxmox-start-auto-installer
I nearly get it to work too "proxmox-ve_8.2-2-auto-from-http-url-fp.iso" on usb key installs fine but the converted into initrd+linux26 for ipxe usage, the installaton is failing on an uefi booted machine at the last stage (tried with filesystem = "xfs"|"zfs" on a single nvme disk machine) with the last lines of auto_installer.log reading:
INFO: progress 94.9 % - configuring pve-manager
INFO: progress 94.9 % - configuring proxmox-ve
INFO: progress 99.0 % - make system bootable
INFO: progress 100.0 % -
ERROR: Installation failed: low level installer returned early: bootloader setup errors:
- unable to update boot loader config
install-low-level-start-session.log (for filesystem = "xfs"):
2024-10-21 16:14:30.193 INFO: # umount /target/sys/firmware/efi/efivars
2024-10-21 16:14:30.199 INFO:
2024-10-21 16:14:30.199 INFO:
2024-10-21 16:14:30.199 INFO: # umount /target/sys
2024-10-21 16:14:30.204 INFO:
2024-10-21 16:14:30.204 INFO:
2024-10-21 16:14:30.204 INFO: # umount -d /target
2024-10-21 16:14:30.468 INFO:
2024-10-21 16:14:30.468 INFO:
2024-10-21 16:14:30.471 ERROR: installation failed: bootloader setup errors:
- unable to update boot loader config
2024-10-21 16:14:30.471 INFO: finished: err, bootloader setup errors:
- unable to update boot loader config
install-low-level-start-session.log (for filesystem = "zfs"):
2024-10-21 17:16:51.171 INFO: # umount /rpool/ROOT/pve-1/tmp/pkg
2024-10-21 17:16:51.176 INFO:
2024-10-21 17:16:51.176 INFO:
2024-10-21 17:16:51.176 INFO: # umount /rpool/ROOT/pve-1/tmp
2024-10-21 17:16:51.181 INFO:
2024-10-21 17:16:51.181 INFO:
2024-10-21 17:16:51.181 INFO: # umount /rpool/ROOT/pve-1/proc
2024-10-21 17:16:51.186 INFO:
2024-10-21 17:16:51.186 INFO:
2024-10-21 17:16:51.187 INFO: # umount /rpool/ROOT/pve-1/sys/firmware/efi/efivars
2024-10-21 17:16:51.192 INFO:
2024-10-21 17:16:51.192 INFO:
2024-10-21 17:16:51.192 INFO: # umount /rpool/ROOT/pve-1/sys
2024-10-21 17:16:51.197 INFO:
2024-10-21 17:16:51.197 INFO:
2024-10-21 17:16:51.197 INFO: # zfs umount -a
2024-10-21 17:16:51.404 INFO:
2024-10-21 17:16:51.404 INFO:
2024-10-21 17:16:51.404 INFO: # zfs set sync=standard rpool
2024-10-21 17:16:51.424 INFO:
2024-10-21 17:16:51.424 INFO:
2024-10-21 17:16:51.424 INFO: # zfs set mountpoint=/ rpool/ROOT/pve-1
2024-10-21 17:16:51.454 INFO:
2024-10-21 17:16:51.455 INFO:
2024-10-21 17:16:51.455 INFO: # zfs set mountpoint=/var/lib/vz rpool/var-lib-vz
2024-10-21 17:16:51.478 INFO:
2024-10-21 17:16:51.479 INFO:
2024-10-21 17:16:51.479 INFO: # zpool set bootfs=rpool/ROOT/pve-1 rpool
2024-10-21 17:16:51.495 INFO:
2024-10-21 17:16:51.495 INFO:
2024-10-21 17:16:51.496 INFO: # zpool export rpool
2024-10-21 17:16:51.627 INFO:
2024-10-21 17:16:51.627 INFO:
2024-10-21 17:16:51.629 ERROR: installation failed: bootloader setup errors:
- unable to update boot loader config
2024-10-21 17:16:51.629 INFO: finished: err, bootloader setup errors:
- unable to update boot loader config