You are not logged in.
Hi, since new mkinitcpio update everytime when I
sudo mkinitcpio -p linux
I got this warning:
WARNING: Deprecated option 'ALL_microcode' found. Update '/etc/mkinitcpio.d/linux.preset' to use the 'microcode' hook instead.
Can someone please follow step by step instruction what I have to change in config files to fix this and don't broke initiation system?
Regards,
Slav
Last edited by infoslaw (2024-03-05 19:42:03)
Offline
I think you should do this:
A) Add "microcode" hook to /etc/mkinitcpio.conf after the "autodetect" hook
B) In /etc/mkinitcpio.d/*.preset remove the MICROCODE_ALL Line
C) Rebuild initramfs with
sudo mkinitcpio -P
But I would like a confirmation
Offline
Maybe also remove line as
initrd /amd-ucode.img
or
initrd /intel-ucode.img
in /boot/loader/entries/
At least for systemd boot
Offline
Thank you for quick answer, even have btfrs with snapshots come very carefully to modifiy something in sensitive initiation booting process, so decide to do this tomorrow evening (need a laptop for my job and will give update about progress.
in /boot/loader/entries/
have:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=d3dea46c-4f53-4ac4-95ca-a2856995ae41:root root=UUID=859c5edf-3011-4841-8a81-102dd837ca4f rootflags=subvol=@ quiet rw
so if I completely remove initrd /initramfs-linux.img does boot loader start?
Offline
In /etc/mkinitcpio.d/linux.preset
have:
# mkinitcpio preset file for the 'linux' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
ALL_microcode=(/boot/*-ucode.img)
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_uki="/efi/EFI/Linux/arch-linux.efi"
#default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
#fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
so perhaps enough is to put # at front?
#ALL_microcode=(/boot/*-ucode.img)
Offline
I removed All_microcode and added microcode hook after autodetect. I run btrfs/grub/luks2 with secure boot and successfully booted without issues or errors.
HOOKS=(systemd btrfs keyboard autodetect microcode modconf kms block sd-vconsole sd-encrypt filesystems fsck)
Offline
1. /etc/mkinitcpio.conf --- added in HOOKS section microcode
HOOKS=(base udev keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck)
2. hashed ALL_microcode
# /etc/mkinitcpio.d/linux.preset --- hashed line ALL_microcode
mkinitcpio preset file for the 'linux' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
#ALL_microcode=(/boot/*-ucode.img)
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_uki="/efi/EFI/Linux/arch-linux.efi"
#default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
#fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
3. rebuilding mkinitcpio by command:
mkinitcpio -p linux
4. restart sytems (Linux Arch + BTFRS + encyption + systemd-boot + timeshift)
All works perfect
Thank you guys
:-)
Last edited by infoslaw (2024-03-05 19:40:24)
Offline
These instructions worked perfectly for me as well. Thank you infoslaw
1. /etc/mkinitcpio.conf --- added in HOOKS section microcode
HOOKS=(base udev keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck)
2. hashed ALL_microcode
# /etc/mkinitcpio.d/linux.preset --- hashed line ALL_microcode
mkinitcpio preset file for the 'linux' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
#ALL_microcode=(/boot/*-ucode.img)PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_uki="/efi/EFI/Linux/arch-linux.efi"
#default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
#fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"3. rebuilding mkinitcpio by command:
mkinitcpio -p linux
4. restart sytems (Linux Arch + BTFRS + encyption + systemd-boot + timeshift)
All works perfect
Thank you guys
:-)
Offline
I just backed up and removed all presets. They are automatically recreated via hook when reinstalling/updating a kernel. So in my case I needed to re-install linux and my other kernels and the files were rebuilt. ( code is in /usr/share/libalpm/scripts/mkinitcpio )
The only difference being the ALL_microcode line now missing in the new files. So doing it manually gives the same result.
I wonder why it was needed. Last time a change happened the files were recreated automatically.
Last edited by JoeCool (2024-04-11 16:45:14)
Offline
They are created automatically once -- on first installation of a kernel when not already existing. Afterwards recreating them would be problematic, since you can and are expected to adjust them if you want to change the defaults.
Last edited by V1del (2024-04-11 16:51:45)
Offline