I got a new Desktop PC recently because my 8-year-old PC just hadn’t enough power to handle my current workloads. And as we all know: New Hardware brings new challenges, especially if you are using Linux. It is a nice machine with an AMD Ryzen 7 5800X CPU and 128GB Ram. But the Mainboard I chose seems to have some quirks. It is a “MAG X570 Tomahawk WIFI” Mainboard from MSI. Overall it works fine, but Linux is unable to detect the sound card, which is a Realtek ALC1200 Chip. This also brings me to the topic of this post.
One recommendation was to update the BIOS, in the hope, that then the sound card gets detected. Said and done. Unfortunately, my PC did not boot anymore after the update. It seems that a BIOS Update may reset some NVMe Variables needed to find the EFI Boot Manager. If someone knows exactly what is going in there, let me know! However, here is how I got my PC to boot again:
First I prepared a Linux Live System. In my case I reused the Arch Linux Installation iso and copied it with dd to an USB-Stick with the following command:
> dd bs=4m if=archlinux-2021.01.01-x86_64.iso of=/dev/sdc status=progress oflag=sync
The output device can be found by using dmesg and /dev. Just ensure, that you use the device identifier itself and not some disk partition of the device.
After booting the live system the goal is to identify the partitions that need to be mounted, mount them and then chroot into this environment. Let’s go through them one by one:
- Identify the partitions you need. In my case it was the root ("/") and the efi ("/efi") partition. For this, you can use the command “fdisk -l” to list all partitions. Or if you already mounted the root partition you can also check “/etc/fstab” to see your partition table. Once you know them you mount them with the following commands. The partitions will be different in your case.
# Mount the root partition > mount /dev/nvme0n1p1 /mnt # Mount the efi partition > mount /dev/nvme0n1p2 /mnt/efi
- Now chroot into the mounted environment
> arch-chroot /mnt
- Fix the boot process. It may be possible to fix the boot with the efibootmgr command. But as I only have one operating system installed, and did not customize anything I just reinstalled the bootloader, which is GRUB in my case.
> grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
After this, I rebooted the PC and I was able to boot again into my normal work environment. So what looks scary at first, is in the end a quite simple procedure. I still find it annoying that this happens in the first place.
For more information, see the following links. The Arch Linux Wiki, is as always, a very helpful resource: