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/

评论

  1. 11
    Windows Chrome 86.0.4240.198
    2年前
    2022-3-21 20:27:37

    root@mythsero:~# PVE-Kernel
    -bash: PVE-Kernel: command not found
    root@mythsero:~# ~/PVE-Kernel# ls
    -bash: /root/PVE-Kernel#: No such file or directory
    root@mythsero:~# ls
    PVE-Kernel PVE-Kernel.zip
    root@mythsero:~#

    这个怎么破,文件放到root下面了

  2. lurker325
    Windows Chrome 98.0.4758.102
    2年前
    2022-2-28 19:30:16

    内核版本比修改版高的也可以吗?

    • 佛西 博主
      Windows Edge 98.0.1108.62
      2年前
      2022-3-01 15:09:09

      只要符合pve版本的内核都可以,例如pve7,那么使用5.13,5.15都可以。

  3. Aliez
    Windows Edge 97.0.1072.55
    2年前
    2022-1-10 2:10:05

    写的很好,不过补充一点,当使用的pve版本大于博主(7.0-13)时,内核启动是优先版本最新的,需要手动切换内核启动顺序
    方法如下:
    grep menuentry /boot/grub/grub.cfg 检查启动顺序
    看到名为"Advanced options for Proxmox VE GNU/Linux"的二级菜单下有"Proxmox VE GNU/Linux, with Linux 5.13.18-1-pve"的内核

    vim /etc/default/grub中修改
    GRUB_DEFAULT="1>2" #(数字为启动项顺序)
    或者
    GRUB_DEFAULT="Advanced options for Proxmox VE GNU/Linux>Proxmox VE GNU/Linux, with Linux 5.13.18-1-pve"

    update-grub
    reboot

    第二种方法是pve重启后会有个启动界面,选择第二个再选择新安装的自定义内核


Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/wwwroot/foxi.buduanwang.vip_80/wwwroot/wp-content/themes/argon-theme-master/functions.php on line 1383

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