You are not logged in.

#1 2021-07-23 12:54:44

CJL48
Member
Registered: 2021-07-06
Posts: 31

[SOVLED]Grub Boot entry hangs after error

Booting from the existing grub Arch linux entries prints
[ERROR] Failed to start Load Kernel Modules
and then hangs on a black screen, with only a '_' cursor.
Manually setting kernel, root, and initrd then booting via grub console allows for boot.
So these commands:
linux /boot/vmlinuz-linux root=/dev/sda4
initrd /boot/initramfs.img
boot
will boot the system, but not the existing grub entry.

This issue is similar to bbs.archlinux.org/viewtopic.php?id=233935, but with no emergency mode started, and manually booting works so long as root is specified for the linux kernel, and I had not used pacman -U --force.
I did however, run a pacman -Syu system update.

I thought that /etc/fstab might have been deleted/corrupted, but it is unchanged compared to when boot worked. And yes, the UUID for the linux partition still matches the UUID for root in fstab.
Systemctl status shows that systemd-modules-load.service is active (exited), but boot-efi.mount could not be found.
Also, both uname -r and pacman -Q linux return 5.13.14-arch1-1.

The problem persisted after running grub-mkconfig -o /boot/grub/grub.cfg
Any help would be appreciated.

UPDATE: Solved! Mounted efi partition to /boot, reinstalled grub, linux, and amd-ucode via pacman.
Original title: Grub Boot entry hangs after error Failed to start Load Kernel Modules
Title changed due to character restriction.

Last edited by CJL48 (2021-07-25 18:00:35)

Offline

#2 2021-07-23 14:26:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,372

Re: [SOVLED]Grub Boot entry hangs after error

What does your grub.cfg look like?
The workaround looks like you're booting from the root partition? Is there maybe a stray boot partition?

Offline

#3 2021-07-24 16:52:37

CJL48
Member
Registered: 2021-07-06
Posts: 31

Re: [SOVLED]Grub Boot entry hangs after error

Okay, I've got the grub.cfg here: https://paste.ee/p/T5qI8
...It's possible that there's a stray boot partition: this machine is set up as a windows 10 dual-boot. how would I check for a stray boot partition?

Offline

#4 2021-07-24 16:56:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,372

Re: [SOVLED]Grub Boot entry hangs after error

lsblk -f

?

Offline

#5 2021-07-24 21:13:12

CJL48
Member
Registered: 2021-07-06
Posts: 31

Re: [SOVLED]Grub Boot entry hangs after error

Hmm...
sda1 is supposed to be the efi boot partition.
sda2 is the Microsoft Reserved Partition
sda3 is the Win10 installation
sda4 is currently Arch Linux, used to be Debian
sda5 is tagged Lenovo, not entirely sure what it's for
sda6 is the Windows recovery partition
sda7 is swap

It looks like there's still only one boot partition.

Offline

#6 2021-07-24 21:17:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,372

Re: [SOVLED]Grub Boot entry hangs after error

That's not the command output and doesn't contain the UUIDs (they're not secrect or private or anything but required for correlation w/ your grub.cfg…)
In general don't paraphrase information, https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#7 2021-07-25 02:01:57

CJL48
Member
Registered: 2021-07-06
Posts: 31

Re: [SOVLED]Grub Boot entry hangs after error

My bad.

NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│    vfat   FAT32 SYSTEM_DRV
│                       EE9B-6745                                           
├─sda2
│                                                                           
├─sda3
│    ntfs         Windows
│                       F4D49ECCD49E908A                                    
├─sda4
│    ext4   1.0         7feaca07-af54-444f-af2f-2e7ad3e87a17  484.2G    24% /
├─sda5
│    ntfs         LENOVO
│                       74EEB36AEEB32372                                    
├─sda6
│    ntfs         WINRE_DRV
│                       8EACA05EACA04297                                    
└─sda7
     swap   1           62134111-9ed5-4ad4-975b-4038c0b1fee6                [SWAP]
sr0          

Offline

#8 2021-07-25 06:21:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,372

Re: [SOVLED]Grub Boot entry hangs after error

That config boots from sda4.

Two options:
1. The presented grub.cfg loads /boot/amd-ucode.img early and that throws everything off
2. You're loading grub from the ESP by default. Mount sda1 and look at its contents: is there some grub and linux stuff arount? Compare "file /mnt/esp/vmlinuz-linux" (if so)

Offline

#9 2021-07-25 10:43:39

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOVLED]Grub Boot entry hangs after error

