Today I want to share with you a little and simple guide to upgrade microcode in your Sabayon.
But let's us start from the beginning.
What is microcode?
Intel and AMD microcodes are, citing Debian wiki:
Processor microcode is akin to processor firmware. The kernel is able to update the processor's firmware without the need to update it via a BIOS update.so to guarantee the system stability and security, you need to keep your CPU microcodes updated.
How do I update my microcodes?
If you have an AMD CPU the microcode are shipped in the linux-firmware package, so you need to do nothing if you update frequently your system, but things get a bit more complex with an Intel CPU (like Haswell).
That is because Intel ucode need to be loaded before the kernel, so you have to do this using the following steps.
The first thing to do consist in generating the microcode cpio archive through iucode_tool (you can find it on sabayonlinux.org repo installing sys-apps/iucode_tool):
the file early-ucode.cpio should be placed in the initrd of your grub.cfg just before your kernel, but if you put it there directly every time you will regenerate your grub it will be removed.
So the best thing to do is edit the script used from grub-mkconfig.
The file you are looking for is /etc/grub.d/10_linux and you need to change the if clause here reported as follows.
(WARNING: line's numbers reported could change between GRUB 2 versions)
After this we have almost done, so you can simply rebuild your GRUB configuration using:
To check if you upgraded correctly your microcode dmesg should be like this:
Remember to check frequently if you have the last microcode updated and don't forget to regenerate your cpio file.
And that's all folks, I hope this could help you to have a more stable system.