You are not logged in.

#1 2019-06-13 22:49:04

moreginger
Member
Registered: 2018-12-08
Posts: 6

grub> prompt after BIOS update and attempted repair due to Ryzen issue

I'm fairly deep in a stack of problems that started with my system failing to boot after an upgrade without `nomodeset` as per https://www.reddit.com/r/archlinux/comm … re/enrza9f

That lead me to installing a motherboard BIOS update.

That, I think, caused my nvram to be wiped so I got "Reboot and Select proper Boot device". So I followed the instructions here to attempt to resurrect it. Modulo having to do a cryptsetup as well, i.e.:

mount /dev/sda3 /mnt
mount /dev/sda1 /mnt/boot
swapon /dev/sda2
cryptsetup luksOpen /dev/sda4 foo
...
mount /dev/mapper/foo /mnt/home
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub

All that completed with no errors. However that just gets me to an empty `grub>` prompt on reboot.

I tried running `grub-mkconfig -o /mnt/grub/grub.cfg` and it appears to do something, but logs some errors:

Generating grub configuration file...
grub-probe: error: cannot find a GRUB device for /dev/sdb1. Check your device.map.
done

Obviously /dev/sdb1 is the arch usb. There is no device.map file.

Help?

P.S. I can't boot the arch usb without `nomodeset` either so I'm not too hopefully about the motherboard BIOS update having fixed the underlying problem.

Offline

#2 2019-06-14 07:05:57

Wild Penguin
Member
Registered: 2015-03-19
Posts: 319

Re: grub> prompt after BIOS update and attempted repair due to Ryzen issue

Where is your grub.cfg? I.e. what partition, what filesystem? Can grub see that filesystem?

It should reside in your EFI partition, i.e. [partition usually mounted at /boot]/grub/grub.cfg. There are other ways to partition, but judging from your grub-install command line, this should be the case. If it is not, then that is the reason grub does not work correctly. You have not adapted the install command correctly, and it can not find the config file.

Either way, you should be able to load a config file from the grub command line, have you tried that? If you can not, there is something more severe wrong with the grub installation (missing filesystem modules or something...)

I.e. something like 'configfile (hd0,0)/grub/grub.cfg' should work. I don't remember the grub hd naming scheme from the top of my head, so that part is most probably worng - but use it's auto completion (press TAB). See: https://www.gnu.org/software/grub/manua … configfile

EDIT: re-read your post and the link. You attempted to repair grub from chroot. One possible failure point is that it was booted without EFI (instead, Legacy) or device nodes are created wrongly (device.map). However, if you can one-shot boot into your main system by manually loading the config file, you should be able to fix the grub installation more reliably. The error you got (while running mkconfig), also obviously states the installation did not succeed (correctly!). But, IIRC, device.map is only used for Legacy installations, not UEFI??? But I could be totally in the wrong here... I always just read grub documentation when I need to deal with it and then forget.

Last edited by Wild Penguin (2019-06-14 07:16:43)

Offline

#3 2019-06-14 21:37:58

moreginger
Member
Registered: 2018-12-08
Posts: 6

Re: grub> prompt after BIOS update and attempted repair due to Ryzen issue

Thanks for your help.

