19

pve-kernal 编译安装步骤

 3 years ago
source link: https://blog.frytea.com/archives/586/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

pve-kernal 编译安装步骤

October 20, 2021 • Read: 20 • 技术价值

本文首发于: https://blog.frytea.com/archives/586/

以 pve-release-6.x ,基于 debian buster 为例:

  • Step1: 配置国内 PVE 镜像源
# 配置 pve 软件包国内镜像源
$ echo "deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian buster pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
$ wget https://enterprise.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-6.x.gpg
  • Setp2:安装依赖包

Install build dependencies (i got these from the pve-kernel/debian/control file):

apt install asciidoc-base automake bc bison cpio debhelper dh-python file flex gcc git kmod libdw-dev libelf-dev libiberty-dev libnuma-dev libpve-common-perl libslang2-dev libssl-dev libtool lintian lz4 perl-modules python-minimal rsync sed sphinx-common tar xmlto zlib1g-dev
  • Step3:获取 pve-kernel 源码

Clone proxmox-kernel

git clone https://git.proxmox.com/git/pve-kernel.git
  • Step4:初始化子项目

initialize the submodules

make submodule

If that fails Fabian told me that you have cd in each submodule and do "git fetch --tags"

  • Step5:编译

It will build with ALL cores

会自动编译,不需要设置多线程,它会自动调用多线程编译。编译完当前目录的 .deb 包就是内核包,直接使用 dpkg -i 安装即可。

  • dwarves_1.20 too old
echo 'deb http://ftp.de.debian.org/debian sid main' > /etc/apt/sources.list
sudo apt-get update
sudo install dwarves
  • 磁盘空间不足,扩容
# 查看当前磁盘的分区形式,确定新磁盘的盘符
$ fdisk -l
# 开始分区(以 /dev/vda 为例)
$ fdisk /dev/vda
# 键入 n 继续,保持默认即可
# 键入 p 查看分区
# 键入 w 将分区写入分区表
# 将分区表同步到系统
$ partprobe
# 设置新分区的格式(以 /dev/xvda6 为例)
$ mkfs -t ext4 /dev/xvda6
# 将新分区挂载 (以 /opt 为例)
$ mount /dev/xvda6 /opt
# 查看挂载结果
$ df -TH

---------------------
Author: Frytea
Title: pve-kernal 编译安装步骤
Link: https://blog.frytea.com/archives/586/
Copyright: This work by TL-Song is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK