On Tuesday, 9 February 2021 08:43:13 GMT n952162 wrote:
> Are extra administrative steps necessary when --sync brings in a new
> kernel, as in:
> 
>     https://wiki.gentoo.org/wiki/Kernel/Upgrade
> 
> I currently have this situation:
> 
> $ uname -a
> Linux host *4.19.72-gentoo* #7 SMP Tue Jun 9 19:51:52 CEST 2020 x86_64
> GNU/Linux
> 
> $ eselect kernel list
> Available kernel symlink targets:
>    [1]   linux-5.4.72-gentoo
>    [2]   linux-5.4.80-gentoo-r1
>    [3]   linux-5.4.92-gentoo
> 
> If an update requires additional steps, shouldn't that have appeared in
> the news?

It may help if I describe my approach to kernel upgrades.

This is an ~amd64 system, but I have 'sys-kernel/gentoo-sources -~amd64' in my 
keywords file because I prefer to stick with stable kernel sources. I keep the 
latest kernel plus the one that was latest until I upgraded.

When a new gentoo-sources comes in, I switch to it straight away, knowing that 
it's been proved to be sound. I could use eselect to change the /usr/src/linux 
symlink to the new kernel source tree, but instead I have 'sys-kernel/gentoo-
sources symlink' in /etc/portage/package.use/kernel, which has the same effect. 
(This is for historical reasons.)

Then I cwd to /usr/src/linux, copy .config from the previous version and 'make 
oldconfig'. Then I run this script [1]:

$ cat /usr/local/bin/kmake
#!/bin/bash
mount /boot
cd /usr/src/linux
time (make -j12 && make modules_install && make install &&\
        /bin/ls -lh --color=auto /boot &&\
        echo
) &&\
echo && echo "Rebuilding modules..." && echo &&\
        emerge --jobs --load-average=48 @module-rebuild @x11-module-rebuild
echo && echo "Remaking microcode images..." && rm -f /boot/
early_ucode.cpio.new &&\
        iucode_tool -S --write-earlyfw=/boot/early_ucode.cpio.new \
          -tr /boot/early_ucode.cpio -tb /lib/firmware/intel-ucode &&\
        mv -v /boot/early_ucode.cpio.new /boot/early_ucode.cpio &&\
echo

That takes care of anything that might otherwise break wnen the kernel is 
upgraded. It picks up virtualbox-modules in passing, so you can forget about 
it yourself.

HTH.

1.  It's a very simple script, nothing like as clever as some others we see 
here.   :)

-- 
Regards,
Peter.




Reply via email to