Passing Kernel Parameters

Daxcor

Member
Oct 31, 2021
20
0
6
57
Hello,

I am trying to move all of my work to terraform. The iso I wish to launch, via terraform, has grub kernel parameters which I would like to set. Is this something proxmox can do?

Here is what the grub menu looks ike

1698864958392.png

I would need to add to the linux line. Has anyone been able to do this?

thanks
Brad
 
Here are the basic grub kernel parameters to boot into the Proxmox VE graphical installer:

Code:
setparams 'Install Proxmox VE (Graphical)'

    echo 'Loading Proxmox VE Installer ...'
    linux /boot/linux26 ro ramdisk_size=16777216 rw quiet splash=silent
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img
 
Here are the basic grub kernel parameters to boot into the Proxmox VE graphical installer:

Code:
setparams 'Install Proxmox VE (Graphical)'

    echo 'Loading Proxmox VE Installer ...'
    linux /boot/linux26 ro ramdisk_size=16777216 rw quiet splash=silent
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img
I am not looking send parameters to install proxmox, but to create a VM in proxmox with a specific iso and adding grub values.
 
You can usually press 'e' on the GRUB boot menu screen to edit the parameters. If you don't want to manually edit the parameters on every boot, you could modify the GRUB boot config (/boot/grub/grub.cfg) on the ISO.

Another option would be a direct kernel boot which would bypass GRUB and boot directly into Linux.
This can be achieved by specifying the QEMU arguments in /etc/pve/qemu-server/<vmid>.conf
Code:
args: -kernel /path/to/vmlinuz -initrd /path/to/initrd.img -append "root=UUID=23ee90b6-f0fb-49da-b613-c2d7bce04e5e"
 
  • Like
Reactions: Daxcor
Warning for ZFS users: if you are booting to ZFS disks, updating /etc/default/grub and update-grub will not help.

If you want to add pcie_port_pm=off pcie_aspm.policy=performance to the kernel even when booting on ZFS, you must add these parameters to /etc/kernel/cmdline and then run proxmox-boot-tool refresh. After the reboot, you should already find these parameters by cat /proc/cmdline.
 
Warning for ZFS users: if you are booting to ZFS disks, updating /etc/default/grub and update-grub will not help.
But only when booting in UEFI mode. More information in the manual: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysboot_determine_bootloader_used
If you want to add pcie_port_pm=off pcie_aspm.policy=performance to the kernel even when booting on ZFS, you must add these parameters to /etc/kernel/cmdline and then run proxmox-boot-tool refresh. After the reboot, you should already find these parameters by cat /proc/cmdline.
It's all in the manual (although a bit terse): https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysboot_edit_kernel_cmdline
 
  • Like
Reactions: jan.reges

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!