2020-04-28 13:14:26 +00:00
|
|
|
# Proxmox Edge kernels
|
|
|
|
Custom Linux kernels for Promox VE 6.
|
2020-07-06 21:00:35 +00:00
|
|
|
|
|
|
|
#### Versions
|
2021-04-19 08:12:03 +00:00
|
|
|
1. Linux 5.11 (Stable)
|
|
|
|
2. Linux 5.10 (Long-term)
|
2020-07-06 21:00:35 +00:00
|
|
|
|
|
|
|
#### Flavors
|
|
|
|
1. Proxmox
|
2020-08-09 21:58:24 +00:00
|
|
|
2. [Navi Reset](https://github.com/fabianishere/pve-edge-kernel/issues/5)
|
2020-07-06 21:00:35 +00:00
|
|
|
|
|
|
|
## Installation
|
2021-04-19 08:12:03 +00:00
|
|
|
Select from the [Releases](https://github.com/fabianishere/pve-edge-kernel/releases)
|
|
|
|
page the kernel version you want to install and download the appropriate Debian package.
|
|
|
|
Then, you can install the package as follows:
|
2020-07-06 21:00:35 +00:00
|
|
|
|
|
|
|
```sh
|
2021-04-18 09:30:19 +00:00
|
|
|
apt install ./pve-kernel-VERSION-MARCH_VERSION_amd64.deb
|
2020-07-06 21:00:35 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## AppArmor issues
|
2021-04-19 08:12:03 +00:00
|
|
|
When using these kernels, Proxmox's AppArmor profiles may fail to load since it
|
|
|
|
uses an older AppArmor feature set which is not supported by these kernels anymore.
|
|
|
|
This issue also appears when launching LXC containers.
|
|
|
|
To fix this, tell AppArmor to use the stock features file as opposed to
|
|
|
|
Proxmox's features file, which is done by updating `/etc/apparmor/parser.conf` as follows:
|
2020-07-06 21:00:35 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
## Pin feature set (avoid regressions when policy is lagging behind
|
|
|
|
## the kernel)
|
|
|
|
# lxc-pve diverts to old feature file that is incompatible with kernel
|
|
|
|
# features-file=/usr/share/apparmor-features/features
|
|
|
|
features-file=/usr/share/apparmor-features/features.stock
|
|
|
|
```
|
|
|
|
|
2020-08-10 14:32:29 +00:00
|
|
|
## Building manually
|
|
|
|
You may also choose to manually build one of these kernels yourself.
|
|
|
|
|
|
|
|
#### Prerequisites
|
2021-04-19 08:12:03 +00:00
|
|
|
Make sure you have at least 10GB of free space available and have the following
|
2020-08-10 14:32:29 +00:00
|
|
|
packages installed:
|
|
|
|
|
|
|
|
```bash
|
2021-04-19 08:12:03 +00:00
|
|
|
apt install devscripts debuild equivs
|
2020-09-16 18:34:27 +00:00
|
|
|
```
|
2021-04-19 08:12:03 +00:00
|
|
|
In case you are building a kernel version >= 5.8, make sure you have installed
|
|
|
|
at least [dwarves >= 1.16.0](https://packages.debian.org/bullseye/dwarves).
|
|
|
|
Unfortunately, this version is currently only available in the Debian Testing
|
|
|
|
and Debian Unstable repositories. To work around this issue, we describe two options:
|
|
|
|
|
|
|
|
1. You may add the Debian Testing repository to your APT sources as described
|
|
|
|
[here](https://serverfault.com/a/382101) and install the newer `dwarves` package as follows:
|
|
|
|
```shell
|
|
|
|
apt install -t testing dwarves
|
|
|
|
```
|
|
|
|
2. Alternatively, you may [download](https://packages.debian.org/bullseye/dwarves)
|
|
|
|
the newer `dwarves` (>= 1.16) package from the Debian website and install the
|
|
|
|
package manually, for example:
|
|
|
|
```shell
|
|
|
|
wget http://ftp.us.debian.org/debian/pool/main/d/dwarves-dfsg/dwarves_1.17-1_amd64.deb
|
|
|
|
apt install ./dwarves_1.17-1_amd64.deb
|
|
|
|
```
|
2020-08-10 14:32:29 +00:00
|
|
|
|
|
|
|
#### Obtaining the source
|
2021-04-18 17:55:44 +00:00
|
|
|
Obtain the source code as follows:
|
2020-08-10 14:32:29 +00:00
|
|
|
```bash
|
|
|
|
git clone https://github.com/fabianishere/pve-edge-kernel
|
2021-04-19 08:12:03 +00:00
|
|
|
cd pve-edge-kernel
|
2021-04-18 17:55:44 +00:00
|
|
|
```
|
|
|
|
Then, select the branch of your likings (e.g. `v5.10.x`) and update the submodules:
|
|
|
|
```bash
|
|
|
|
git checkout v5.10.x
|
2021-03-15 19:34:24 +00:00
|
|
|
git submodule update --init --depth=1 --recursive linux
|
2020-09-16 18:07:02 +00:00
|
|
|
git submodule update --init --recursive
|
2020-08-10 14:32:29 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Building
|
2021-04-19 08:12:03 +00:00
|
|
|
First, create the control file for your kernel:
|
2020-08-10 14:32:29 +00:00
|
|
|
```bash
|
2021-04-18 17:55:44 +00:00
|
|
|
debian/rules debian/control
|
2021-04-19 08:12:03 +00:00
|
|
|
```
|
|
|
|
Before we build, make sure you have installed the build dependencies:
|
|
|
|
```bash
|
|
|
|
sudo mk-build-deps --install debian/control
|
|
|
|
```
|
|
|
|
Invoking the following command will build the kernel and its associated packages:
|
|
|
|
```bash
|
2021-04-18 17:55:44 +00:00
|
|
|
debuild --jobs=auto -ePVE* -b -uc -us
|
2020-08-10 14:32:29 +00:00
|
|
|
```
|
|
|
|
The Makefile provides several environmental variables to control:
|
|
|
|
|
|
|
|
1. `PVE_BUILD_FLAVOR`
|
|
|
|
The name of the kernel flavor which represents a selection of kernel
|
|
|
|
functionality (e.g. [hardened](https://github.com/anthraxx/linux-hardened) or [zen](https://github.com/zen-kernel/zen-kernel)).
|
|
|
|
This name is part of the kernel version and package name, which means that you
|
|
|
|
can have multiple flavors of the same kernel installed alongside each other.
|
2020-09-16 18:39:12 +00:00
|
|
|
Note that the name itself does not control the selection of kernel functionality.
|
2021-04-19 08:12:03 +00:00
|
|
|
2. `PVE_BUILD_PROFILE` (default `generic`)
|
2020-08-10 14:32:29 +00:00
|
|
|
The name of the kernel build type which represents the compilation options of
|
|
|
|
the kernel (e.g. optimization level or micro architecture).
|
|
|
|
This name is appended as suffix to the Debian package version in case it is not
|
|
|
|
the default value.
|
2021-04-18 17:55:44 +00:00
|
|
|
3. `PVE_KERNEL_CC`
|
2020-08-10 14:32:29 +00:00
|
|
|
The compiler to use for the kernel build.
|
2021-04-18 17:55:44 +00:00
|
|
|
4. `PVE_KERNEL_CFLAGS`
|
2020-08-10 14:32:29 +00:00
|
|
|
The compilation options to use for the kernel build. Use this variable to specify
|
|
|
|
the optimization level or micro architecture to build for.
|
|
|
|
|
2021-04-18 17:55:44 +00:00
|
|
|
Kernel options may be controlled from [debian/config/config.pve](debian/config/config.pve). To build with
|
2021-03-28 19:51:08 +00:00
|
|
|
additional patches, you may add them to the [debian/patches/pve](debian/patches/pve) directory
|
|
|
|
and update the [series](debian/patches/series.linux) file accordingly.
|
2020-09-16 18:39:12 +00:00
|
|
|
|
2021-04-19 08:12:03 +00:00
|
|
|
## Contributing
|
|
|
|
Questions, suggestions and contributions are welcome and appreciated!
|
|
|
|
You can contribute in various meaningful ways:
|
|
|
|
|
|
|
|
* Report a bug through [Github issues](https://github.com/fabianishere/pve-edge-kernel/issues).
|
|
|
|
* Propose new patches and flavors for the project.
|
|
|
|
* Contribute improvements to the documentation.
|
|
|
|
* Provide feedback about how we can improve the project.
|