Cause of problem:
I'm running an AMD box and last night did an Artix update using pamac. Before rebooting, I notice that I had intel ucode. So I removed the package in pamac also. Note I've been deleting NVDIA packages also which has been fine. Anyhow, rebooted and it hung with the message something like intel-ucode.img not found.
I'm trying this tonight:
Start up with my trusty Artix USB install stick.
Open terminal and "su"
Mount by lablel "ROOT" to /mnt
artix-chroot to /mnt
pacman -S intel-ucode
Question 1: Since I've gotten rid of the intel-ucode, can I instead use
pacman -S amd-code
instead?
Question 2: Will the pacman install generate the missing img file? Do I need to do something like this?
grub-mkconfig -o /boot/grub/grub.cfg
Let me know if this will work or what I need to do.
Question 3: How was my computer even working using intel-ucode on an AMD ryzen system? Just curious.
Note I'm a coder and not a systems guy. Treat me like a noob.
Thanks for the help.
Since this (https://archlinux.org/news/mkinitcpio-hook-migration-and-early-microcode/) loading of microcode is not in boot configuration. I think you have misconfigured mkinitcpio and/or somehow the mkinitcpio proccess didn't run after ucode uninstalling. And yes, if you have AMD CPU you need amd-ucode.
I think it is some sort of reboot script snafu. I did the update, which likely generated a reboot script (remember, I'm a noob). I then went and deleted intel-ucode. Then I rebooted, and the reboot script couldn't find the intel-ucode file to generate the .img.
Try to install amd-ucode when booted from live media and chrooted. It should rebuild initram image. Just in case save pacman output and if installing don't help post output here.
I forgot how exactly grub works, but
ucodes are just patches, your system can work with all or none of the ucodes. (it's mostly security and bug fixes for cpu)
The important part is that if you uninstall a ucode, you may need to regenerate the grub cfg to remove the use of that ucode. And if you install a new ucode, again regenerate the cfg to make use of new ucodes.
/boot/grub/grub.cfg
initrd /@artix/boot/amd-ucode.img /@artix/boot/initramfs-linux.img
imagine if the the file is missing, then it cannot boot the system.
if you stuck in a situation like this, just go to grub edit boot option (i forgot the exact name for it) and remove the missing ucode and the system should boot fine.
I guess a practical use of having multi ucode is for thumb drives, net boot and tmp boot drives, since these medias might want to boot in different systems.
OK, I know I have amd-ucode.img. And I found out the cause of the problem, from grub.cfg
I'm hard headed. I know I could just reinstall the intel-ucode and it would work. I'm going to try grub-mkconfig (famous last words) and see if I can generate a grub.cfg without the intel-ucode.img in it.
If anything, I'm learning more about linux. I'll post an update on how it goes.
SUCCESS!!!
Here's the summary. I'm now intel-ucode free. The only real advantage is it is one less package that needs to be maintained.
So if I were doing this over, here's what I'd do:
remove intel-ucode package
install amd-ucode package. Note I already had it all along, but it doesn't hurt to do it.
After that, just run:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Then reboot.
Like I said, I learned more about Linux, which is cool.
Thanks lemon pie and others for the replies.