Check the boot order:

efibootmgr -uv

Or use the plain 'set' command from the 'grub>' prompt to find where it is looking for the configuration file.


Jin, Jîyan, Azadî

Offline

#10 2021-07-25 12:51:31

CJL48
Member
Registered: 2021-07-06
Posts: 31

Re: [SOVLED]Grub Boot entry hangs after error

seth wrote:

That config boots from sda4.

2. You're loading grub from the ESP by default. Mount sda1 and look at its contents: is there some grub and linux stuff arount? Compare "file /mnt/esp/vmlinuz-linux" (if so)

There is indeed some linux stuff in sda1, and I'm not sure that it's supposed to be there. The ls output is below.

drwxr-xr-x 2 root root     4096 Aug 29  2018 '$RECYCLE.BIN'
-rwxr-xr-x 1 root root    40960 May 15 02:29  amd-ucode.img
drwxr-xr-x 2 root root     4096 Aug 29  2018  BOOT
drwxr-xr-x 6 root root     4096 Jul  2 21:31  EFI
drwxr-xr-x 6 root root     4096 Jul  2 21:31  grub
-rwxr-xr-x 1 root root 31364421 Jul  2 21:30  initramfs-linux-fallback.img
-rwxr-xr-x 1 root root  8168389 Jul  2 21:30  initramfs-linux.img
drwxr-xr-x 2 root root     4096 Aug 29  2018 'System Volume Information'
-rwxr-xr-x 1 root root  9465056 Jul  2 21:30  vmlinuz-linux

The vmlinuz-linux, initramfs-linux*, and amd-ucode.img files, along with the grub folder are ones that are also present in sda4's /boot. Are these supposed to be present?

Offline

#11 2021-07-25 13:06:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,372

Re: [SOVLED]Grub Boot entry hangs after error

Nope.
And it's most likely what gets booted.

You can mount that partition to /boot (you'll likely get a warning about the path not being empty, but that's not a problem) and re-install the kernel, amd-ucode, grub and run "grub-mkconfig" (not sure whether that gets triggered by any of those packages) and then see whether the system boots w/o intervention.

Also check the commands HoaS posted.

Edit, for clarification: you do not need to run grub-install, just install the package.

Last edited by seth (2021-07-25 13:07:39)

Offline

#12 2021-07-25 17:58:39

CJL48
Member
Registered: 2021-07-06
Posts: 31

Re: [SOVLED]Grub Boot entry hangs after error

Seth's suggestion seems to have worked. I don't usually mount sda1 once I'm in Arch, so that update probably broke things by NOT updating the actual boot files. Should I add an fstab entry for /boot to prevent this in the future?

Offline

#13 2021-07-25 19:24:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,372

Re: [SOVLED]Grub Boot entry hangs after error

Should I add an fstab entry for /boot to prevent this in the future?

Yup. You should also clear the unmounted /boot path to prevent future confusion and warnings and free some disk space ;-)
Or configure the system to boot from sda4, though there's no point in that unless you run out of space on sda1.

Offline

#14 2021-07-27 11:58:19

CJL48
Member
Registered: 2021-07-06
Posts: 31

Re: [SOVLED]Grub Boot entry hangs after error

Thanks seth. I'll do that now.

Offline

Board footer

Powered by FluxBB