Proxmox installation via PXE: solution

Ok solved :cool:

What was the problem? ... on all us servers we use unixacl's. On most folders the executables will discarded on creating files. And a other ACL's. I don't know what, but since 4.3 the initrd.iso.img was no working anymore. Easy solution: Remove all ACL's from buildfolder.
 
Hello, everyone!
Solution works fine with 4.x version, but i have no luck with fresh 5.1

Code:
  label proxmox-install 5
        menu label Install Proxmox 5
        linux images/linux/proxmox/5_1/linux26
        initrd images/linux/proxmox/5_1/initrd.img
        append vga=791 ramdisk_size=1048576 rw splash=verbose

With this config booting starts, and then reboot, so i not to be able to read what error causes it.
 
Hi, works fine with TFTP!! With tftp + http not working...I get the error is cannot connect http://192.168.0.33/boot/initrd.img (is accesible, works in my web browser or wget) Thanks for all.

I have a questions:

1- TFTP is slow when transfer the image initrd.img of proxmox... Is possible TFTP + NFS for linux26 and initrd.img?

2- Is possible send options to append?? like this:

label proxmox-install-5.1-3
menu label Install Proxmox 5.1-3
linux proxmox/5.1-3/linux26
append vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw quiet linux ext4 maxroot=15 timezone=Europe/Madrid splash=verbose
initrd proxmox/5.1-3/initrd.img

Work fine but the timezone not working....

3- The last, is possible customize proxmox install?? for example:

I like the older name network cards "ethX", for this:

# vim /etc/default/grub:

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

# update-grub

# reboot

But I exec every command in every proxmox... Is possible customize proxmox iso and later, generate the boot images for tftp server??

Thanks in advanced.
 
2- Is possible send options to append?? like this:

Yes. Sending them is one side, understanding them in the installer is the other. If the installer does not support, you're out of luck.

3- The last, is possible customize proxmox install?? for example:

You can always remaster the ISO yourself, yet this is a reverse engineering job. Maybe it is easier to install PVE on top of a plain old Debian preseed installation, which is well documented with respect to PXE booting and customizing.
 
@admintmt try by using ramdisk_size=16777216 which is 16M, instead of 1048576 which is barely 1M (I know, I am a little bit late).

Anyway, I cannot manage to start an installation (via PXE) of PVE 5.2-1.
I have used @morph027 's script and obtained linux26 and initrd.iso.img files, but it seems that maybe something goes wrong just right after having loaded initrd.

Here you have md5 hashes of boot files
Code:
$ md5sum pxeboot/linux26
0add55c250a459b0f27207edd4738558  pxeboot/linux26
$ md5sum pxeboot/initrd.iso.img
01e12e6c882c2110e040fa0b702fb3d4  pxeboot/initrd.iso.img

How can I troubleshoot this issue?
 
@admintmt try by using ramdisk_size=16777216 which is 16M, instead of 1048576 which is barely 1M (I know, I am a little bit late).

Anyway, I cannot manage to start an installation (via PXE) of PVE 5.2-1.
I have used @morph027 's script and obtained linux26 and initrd.iso.img files, but it seems that maybe something goes wrong just right after having loaded initrd.

Here you have md5 hashes of boot files
Code:
$ md5sum pxeboot/linux26
0add55c250a459b0f27207edd4738558  pxeboot/linux26
$ md5sum pxeboot/initrd.iso.img
01e12e6c882c2110e040fa0b702fb3d4  pxeboot/initrd.iso.img

How can I troubleshoot this issue?
Maybe similar: https://forum.proxmox.com/threads/proxmox-installation-via-pxe-solution.8484/page-4#post-175010

Have you tested it localy on you workstation?
 
Similar instructions to previous PVE editions, with the exception that the compressed kernel image (initramfs) is compressed using zstd instead of gzip:


Code:
mount -o loop /home/samba/public/IMAGES/Virtual\ Machine/Proxmox/proxmox-ve_7.0-1.iso /media/cdrom;
mkdir /tftpboot/pxe/images/proxmox/7.0;
cd /tftpboot/pxe/images/proxmox/7.0;
cp /media/cdrom/boot/linux26 .;
cp /media/cdrom/boot/initrd.img initrd.org.img;
umount /media/cdrom;
# Proxmox v6.4 and earlier:
  gzip -d -S ".img" initrd.org.img;
# Proxmox v7.0 and later:
  zstd -d initrd.org.img -o initrd.org;
mkdir initrd.tmp;
cd initrd.tmp;
cpio -i -d < ../initrd.org;
cp /home/samba/public/IMAGES/Virtual\ Machine/Proxmox/proxmox-ve_7.0-1.iso proxmox.iso;
find . | cpio -H newc -o > ../initrd;
cd ..;
# Proxmox v6.4 and earlier:
  gzip -9 -S ".img" initrd;
