DEV Community

Cover image for What to do if you accidentally remove the `amd-ucode` package on Arch Linux
anekos
anekos

Posted on

What to do if you accidentally remove the `amd-ucode` package on Arch Linux

Stuck with a boot error saying "amd-ucode.img not found" on Arch Linux? This guide shows you how to fix it fast.

Boot from Arch Linux USB drive

Use the official one from the Arch Linux website.

First, mount the target disk

# mkdir /mnt/root
# mount /dev/nvme0n1p2 /mnt/root
# mount /dev/nvme0n1p1 /mnt/root/boot
Enter fullscreen mode Exit fullscreen mode

Enter the mounted environment with chroot

# arch-chroot /mnt/root
Enter fullscreen mode Exit fullscreen mode

Reinstall the amd-ucode package that was accidentally removed

# pacman -S amd-ucode
Enter fullscreen mode Exit fullscreen mode

This should create /boot/amd-ucode.img.

Create a backup just in case

(If you put the backup in the same directory, grub-mkconfig would use that instead)

# cd /boot
# mkdir backup
# cp initramfs-linux.img backup/initramfs-linux.img.2024-10-08
# cp vmlinuz-linux backup/vmlinuz-linux.2024-10-08
# cp grub/grub.cfg backup/grub.cfg.2024-10-08
# cp /etc/mkinitcpio.conf backup/mkinitcpio.conf.2024-10-08
Enter fullscreen mode Exit fullscreen mode

Regenerate initramfs

# mkinitcpio -p linux
Enter fullscreen mode Exit fullscreen mode

Update GRUB configuration

# grub-mkconfig -o /boot/grub/grub.cfg
Enter fullscreen mode Exit fullscreen mode

Conclusion

Pacman: It's not just a game, folks!

Billboard image

Synthetic monitoring. Built for developers.

Join Vercel, Render, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay