LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 07-02-2022, 01:16 AM   #1
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Rep: Reputation: Disabled
GRUB error: "file '/boot/grub/x86_64-efi/normal.mod' not found"


My sister recently received an HP 14-Dq0xxx laptop running Windows 11. I offered to install BunsenLabs Linux (version 3 "Lithium") on it for her as a dual boot with Windows. During the course of the installation, I received a message to the effect that GRUB did not install properly. I don't remember the wording exactly, but sure enough, when I tried to boot the machine up after the install, I got this instead of the GRUB menu:

Code:
Welcome to GRUB!
error: file '/boot/grub/x86_64-efi/normal.mod' not found.
grub rescue>
I did some research and found that this appears to be a fairly common issue. However, I couldn't for the life of me find a solution that worked. Here's what I tried.

Fixing From the GRUB Rescue Prompt

One solution that I found involved using the GRUB rescue prompt. Using the ls command, I identified the partition containing the Linux system and ran these commands:

Code:
set root=(TARGET-PARTITION)
set prefix=(TARGET-PARTITION)/usr/lib/grub
insmod normal
Once I hit Enter on that last command, though, I got the same error from before:

Code:
file '/boot/grub/x86_64-efi/normal.mod' not found
Fixing From Linux

Of course, not having GRUB online means not being able to boot into Linux. However, I am able to boot into a live USB system if I need to. This I did in order to follow some of the other suggestions.

Once in my live system, I mounted the target partition into /mnt, chrooted into it, and ran:

Code:
sudo update-grub
No problems yet...until I ran:

Code:
grub-install /dev/mmcblk0p5
And got this:

Code:
grub-install: warning: File system 'ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged.
grub-install: error: will not proceed with blocklists.
This even though the blkid command returns this line for /dev/mmcblk0p5:

Code:
/dev/mmcblk0p5: LABEL="bunsenlabs3" UUID=**** TYPE="ext4" PARTLABEL="root-bunsenlabs3" PARTUUID=****
So blkid sees this as an ext4 system, but grub-install sees it as an ext2...?

Fixing From BIOS

Another post that I saw mentioned that someone had fixed this problem on his computer through BIOS. His machine booted using EFI as the default, but could be switched to use legacy boot. I discovered that this laptop, too, has a legacy boot option. After enabling this option, I wiped and reinstalled the BunsenLabs system using the legacy-boot version. This time, there was no "GRUB not installed" error.

However...

Upon booting the machine up after the install, I got the same error as before:

Code:
file '/boot/grub/x86_64-efi/normal.mod' not found
NOTE: During this latest reinstall, I noticed another issue. It may or may not be related to the problem at hand, but I'll throw it out there just in case. While formatting the computer's hard drive during the install, I found that I couldn't change the boot flags on any of the partitions. The Windows system is stuck in bootable mode, the Linux partition is non-bootable, and it didn't let me modify either one. Again, this may or may not have any bearing on the GRUB issue. If not, you can ignore it and I'll work on it on my own time. (That is, unless you do happen to have some ideas...)

If anyone has any suggestions on what I should try next or noticed something I did wrong above, I would greatly appreciate it. And if you need any more information on the computer or the OS, I'll be glad to provide them.
 
Old 07-02-2022, 04:54 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
The computer has windows 11 so I would expect that if you want to dual boot with it you would need to install Bunsen Labs in UEFI mode, generally that requires booting in UEFI mode. If you have a UEFI system, it will show a partition named EFI system partition. Mount to access it and see if you have a folder for Bunsen Labs containing its Grub efi boot files.

Quote:
grub-install /dev/mmcblk0p5
That's not correct. It would only work if you had another Linux OS with Grub or another bootloader to boot that partition. You need to install to the device: /dev/mmcblk0 or if it is UEFI, to the EFI partition. Did you have options during the install as to where to install Grub and which option did you choose?

Grub in my experience has always shown Linux ext2, ext3 and ext4 filesystems as ext2 so that is not a problem.

