archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.95k stars 514 forks source link

Update microcode handling #2384

Closed fortifiedhill closed 5 months ago

fortifiedhill commented 5 months ago

PR Description:

As of mkinitcpio v38, microcode is handled by a hook and inserted into the initrd by default. Therefore, we don't have to add microcode entries to bootloaders anymore. Additionally, the microcode option in .preset files has been deprecated in favor of the new microcode hook.

See: https://archlinux.org/news/mkinitcpio-hook-migration-and-early-microcode/

Tests and Checks

Torxed commented 5 months ago

This is awesome to see, minimizing code - simpler life :D

Torxed commented 5 months ago

We might need to do something about this too: https://github.com/archlinux/archinstall/blob/c549b50622dc652ab58038f6952a337082df6363/archinstall/lib/installer.py#L646-L650

fortifiedhill commented 5 months ago

We might need to do something about this too:

https://github.com/archlinux/archinstall/blob/c549b50622dc652ab58038f6952a337082df6363/archinstall/lib/installer.py#L646-L650

This code appears to handle adding the respective microcode package to the package install list, depending on the user's CPU. In a VM (after removing this line), I've tested this by removing the linked code, and sure enough, the microcode does not install, so it appears that we need that code.

Torxed commented 5 months ago

Ah you are correct! I should have known this you'd think heh. Cheers for pointing that out!