blob: b4384543889cc3e4b098234f1f84aaa4013dba06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
---
title: "Gentoo Kernel Upgrades"
description: Gentoo kernel upgrades on adyxax.org
tags:
- gentoo
- linux
---
## Introduction
Now that I am mostly running OpenBSD servers I just use genkernel to build my custom configuration on each node with :
```sh
eselect kernel list
eselect kernel set 1
genkernel all --kernel-config=/proc/config.gz --menuconfig
nvim --diff /proc/config.gz /usr/src/linux/.config
```
Bellow you will find how I did things previously when centralising the build of all kernels on a collab-jde machine, and distributing them all afterwards. Local nodes would only rebuild local modules and get on with their lives.
## Building on collab-jde
```sh
PREV_VERSION=4.14.78-gentoo
eselect kernel list
eselect kernel set 1
cd /usr/src/linux
for ARCHI in `ls /srv/gentoo-builder/kernels/`; do
make mrproper
cp /srv/gentoo-builder/kernels/${ARCHI}/config-${PREV_VERSION} .config
echo "~~~~~~~~~~ $ARCHI ~~~~~~~~~~"
make oldconfig
make -j5
INSTALL_MOD_PATH=/srv/gentoo-builder/kernels/${ARCHI}/ make modules_install
INSTALL_PATH=/srv/gentoo-builder/kernels/${ARCHI}/ make install
done
```
## Deploying on each node :
```sh
export VERSION=5.4.28-gentoo-x86_64
wget http://packages.adyxax.org/kernels/x86_64/System.map-${VERSION} -O /boot/System.map-${VERSION}
wget http://packages.adyxax.org/kernels/x86_64/config-${VERSION} -O /boot/config-${VERSION}
wget http://packages.adyxax.org/kernels/x86_64/vmlinuz-${VERSION} -O /boot/vmlinuz-${VERSION}
rsync -a --delete collab-jde.nexen.net:/srv/gentoo-builder/kernels/x86_64/lib/modules/${VERSION} /lib/modules/
eselect kernel set 1
cd /usr/src/linux
cp /boot/config-${VERSION} .config
cp /boot/System.map-${VERSION} System.map
(cd usr ; make gen_init_cpio)
make modules_prepare
emerge @module-rebuild
genkernel --install initramfs --ssh-host-keys=create-from-host
grub-mkconfig -o /boot/grub/grub.cfg
```
|