If you do have a UEFI system, you must have the EFI partition labelled as boot, esp which you should be able to do in GParted. Not sure what the problem is there. You should be able to have windows UEFI and Bunsen Labs Legacy. The only problem with that is that Grub will not boot an EFI install of windows if Grub is Legacy so you would have to access the BIOS firmware to switch to the other OS. Windows will of course, only boot itself.

If you have an EFI install, the EFI partition must have the boot and esp flags set. Do you have or can you get GParted (Linux partition manager) and use that? Linux systems do not need a boot flag set to boot only with EFI.

Quote:
Of course, not having GRUB online means not being able to boot into Linux
Not sure what you mean by that?? The suggestion in post 2 at the thread below or similar? That is only needed to install Grub EFI files and from a Debian/Ubuntu derivative using apt-get.
 
Old 07-02-2022, 10:51 AM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
After enabling this option, I wiped and reinstalled the BunsenLabs system using the legacy-boot version. This time, there was no "GRUB not installed" error.

However...

Upon booting the machine up after the install, I got the same error as before:

Code:

file '/boot/grub/x86_64-efi/normal.mod' not found
You may be able to boot the system from the bios boot menu by selecting the drive from the boot menu options. It being an hp maybe the F9 key to use when first booting.

If so, after booting running the following commands may fix without having to reinstall:
Code:
sudo apt update
sudo apt install grub-efi
sudo mkdir /boot/efi
sudo mount /dev/mmcblk0p1 /boot/efi
sudo grub-install --target=x86_64-efi
Assuming /dev/mmcblk0p1 is the efi partition, change accordingly
will get a nvram error because you are booted in legacy mode.

Last edited by colorpurple21859; 07-02-2022 at 11:33 AM.
 
Old 07-02-2022, 11:38 AM   #4
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Thanks for all the replies. This morning, I did a fresh install of BunsenLabs in UEFI mode and noticed the same GRUB install error from before. Here it is in verbatim:

Code:
GRUB installation failed
The 'grub-efi-amd64' package failed to install into /target/.  Without the GRUB boot loader, the installed system will not boot.
When I chose the option to continue without the bootloader, I got this message:

Code:
No boot loader installed
No boot loader has been installed, either because you chose not to or because your specific architecture doesn't support a boot loader yet.

You will need to boot manually with the /vmlinuz kernel on partition /dev/mmcblk0p5 and root=/dev/mmcblk0p5 passed as a kernel argument.
Quote:
Did you have options during the install as to where to install Grub and which option did you choose?
No, I wasn't given an option.

Quote:
You may be able to boot the system from the bios boot menu by selecting the drive from the boot menu options. It being an hp maybe the F9 key to use when first booting.
Actually, that F9 window is how I was able to boot into my live USB system. This menu also displays the Linux partition, but when I select it, I am redirected to the same GRUB rescue prompt from before.

Quote:
If you do have a UEFI system, you must have the EFI partition labelled as boot, esp which you should be able to do in GParted.
I was able to do this with my live USB, but again, I got the GRUB rescue prompt once I tried to boot.

Quote:
You need to install to the device: /dev/mmcblk0 or if it is UEFI, to the EFI partition.
I'm thinking I'll need to install to the EFI partition. How do I do this?
 
Old 07-02-2022, 12:27 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
at the grub prompt grub
Code:
grub rescue>set
want to know what the prefix= and root= lines consist of.

From the live iso post the output of
Code:
efibootmgr -v

Last edited by colorpurple21859; 07-02-2022 at 07:12 PM.
 
Old 07-04-2022, 11:57 AM   #6
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
at the grub prompt grub
Code:
grub rescue>set
This command yields:

Code:
cmdpath=(hd0,gpt1)/EFI/MX19
prefix=(hd0,gpt5)/boot/grub
root=hd0,gpt5
(hd0,gpt5), by the way, is the Linux system--I confirmed this using ls.

Quote:
From the live iso post the output of
Code:
efibootmgr -v
This command yields:

Code:
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0000,0001,0002,0004,0003
Boot0000* MX19    HD(1,GPT,a4e3605b-9e21-4881-b32f-ccfa03d478d9,0x800,0x82000)/File(\EFI\MX19\grubx64.efi)
Boot0001* Windows Boot Manager    HD(1,GPT,a4e3605b-9e21-4881-b32f-ccfa03d478d9,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...>/...............
Boot0002* Internal Hard Disk    PciRoot(0x0)/Pci(0x1c,0x0)/Ctrl(0x0)/HD(1,GPT,a4e3605b-9e21-4881-b32f-ccfa03d478d9,0x800,0x82000)..BO
Boot0003* USB Drive (UEFI) - Philips USB Flash Drive 0.00    PciRoot(0x0)/Pci(0x15,0x0)/USB(2,0)/CDROM(1,0x13f4,0x4e00)..BO
Boot0004* USB Drive (UEFI) - Philips USB Flash Drive 0.00    PciRoot(0x0)/Pci(0x15,0x0)/USB(2,0)/HD(2,MBR,0xac6d5b25,0x13f4,0x1380)..BO
Boot0005* USB Drive (UEFI) - Hard Drive    BBS(HD,,0x0)..GO..NO........_.P.h.i.l.i.p.s. .U.S.B. .F.l.a.s.h. .D.r.i.v.e. .0...0.0....................A.......................2..Gd-.;.A..MQ..L.0.0.0.0.0.0.0.0.0.0.0.0.E.6........BO
 
Old 07-04-2022, 12:34 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Your first post says you installed BunsenLabs Linux, efibootmgr shows mx19 installed, they are both based on debian.

from the live iso open a terminal post the ouput of the following:
Code:
sudo mount /dev/mmcblk0p5 /mnt
df -h
sudo parted -l
ls /mnt/boot/grub
cat /sys/firmware/efi

Last edited by colorpurple21859; 07-04-2022 at 12:36 PM.
 
Old 07-04-2022, 01:04 PM   #8
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Your first post says you installed BunsenLabs Linux, efibootmgr shows mx19 installed, they are both based on debian.
Right--I'd installed MX originally, but eventually decided to use BunsenLabs instead. I've been noticing that, when I wiped MX, it left behind some partition labels like that.

Quote:
from the live iso open a terminal post the ouput of the following:
Code:
sudo mount /dev/mmcblk0p5 /mnt
df -h
sudo parted -l
ls /mnt/boot/grub
cat /sys/firmware/efi
Code:
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           376M  6.0M  370M   2% /run
/dev/sda1       1.3G  1.3G     0 100% /run/live/medium
/dev/loop0      991M  991M     0 100% /run/live/rootfs/filesystem.squashfs
tmpfs           1.9G   12M  1.9G   1% /run/live/overlay
overlay         1.9G   12M  1.9G   1% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G  4.0K  1.9G   1% /tmp
tmpfs           376M   12K  376M   1% /run/user/1000
/dev/mmcblk0p5   35G  3.2G   30G  10% /mnt

$ sudo parted -l
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? ignore                                                     
Model: Philips USB Flash Drive (scsi)
Disk /dev/sda: 8087MB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number  Start   End     Size    File system  Name   Flags
 1      2048B   6143B   4096B                Apple
 2      2615kB  5171kB  2556kB               EFI


Model: MMC DA4064 (sd/mmc)
Disk /dev/mmcblk0: 62.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  274MB   273MB   fat32        EFI system partition          boot, esp
 2      274MB   290MB   16.8MB               Microsoft reserved partition  msftres
 3      290MB   24.4GB  24.1GB  ntfs         Basic data partition          msftdata
 5      24.4GB  61.9GB  37.5GB  ext4         root-bunsenlabs3              boot, esp
 4      61.9GB  62.5GB  611MB   ntfs         Basic data partition          hidden, diag


Error: /dev/mmcblk0boot0: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)                               
Disk /dev/mmcblk0boot0: 4194kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/mmcblk0boot1: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)                               
Disk /dev/mmcblk0boot1: 4194kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:


$ ls /mnt/boot/grub
ls: cannot access '/mnt/boot/grub': No such file or directory

$ cat /sys/firmware/efi
cat: /sys/firmware/efi: Is a directory

