update-initramfs -u -k still updates both images

jena

Member
Jul 9, 2020
47
7
13
33
Hello,

1. Because I passthrough the only graphics card, once the PVE gets to "Reading all physical volumes...", I no longer can use the console.
If I make some change that lock myself out of web interface (for example, change network config), I guess that I have no way to get into the system?

So I thought that I could roll back (comment out) lines in /etc/modprobe.d/blacklist.conf and /etc/modprobe.d/vfio.conf,
and then update-initramfs -u -k [a old version of kernel].

Since my PVE alway keep a old version (roll back to no passthrough) and the latest version (with GPU passthrough) in the grub menu.
I can thus use the old version to get to console to make changes.

However, every time I did update-initramfs -u -k [a old version of kernel], it updated both (I checked by observing if the I can get to console).
So both kernel images roll back to no passthrough.
Code:
update-initramfs -u -k 5.4.157-1-pve
update-initramfs: Generating /boot/initrd.img-5.4.157-1-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/XXXXX
        Copying kernel and creating boot-entry for 5.4.119-1-pve
        Copying kernel and creating boot-entry for 5.4.157-1-pve
Copying and configuring kernels on /dev/disk/by-uuid/B53D-235B
        Copying kernel and creating boot-entry for 5.4.119-1-pve
        Copying kernel and creating boot-entry for 5.4.157-1-pve

I checked the update-initramfs.conf has "Default=yes".

How can I achieve to only update one of the kernel image?

Default is yes for running the latest initramfs-tools hooks in the newest Linux image. Setting it to all updates any known initramfs. It is possible to set it to no for remote servers or boxes where conservative manners needs to be applied. This disables the update_initramfs -u call. https://www.systutorials.com/docs/linux/man/5-update-initramfs.conf/

2. I have to plug the a NVIDIA GPU that I'd like to passthrough in first slot.
I don't need to passthrough AMD's GPU. If I have a old AMD graphics card, I can plug it in slot 2 and not blacklist Radeon driver.
Will I get console display on the AMD card?
 
Last edited:
How can I achieve to only update one of the kernel image?
i don't see from the log that it updates both initramfs images, only the one you specified:
update-initramfs: Generating /boot/initrd.img-5.4.157-1-pve
it just copies the config for all kernels again, but does not generate the initrd.img...

Will I get console display on the AMD card?
this depends largely on your mainboard which card gets initialized for the boot... (sometimes there is an option, sometimes it hides behind the uefi/csm setting, and sometimes it simply uses a specific slot order...)
 
i don't see from the log that it updates both initramfs images, only the one you specified:

it just copies the config for all kernels again, but does not generate the initrd.img...


this depends largely on your mainboard which card gets initialized for the boot... (sometimes there is an option, sometimes it hides behind the uefi/csm setting, and sometimes it simply uses a specific slot order...)
Hi Dominik. Thank you for the reply.

1. I meant the blacklist.conf and vfio.conf were copied to both kernel.
My goal is to only apply those two to one of the kernel.
In an event that I bricked the latest kernel, I can still boot to the other kernel to make changes (like ip address).
Otherwise I have no way to access the PVE web interface any more because the console display (frame buffer) form GPU is disabled.

2. My motherboard does not have option to select boot GPU. It is always #1.
But I Googled that in general, Linux can have multiple (host) console display on multiple GPU.

Not Debian, but probably similar
https://wiki.archlinux.org/title/multihead

The BIOS will still only be accessible by the GPU1, it is ok.
Once Proxmox (Debian 10) boots, the OS could be configured to display console on selected GPU? (like in Ubuntu, we can change display output settings)
 
1. I meant the blacklist.conf and vfio.conf were copied to both kernel.
they are not copied to the kernel, the simple are loaded from /etc ..
i am not sure if it's possible to have those files not loaded for specific kernel versions...

thats related to the X / Wayland config not the kernel display which always uses the 'boot' gpu decided by the bios. though it should be possible to unbind the default one and bind to another, though i don't have a guide on-hand at the moment
 
they are not copied to the kernel, the simple are loaded from /etc ..
i am not sure if it's possible to have those files not loaded for specific kernel versions...


thats related to the X / Wayland config not the kernel display which always uses the 'boot' gpu decided by the bios. though it should be possible to unbind the default one and bind to another, though i don't have a guide on-hand at the moment
Is adding a PCIe to RS232 Serial card an alternative to have Proxmox console access without using GPU1 (i.e. GPU1 is passed through)?
Thanks!
 
can be, but the you have to configure the kernel (with the kernel commandline) to not use a graphics output but the serial console
 

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!