Proxmox VE pve7.0安装破解内核,解决iommu分组问题

本文以PVE7.0-13为例

首先推荐一下大佬的github

yfdoor/PVE-Kernel: Compile PVE-Kernel for IOMMU Group (YFDOOR) (github.com)

1、准备好内核

先进入大佬的github项目页,切换到分支,会git的就git,不会git的就下载zip

 

 

 

切换分支之后,点击下载zip就可以下载

 

 

2、安装内核

将内核放置到pve主机下的一个目录,如我的是/root下面

root@pve2:~/PVE-Kernel# ls
pve-kernel-5.13.14-1  pve-kernel-5.13.18-1  README.MD
root@pve2:~/PVE-Kernel# 

注意这里有2个文件夹,对应着不同的内核版本。自己选择一个就行,建议还是选择新内核

进入新内核文件夹,可以看到有多个deb文件。这些就是破解后的内核文件。

root@pve2:~/PVE-Kernel/pve-kernel-5.13.18-1# ls
linux-tools-5.13_5.13.18-1_amd64.deb	       pve-kernel-5.13.18-1-pve_5.13.18-1_amd64.deb
linux-tools-5.13-dbgsym_5.13.18-1_amd64.ddeb   pve-kernel-libc-dev_5.13.18-1_amd64.deb
pve-headers-5.13.18-1-pve_5.13.18-1_amd64.deb

使用命令

dpkg -i *.deb

开始安装内核。

正常的情况如下,如果不是,请注意!不要继续。

root@pve2:~/PVE-Kernel/pve-kernel-5.13.18-1# dpkg -i *.deb
(Reading database ... 180164 files and directories currently installed.)
Preparing to unpack linux-tools-5.13_5.13.18-1_amd64.deb ...
Unpacking linux-tools-5.13 (5.13.18-1) over (5.13.14-1) ...
Preparing to unpack linux-tools-5.13-dbgsym_5.13.18-1_amd64.ddeb ...
Unpacking linux-tools-5.13-dbgsym (5.13.18-1) over (5.13.14-1) ...
Preparing to unpack pve-headers-5.13.18-1-pve_5.13.18-1_amd64.deb ...
Unpacking pve-headers-5.13.18-1-pve (5.13.18-1) over (5.13.18-1) ...
Selecting previously unselected package pve-kernel-5.13.18-1-pve.
Preparing to unpack pve-kernel-5.13.18-1-pve_5.13.18-1_amd64.deb ...
Unpacking pve-kernel-5.13.18-1-pve (5.13.18-1) ...
Preparing to unpack pve-kernel-libc-dev_5.13.18-1_amd64.deb ...
Unpacking pve-kernel-libc-dev (5.13.18-1) over (5.13.14-1) ...
Setting up linux-tools-5.13 (5.13.18-1) ...
Setting up linux-tools-5.13-dbgsym (5.13.18-1) ...
Setting up pve-headers-5.13.18-1-pve (5.13.18-1) ...
Setting up pve-kernel-5.13.18-1-pve (5.13.18-1) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.13.18-1-pve /boot/vmlinuz-5.13.18-1-pve
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.13.18-1-pve /boot/vmlinuz-5.13.18-1-pve
update-initramfs: Generating /boot/initrd.img-5.13.18-1-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
run-parts: executing /etc/kernel/postinst.d/proxmox-auto-removal 5.13.18-1-pve /boot/vmlinuz-5.13.18-1-pve
run-parts: executing /etc/kernel/postinst.d/zz-proxmox-boot 5.13.18-1-pve /boot/vmlinuz-5.13.18-1-pve
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.13.18-1-pve /boot/vmlinuz-5.13.18-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.18-1-pve
Found initrd image: /boot/initrd.img-5.13.18-1-pve
Found linux image: /boot/vmlinuz-5.11.22-5-pve
Found initrd image: /boot/initrd.img-5.11.22-5-pve
Found linux image: /boot/vmlinuz-5.4.124-1-pve
Found initrd image: /boot/initrd.img-5.4.124-1-pve
Found linux image: /boot/vmlinuz-5.4.106-1-pve
Found initrd image: /boot/initrd.img-5.4.106-1-pve
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Adding boot menu entry for EFI firmware configuration
done
Setting up pve-kernel-libc-dev (5.13.18-1) ...
Processing triggers for man-db (2.9.4-2) ...

内核安装完成之后,在grub文件里添加一个参数pcie_acs_override=downstream

grub如下

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on  pcie_acs_override=downstream"
GRUB_CMDLINE_LINUX=""

随后进行保存,并且更新内核,更新grub

update-grub
update-initramfs -k all -u 

随后重启

3、验证

使用命令验证

for d in /sys/kernel/iommu_groups/*/devices/*; do      n=${d#*/iommu_groups/*}; n=${n%%/*};     printf 'IOMMU Group %s ' "$n";     lspci -nns "${d##*/}"; done;

我的输出如下

root@pve2:~/PVE-Kernel/pve-kernel-5.13.18-1# for d in /sys/kernel/iommu_groups/*/devices/*; do      n=${d#*/iommu_groups/*}; n=${n%%/*};     printf 'IOMMU Group %s ' "$n";     lspci -nns "${d##*/}"; done;
IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec4] (rev 0a)
IOMMU Group 10 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8] (rev 31)
IOMMU Group 11 01:00.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ba)
IOMMU Group 12 02:08.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ba)
IOMMU Group 13 02:10.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ba)
IOMMU Group 14 03:00.0 3D controller [0302]: NVIDIA Corporation GK104GL [GRID K2] [10de:11bf] (rev a1)
IOMMU Group 15 04:00.0 3D controller [0302]: NVIDIA Corporation GK104GL [GRID K2] [10de:11bf] (rev a1)
IOMMU Group 16 05:00.0 Ethernet controller [0200]: Mellanox Technologies MT27500 Family [ConnectX-3] [15b3:1003]
IOMMU Group 17 06:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]
IOMMU Group 18 07:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 04)
IOMMU Group 19 09:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 0a)
IOMMU Group 2 00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] [8086:3e9b]
IOMMU Group 3 00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)
IOMMU Group 4 00:17.0 SATA controller [0106]: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] [8086:a102] (rev 31)
IOMMU Group 5 00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 [8086:a114] (rev f1)
IOMMU Group 6 00:1d.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 [8086:a118] (rev f1)
IOMMU Group 7 00:1d.2 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #11 [8086:a11a] (rev f1)
IOMMU Group 8 00:1d.3 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #12 [8086:a11b] (rev f1)
IOMMU Group 9 00:1f.0 ISA bridge [0601]: Intel Corporation B150 Chipset LPC/eSPI Controller [8086:a148] (rev 31)
IOMMU Group 9 00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121] (rev 31)
IOMMU Group 9 00:1f.3 Audio device [0403]: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] (rev 31)
IOMMU Group 9 00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)

我的原本是一张K2的显卡,在同一个组,现在已经分成2个组了如上7、8行,能够同时直通。

教程结束。

 

版权声明:
作者:佛西
链接:https://foxi.buduanwang.vip/virtualization/pve/1522.html/
文章版权归作者所有,未经允许请勿转载
如需获得支持,请点击网页右上角
THE END
分享
二维码
海报
Proxmox VE pve7.0安装破解内核,解决iommu分组问题
pve7 直通 iommu分组
<<上一篇
下一篇>>
文章目录
关闭
目 录