Tried to load the configfile with grub (tried

configfile (hd0,gpt1)/grub/grub.cfg

as per autocomplete but it just gets me a blank grub> prompt again.

I managed to boot something with:

set root=(hd0,gpt3)
linux (hd0,gpt3)/boot/vmlinuz-linux root=/dev/sda3 nomodeset single
initrd (hd0,gpt3)/boot/initramfs-linux.img
boot

But I think this is still wrong because I'm not involving the EFI partition.

I tried running grub-mkconfig anyway and it generated something interesting looking, but nada on reboot. Because it wasn't on the EFI partition I guess.

Edit: Yeah I can

configfile (hd0,gpt3)/boot/grub/grub.cfg

and get a grub menu, but it's not right. I think if I knew the right way to enable the EFI partition when manually starting linux then I could generate a useful grub.cfg?

FWIW repeated above steps then ran:

mount /dev/sda1 /boot/
grub-mkconfig -o /boot/grub/grub.cfg

Which works without error (unlike in my earlier post) but no interesting logging, and I got the empty-looking grub.cfg and grub> prompt on reboot.

Last edited by moreginger (2019-06-14 21:43:51)

Offline

#4 2019-06-15 10:29:31

moreginger
Member
Registered: 2018-12-08
Posts: 6

Re: grub> prompt after BIOS update and attempted repair due to Ryzen issue

OK, something got broken on my EFI partition, and it was missing vmlinuz-... etc.

I did the whole arch-chroot thing again and then

pacman -S linux linux-headers

and then grub-mkconfig generates me a useful config.

Sadly I still can't boot at all without nomodeset and can't install my old kernel from /var/cache nor boot with linux-lts without further faffery (I get "Failed to start Load Kernel Modules"). I guess I'll blow away the install at this point because this seems to be a losing game sad

Last edited by moreginger (2019-06-15 10:29:55)

Offline

#5 2019-06-18 17:45:24

Wild Penguin
Member
Registered: 2015-03-19
Posts: 319

Re: grub> prompt after BIOS update and attempted repair due to Ryzen issue

moreginger wrote:

Sadly I still can't boot at all without nomodeset and can't install my old kernel from /var/cache nor boot with linux-lts without further faffery (I get "Failed to start Load Kernel Modules"). I guess I'll blow away the install at this point because this seems to be a losing game sad

This doesn't sound like anything requiring a re-install. Not being able to boot with nomodeset is something which a re-install won't fix. What matters actually even more is the original problem you are trying to solve (and which GPU /HWyou are using etc.); nomodeset sounds like a workaround, not a solution, and might even be the wrong one for all we know.... if you wish to change to another distribution, then that is up to you. It might even make sense, since many distributions are more novice-friendly / more tinkerless / works more OOTB - but the same issue you were facing might exist on other (or even all?!) distributions, too. Which means in worst case: after switch, you are still in square 1. Best case: things just work! 8-)

You can downgrade without packages in /var/cache (provided you have internet access, or even with usb stick or similar file transfers if you don't). Instructions are in the Arch Wiki.

"Failed to Start Load Kernel Modules" also sounds like something quite trivial to fix. Maybe you have installed some dkms modules, or kernel specific module packages. DKMS modules should be hanndled automatically (but could fail for some odd reason?), kernel-specific packages require a little manual labor. If you install any modules from AUR, you really need to know what you are doing, and be prepared to fix it and breakage especially after downgrades!

Please let me know how you fared, I'm curious :-)

Last edited by Wild Penguin (2019-06-18 17:46:39)

Offline

#6 2019-06-18 22:30:02

moreginger
Member
Registered: 2018-12-08
Posts: 6

Re: grub> prompt after BIOS update and attempted repair due to Ryzen issue

Wild Penguin wrote:

This doesn't sound like anything requiring a re-install. Not being able to boot with nomodeset is something which a re-install won't fix. What matters actually even more is the original problem you are trying to solve (and which GPU /HWyou are using etc.); nomodeset sounds like a workaround, not a solution, and might even be the wrong one for all we know.... if you wish to change to another distribution, then that is up to you. It might even make sense, since many distributions are more novice-friendly / more tinkerless / works more OOTB - but the same issue you were facing might exist on other (or even all?!) distributions, too. Which means in worst case: after switch, you are still in square 1. Best case: things just work! 8-)

You can downgrade without packages in /var/cache (provided you have internet access, or even with usb stick or similar file transfers if you don't). Instructions are in the Arch Wiki.

"Failed to Start Load Kernel Modules" also sounds like something quite trivial to fix. Maybe you have installed some dkms modules, or kernel specific module packages. DKMS modules should be hanndled automatically (but could fail for some odd reason?), kernel-specific packages require a little manual labor. If you install any modules from AUR, you really need to know what you are doing, and be prepared to fix it and breakage especially after downgrades!

Please let me know how you fared, I'm curious :-)

I did make the call to do a fresh install using Ubuntu (19 / Linux 5.0), having invested a good number of hours and needing a working machine. I've been impressed with Arch - and the community is par excellence - but I struggle to learn and recall the amount of configuration needed to use it.

FWIW to boot the Ubuntu live CD I also needed nomodeset, but it was at least capable of getting me a gui, so I installed it. In comparison Arch wasn't giving me a gui at all, the best I could manage was a console by Ctrl+Alt+Fn switching. I've since upgraded Linux to 5.1 which didn't help things either. Then I found https://bugs.freedesktop.org/show_bug.cgi?id=109206 which also didn't help. So it seens Ryzen 2400G graphics is really in a bad state on Linux 5.X, which is very familiar since one reason I started with Arch was to gain access to newer kernels when the early support was coming in smile

At this point I remembered the old Nvidia graphics card I had sitting around and decided to put that back in for a few months before revisiting this.

Thanks again for your help fixing the boot problem!

Offline

Board footer

Powered by FluxBB