1 |
On Tuesday, 9 February 2021 08:43:13 GMT n952162 wrote: |
2 |
> Are extra administrative steps necessary when --sync brings in a new |
3 |
> kernel, as in: |
4 |
> |
5 |
> https://wiki.gentoo.org/wiki/Kernel/Upgrade |
6 |
> |
7 |
> I currently have this situation: |
8 |
> |
9 |
> $ uname -a |
10 |
> Linux host *4.19.72-gentoo* #7 SMP Tue Jun 9 19:51:52 CEST 2020 x86_64 |
11 |
> GNU/Linux |
12 |
> |
13 |
> $ eselect kernel list |
14 |
> Available kernel symlink targets: |
15 |
> [1] linux-5.4.72-gentoo |
16 |
> [2] linux-5.4.80-gentoo-r1 |
17 |
> [3] linux-5.4.92-gentoo |
18 |
> |
19 |
> If an update requires additional steps, shouldn't that have appeared in |
20 |
> the news? |
21 |
|
22 |
It may help if I describe my approach to kernel upgrades. |
23 |
|
24 |
This is an ~amd64 system, but I have 'sys-kernel/gentoo-sources -~amd64' in my |
25 |
keywords file because I prefer to stick with stable kernel sources. I keep the |
26 |
latest kernel plus the one that was latest until I upgraded. |
27 |
|
28 |
When a new gentoo-sources comes in, I switch to it straight away, knowing that |
29 |
it's been proved to be sound. I could use eselect to change the /usr/src/linux |
30 |
symlink to the new kernel source tree, but instead I have 'sys-kernel/gentoo- |
31 |
sources symlink' in /etc/portage/package.use/kernel, which has the same effect. |
32 |
(This is for historical reasons.) |
33 |
|
34 |
Then I cwd to /usr/src/linux, copy .config from the previous version and 'make |
35 |
oldconfig'. Then I run this script [1]: |
36 |
|
37 |
$ cat /usr/local/bin/kmake |
38 |
#!/bin/bash |
39 |
mount /boot |
40 |
cd /usr/src/linux |
41 |
time (make -j12 && make modules_install && make install &&\ |
42 |
/bin/ls -lh --color=auto /boot &&\ |
43 |
echo |
44 |
) &&\ |
45 |
echo && echo "Rebuilding modules..." && echo &&\ |
46 |
emerge --jobs --load-average=48 @module-rebuild @x11-module-rebuild |
47 |
echo && echo "Remaking microcode images..." && rm -f /boot/ |
48 |
early_ucode.cpio.new &&\ |
49 |
iucode_tool -S --write-earlyfw=/boot/early_ucode.cpio.new \ |
50 |
-tr /boot/early_ucode.cpio -tb /lib/firmware/intel-ucode &&\ |
51 |
mv -v /boot/early_ucode.cpio.new /boot/early_ucode.cpio &&\ |
52 |
echo |
53 |
|
54 |
That takes care of anything that might otherwise break wnen the kernel is |
55 |
upgraded. It picks up virtualbox-modules in passing, so you can forget about |
56 |
it yourself. |
57 |
|
58 |
HTH. |
59 |
|
60 |
1. It's a very simple script, nothing like as clever as some others we see |
61 |
here. :) |
62 |
|
63 |
-- |
64 |
Regards, |
65 |
Peter. |