You are not logged in.

#1 2020-12-25 10:58:06

millus
Member
Registered: 2019-07-21
Posts: 202

[SOLVED] Working installation stopped working after mainboard swap

I had to replace the mainboard because it was broken. But in the new mainboard I got a weird windows-like "blue" screen with white text, greeting me with error 0x000025. I tried to switch fast/safe/cms boot options in all possible combinations in the BIOS but no go. After more googling it seems that this is because I need to "upload" the "EFI info" into the new mainboard?
Does anyone know how to do this, is it easy and you just need to know the command for that, or is it complicated and it's better to just reinstall Arch and copy over my home folder afterwards?

-- SOLUTION is in post #3 --

Last edited by millus (2021-01-05 13:22:54)

Offline

#2 2020-12-25 11:30:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,668

Re: [SOLVED] Working installation stopped working after mainboard swap

Boot a live disk, chroot in, reinstall your bootloader

Offline

#3 2021-01-05 12:38:21

millus
Member
Registered: 2019-07-21
Posts: 202

Re: [SOLVED] Working installation stopped working after mainboard swap

-- this post has the SOLUTION. I marked the  wrong line in the code block below and added its correct version, it now works fine! --

Hi, sorry again for delay. I had to figure some stuff out and didn't have much time either, but now I finally managed to work on this again.
The "problem" is that the archlinux partition (containing / and also home, so no separate home partition here) is encrypted.

So what I figured out now after some searching and reading, step by step:

Turn off fastboot and secureboot in the bios.
Boot form arch install usb stick. Then..

fdisk -l
lsblk
 (sda1 = EFI System, sda2 = crypto_LUKS archlinux partition)

cryptsetup luksOpen /dev/sda2 volume
mount /dev/mapper/volume-archlinux /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt

[/etc/defaults/grub:]
 GRUB_CMDLINE_LINUX="cryptdevice=UUID=my-long-uuid-that-i-verified-is-correct:volume"

[/etc/mkinitcpio.conf:]
 HOOKS="(base udev autodetect modconf block keyboard encrypt lvm2 filesystems fsck)"

mkinitcpio -p linux
 <It builds just fine..>
WRONG: grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUBARCH /dev/sda
CORRECT: grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUBARCH
 Installing for x86_64-efi platform.
 Installation finished. No error reported.
grub-mkconfig -o /boot/grub/grub.cfg
 Generating grub configuration file ...
 Found linux image: /boot/vmlinuz-linux
 Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
 Found fallback initrd imag(s) in /boot: initramfs-linux-fallback.img
 Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
 Found Ubuntu 17.04 (17.04) on /dev/sda5
 done
sync
<CTRL+D>
umount /dev/sda1
umount /dev/mapper/volume-archlinux
sync
reboot

Now the problem is, if I select this newly installed GRUBARCH to boot from, I get thrown right back to the bios screen! Grub doesn't even show up.
Please help, I gathered all this information from sources that explained everything in detail and I was sure this should actually work. I have no idea why it doesn't. D:

Edit: Now instead of pressing ESC on boot and choosing GRUBARCH manually I just set it as first boot option in the bios. Now when I just let the PC boot like this I get a different result, probably because GRUBARCH is just skipped and this is from some subsequent (broken) boot option.
Instead of getting kicked back into the bios right away now actually Grub starts, but gives this:

Welcome to GRUB!
error: symbol `grub_file_filters' not found.
Entering rescue mode...
grub rescue> _

But since this is probably not related to GRUBARCH anyway I guess we can just ignore it as it's not part of the problem..

(Side note: There is no Windows on this system nowadays, the EFI stuff must be an ancient remnant from when there was actually Windows installed on it. However, I do have another partition with a realtime-Ubuntu version on it although I don't really use it these days.)

Last edited by millus (2021-01-05 13:22:29)

Offline

#4 2021-01-05 13:01:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] Working installation stopped working after mainboard swap

You mounted the ESP to /boot, but then told GRUB it was at /boot/EFI/? And what's the trailing /dev/sda?

Offline

#5 2021-01-05 13:10:29

millus
Member
Registered: 2019-07-21
Posts: 202

Re: [SOLVED] Working installation stopped working after mainboard swap

Sorry, what is ESP?
Oh when I mounted the EFI partition to /boot it ended up as /boot/EFI so I assumed that is what I have to specify as the target folder!
Thanks, I will just try in a moment with target just /boot !

By trailing /dev/sda you mean in the grub-install line? This was given on many pages as the way to install grub to a disk, to specify the target disk in the command line.

Edit:
Hurray thanks! big_smile It works again, with the target set to just /boot
It's the little things...

Last edited by millus (2021-01-05 13:14:22)

Offline

#6 2021-01-05 13:11:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] Working installation stopped working after mainboard swap

Doesn't sound to me like you're following the wiki at all. You're just making guesses.

Offline

#7 2021-01-05 13:15:48

millus
Member
Registered: 2019-07-21
Posts: 202

Re: [SOLVED] Working installation stopped working after mainboard swap

The wiki is partially not followable or inconsistent. Also when I installed archlinux some steps in the wiki just don't work like that in that order so I had to search for other install guides that worked, sorry. "just follow wiki" is no magic trick that guarantees to work, please don't just blame user as simple "solution".. I have read wiki very careful actually before coming to the forum as last resort. If you already know all the intrinsics it's easy for you and you can often not see why it's much harder for newbies, the big teacher who cannot fathom how anyone can not make sense of everything by simple reading - and auto-filling the subtile gaps in his own brain which the teacher doesn't even notice cause it's so natural to him.
Anyway, your hint about the path was the solution, so thank you.

Last edited by millus (2021-01-05 13:18:56)

Offline

#8 2021-01-05 14:20:29

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] Working installation stopped working after mainboard swap

The wiki explains the term I used and gives a simple command to install GRUB. Instead, you made guesses and cobbled together a command from other sources and it didn't work. I would say telling someone to follow the wiki IS the solution.

Offline

Board footer

Powered by FluxBB