# Proxmox v7.0 and later:
  zstd initrd -o initrd.img;
rm -rf initrd.org initrd.tmp;
chown nobody.nobody . -R;
chmod ugo=rX . -R;


PXE Boot Menu:
  nano /tftpboot/pxe/pxelinux.cfg/linux-install
    LABEL proxmox-7.0
        MENU LABEL Proxmox 7.0 Install
        KERNEL images/proxmox/7.0/linux26
        APPEND initrd=images/proxmox/7.0/initrd.img splash=verbose vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw
 
  • Like
Reactions: Kan
Help!

Picking up this old thread: I'm getting a file-not-found error when executing @morph027's iPXE bootscript to install Proxmox VE 7.1 via PXE Boot.

With iPXE method, the client complains like this:

http://172.31.5.25/proxmox/7.1/initrd... ok
"http://172.31.5.25/proxmox/7.1/linux26 "vga=791%20video=vesafb:ywrap,mtrr%20ramdisk_size=16777216%20rw%20quiet%20initrd=initrd"splash=silent"... No such file or directory (https://ipxe.org/2d12603b)
Could not boot image: No such file or directory (https://ipxe.org/2d12603b)

The server is a Debian 11 box running ipxe, dnsmasq, and nginx. The initrd and linux26 files extracted OK from the ISO file. They live in /var/www/proxmox/7.1 and are world readable. I also tried the same install with 7.2 and hit the same error.

Thanks in advance for troubleshooting clues.

/etc/dnsmasq.conf:

# enable logs if required
log-queries
log-dhcp

# disable DNS server
port=0

# listen on PXEBOOT vlan (vlan110) only
listen-address=172.31.5.25
interface=ens32

# enable built-in tftp server
enable-tftp
tftp-root=/tftpboot


# DHCP range
dhcp-range=172.31.5.128,172.31.5.254,255.255.255.0,24h

# Default gateway
dhcp-option=3,172.31.5.1

# Domain name - homelab.net
dhcp-option=15,ipmi.example.tld

# Broadcast address
dhcp-option=28,172.31.5.255

# Set interface MTU to 9000 bytes (jumbo frame)
# Enable only when your network supports it
dhcp-option=26,9198

# Tag dhcp request from iPXE
dhcp-match=set:ipxe,175

# inspect the vendor class string and tag BIOS client
dhcp-vendorclass=BIOS,PXEClient:Arch:00000

# 1st boot file - Legacy BIOS client
dhcp-boot=tag:!ipxe,tag:BIOS,undionly.kpxe,172.31.5.25

# 1st boot file - EFI client
# at the moment all non-BIOS clients are considered
# EFI client
dhcp-boot=tag:!ipxe,tag:!BIOS,ipxe.efi,172.31.5.25

# 2nd boot file
dhcp-boot=tag:ipxe,/pxelinux.0


/tftpboot/pxelinux.0 (this is really morph027's iPXE bootscript with one modfication to set a "webserver" variable since it's called later in the script):

#!ipxe
dhcp
set webserver http://172.31.5.25
set serverip http://172.31.5.25
set pveversion 7.1
set opts "vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw quiet initrd=initrd"
menu Please choose an operating system to boot
item normal Install Proxmox
item debug Install Proxmox (Debug Mode)
choose --default normal --timeout 5000 target && goto ${target}
:debug
set kernel "${webserver}/proxmox/${pveversion}/linux26 ${opts} splash=verbose proxdebug"
goto init
:normal
set kernel "${webserver}/proxmox/${pveversion}/linux26 ${opts} splash=silent"
goto init
:init
initrd ${webserver}/proxmox/${pveversion}/initrd
chain ${kernel}

contents of /var/www/html/proxmox/7.1:

root@pxeboot:/tftpboot# ls -l /var/www/html/proxmox/7.1
total 1158896
-rw-r--r-- 1 root root 1176654336 Jul 20 19:26 initrd
-rwxr-xr-x 1 root root 10047424 Jul 20 19:26 linux26
 
Help!

Picking up this old thread: I'm getting a file-not-found error when executing @morph027's iPXE bootscript to install Proxmox VE 7.1 via PXE Boot.

With iPXE method, the client complains like this:

http://172.31.5.25/proxmox/7.1/initrd... ok
"http://172.31.5.25/proxmox/7.1/linux26 "vga=791%20video=vesafb:ywrap,mtrr%20ramdisk_size=16777216%20rw%20quiet%20initrd=initrd"splash=silent"... No such file or directory (https://ipxe.org/2d12603b)
Could not boot image: No such file or directory (https://ipxe.org/2d12603b)

The server is a Debian 11 box running ipxe, dnsmasq, and nginx. The initrd and linux26 files extracted OK from the ISO file. They live in /var/www/proxmox/7.1 and are world readable. I also tried the same install with 7.2 and hit the same error.

Thanks in advance for troubleshooting clues.

/etc/dnsmasq.conf:

# enable logs if required
log-queries
log-dhcp

# disable DNS server
port=0

# listen on PXEBOOT vlan (vlan110) only
listen-address=172.31.5.25
interface=ens32

# enable built-in tftp server
enable-tftp
tftp-root=/tftpboot


# DHCP range
dhcp-range=172.31.5.128,172.31.5.254,255.255.255.0,24h

# Default gateway
dhcp-option=3,172.31.5.1

# Domain name - homelab.net
dhcp-option=15,ipmi.example.tld

# Broadcast address
dhcp-option=28,172.31.5.255

# Set interface MTU to 9000 bytes (jumbo frame)
# Enable only when your network supports it
dhcp-option=26,9198

# Tag dhcp request from iPXE
dhcp-match=set:ipxe,175

# inspect the vendor class string and tag BIOS client
dhcp-vendorclass=BIOS,PXEClient:Arch:00000

# 1st boot file - Legacy BIOS client
dhcp-boot=tag:!ipxe,tag:BIOS,undionly.kpxe,172.31.5.25

# 1st boot file - EFI client
# at the moment all non-BIOS clients are considered
# EFI client
dhcp-boot=tag:!ipxe,tag:!BIOS,ipxe.efi,172.31.5.25

# 2nd boot file
dhcp-boot=tag:ipxe,/pxelinux.0


/tftpboot/pxelinux.0 (this is really morph027's iPXE bootscript with one modfication to set a "webserver" variable since it's called later in the script):

#!ipxe
dhcp
set webserver http://172.31.5.25
set serverip http://172.31.5.25
set pveversion 7.1
set opts "vga=791 video=vesafb:ywrap,mtrr ramdisk_size=16777216 rw quiet initrd=initrd"
menu Please choose an operating system to boot
item normal Install Proxmox
item debug Install Proxmox (Debug Mode)
choose --default normal --timeout 5000 target && goto ${target}
:debug
set kernel "${webserver}/proxmox/${pveversion}/linux26 ${opts} splash=verbose proxdebug"
goto init
:normal
set kernel "${webserver}/proxmox/${pveversion}/linux26 ${opts} splash=silent"
goto init
:init
initrd ${webserver}/proxmox/${pveversion}/initrd
chain ${kernel}

contents of /var/www/html/proxmox/7.1:

root@pxeboot:/tftpboot# ls -l /var/www/html/proxmox/7.1
total 1158896
-rw-r--r-- 1 root root 1176654336 Jul 20 19:26 initrd
-rwxr-xr-x 1 root root 10047424 Jul 20 19:26 linux26

Answering my own question:

What finally worked was formatting the opts variable in the form of PHP options, starting with a question mark and using ampersands instead of spaces as delimiters:

set opts ?vga=791&video=vesafb:ywrap,mtrr&ramdisk_size=16777216&rw&quiet&initrd=initrd&splash=silent

and then losing the quotes and spaces in the kernel line:

set kernel webserver/proxmox/{pveversion}/linux26${opts}
 
I quickly read through this topic, so may I add a few little pointers if it helps...

Using UEFI with HTTP PXE boot, you don't even need a TFTP server of any kind. All you need is DHCP + HTTP(S) :)

On the DHCP HOST cfg:

set vendor-string = option vendor-class-identifier;

if option pxe-system-type = 00:10 or option pxe-system-type = 00:16 { # x64 UEFI HTTP option vendor-class-identifier "HTTPClient"; filename "http://<DHCPHOST>/uefi/shimx64.efi"; }
else if option pxe-system-type = 00:13 { # aarch64 UEFI HTTP option vendor-class-identifier "HTTPClient"; filename "http://dhcphost/uefi/<the file>"; }
else { option vendor-class-identifier "HTTPClient"; filename "http://dhcphost/uefi/shimx64.efi"; }

Then for each host i.e.
host <hostname> {
hardware ethernet <Mac ADDR> ; server-name "<hostname>" ; fixed-address <IP>; }
host <hostname> {
hardware ethernet <Mac ADDR> ; server-name "<hostname>" ; fixed-address <IP>; }
etc...

In Grub.cfg (As I have many VMs within my env, I can therefore do a PXE install per host matching to a per KS file.)

menuentry "master" {configfile (http)/uefi/boot/$net_default_ip }

In your KS profile as example, note mainly the linuxefi (http) and initrdefi (http)

menuentry 'Install Fedora' --class fedora --class gnu-linux --class gnu --class os { linuxefi (http)/img/vmlinuz selinux=0 inst.selinux=0 inst.zram=0 inst.ks=http://dhcphost/ks/ks.ks initrdefi (http)/img/initrd.img
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!