$ ls /sys/firmware/efi
config_table  esrt              fw_vendor  runtime-map  vars
efivars       fw_platform_size  runtime    systab
 
Old 07-04-2022, 01:32 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
Right--I'd installed MX originally, but eventually decided to use BunsenLabs instead. I've been noticing that, when I wiped MX, it left behind some partition labels like that.
That is on the EFI partition and with an HP, you usually won't be able to change it (delete) with efibootmgr. Go into the BIOS Setting with F10 and delete it.

You have boot and esp on the Bunsen Labs partition as well as the EFI partition where it should be. Use GParted to remove them from partition 5.

If you are using a 'live' Linux, chroot from the USB to the hard drive to install the grub-efi files, explained at the link below.

https://askubuntu.com/questions/8312...-efi-partition. See the correct entry for 'target' and change the device names to suit your situation.
 
Old 07-04-2022, 01:34 PM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
from the live iso:
Code:
sudo mount /dev/mmcblk0p5  /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
sudo chroot /mnt
mkdir /boot/efi
mount /dev/mmcblk0p1 /boot/efi
apt update
apt install grub-efi
grub-install --bootloader-id=debian
update-grub
exit
reboot you should have a grub menu.

Last edited by colorpurple21859; 07-04-2022 at 01:39 PM.
 
Old 07-05-2022, 11:47 AM   #11
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
apt update
apt install grub-efi
Both of these commands yield this error:

Code:
Err:1 http://ftp.uk.debian.org/debian buster InRelease
  Temporary failure resolving 'ftp.uk.debian.org'
Err:2 http://security.debian.org buster/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:3 https://deb.debian.org/debian-security buster/updates InRelease
  Temporary failure resolving 'deb.debian.org'
Err:4 http://pkg.bunsenlabs.org/debian lithium InRelease            
  Temporary failure resolving 'pkg.bunsenlabs.org'
Err:5 http://pkg.bunsenlabs.org/debian buster-backports InRelease   
  Temporary failure resolving 'pkg.bunsenlabs.org'
Err:6 http://ftp.uk.debian.org/debian buster-updates InRelease      
  Temporary failure resolving 'ftp.uk.debian.org'
Reading package lists... Done                                       
W: Failed to fetch https://deb.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://pkg.bunsenlabs.org/debian/dists/lithium/InRelease  Temporary failure resolving 'pkg.bunsenlabs.org'
W: Failed to fetch http://pkg.bunsenlabs.org/debian/dists/buster-backports/InRelease  Temporary failure resolving 'pkg.bunsenlabs.org'
W: Failed to fetch http://ftp.uk.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'ftp.uk.debian.org'
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://ftp.uk.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'ftp.uk.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
I tried another live USB to see if the error would persist. I get the same thing on both systems, so I'm guessing it's a hardware problem with the laptop itself.

By the way, I think installing Linux messed up the laptop's wireless card. I've only been able to connect to wi-fi via a USB dongle. I don't mind not having internal wi-fi; I just thought I'd mention this in case it might have some bearing on the issue at hand.
 
Old 07-05-2022, 12:29 PM   #12
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
Temporary failure resolving 'ftp.uk.debian.org'
before chrooting into the system copy /etc/resolv.conf to /mnt/etc/resolv.conf
 
Old 07-05-2022, 01:27 PM   #13
Ranyel
Member
 
Registered: May 2021
Location: Texas
Distribution: MX, BunsenLabs
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
before chrooting into the system copy /etc/resolv.conf to /mnt/etc/resolv.conf
This fixed it--I can now boot successfully into BunsenLabs. Thank you both so much for your help!
 
  


Reply

Tags
dual boot, grub



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error "/boot/grub/x86_64-efi/normal.mod not found" after installing Ubuntu caml Linux - Newbie 6 01-20-2022 09:45 PM
[SOLVED] error: file /boot/x86_64-efi/normal.mod not found Crayzei Linux - Newbie 21 09-23-2020 05:23 AM
Grub error "/boot/grub/x86_64-efi/normal.mod not found" after installing Ubuntu z2228391 Linux - Newbie 1 01-28-2019 05:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration