LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 07-19-2017, 07:54 PM   #1
griffon
LQ Newbie
 
Registered: Dec 2016
Posts: 10

Rep: Reputation: Disabled
Smile Grub Configuration Corrupted??


grub rescue error: file `/boot/grub/x86_64-efi/normal.mod` not found


I can only boot my Linux system by entering the following
at the grub rescue prompt:

set prefix=(hd0,4)/boot/grub
set root=(hd0,4)
insmod normal
normal

which brings me to expected grub boot menu.

I have tried executing:

# update-grub
(No Errors Displayed)

# grub-install /dev/sda4
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.


I still end up at a grub rescue prompt when I reboot the system ...


Any advice or suggestions as to how I might "force" grub
to use aforementioned environmental parameters and find the
EFI directory would be greatly appreciated.

Tom
(Naturally Nuts ... no pharmaceuticals required)
 
Old 07-19-2017, 08:36 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
The efi partition is normally a small FAT?? type partition with key stuffs.

# blkid
/dev/sda1: UUID="FFFF-FFFF" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="01234567-0123-4567-89ab-0123456789ab"

Looks kind of like that. I just use DOS based grub installs. Normally a small debian stable install and it's grub boots whatever other distros. Although on one system I use grub to jump to the other grub on the SSD.

GRUB> insmod part_gpt
GRUB> insmod ext2
GRUB> ls
.. .. .. ..
GRUB> configfile (hd1,gpt1)/boot/grub/grub.cfg

Mostly because I was too lazy to redo the SSD in a dos partitioning scheme. And it didn't seem to be bootable in it's GPT configuration. So I booted a usb stick to jump to the grub on the GPT formatted SSD.
 
Old 07-19-2017, 08:46 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Why are you installing grub to a partition ?. Especially grub2 and more bizarrely when using EFI ?.

What distro ? - use of update-grub implies Debian derived. Mint (and presumably other Ubuntu based distros) finds everything properly when simply installed to the device node. I've tested this by deliberately forcing errors in the boot environment on a UEFI test system.
 
Old 07-19-2017, 11:20 PM   #4
griffon
LQ Newbie
 
Registered: Dec 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Smile syg00

Thank you for your reply syg00.

I have verified backups for my Windows, Linux & home partitions (Clonezilla)
but not my UFI partition.

A little more background information for you syg00 ...

This is a HP laptop dual boot system: WindowsPro 10 and MX Linux (Jessie).
By the way this boot problem occurred immediately after installing Ext2Fsd on the windows system / partition.

The EFI boot partition is /dev/sda1 ... the first partition as expected
The Windows partition is /dev/sda3
The Linux root partition is /dev/sda4

Yes I have tried installing grub to /dev/sda1 the default choice ...
However the following error occurs:

root@opus:~# grub-install /dev/sda1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

# mount -t vfat /dev/sda1 /mnt
# cd /mnt
# ls -l
drwxr-xr-x 6 root root 4096 Jul 15 14:17 EFI
drwxr-xr-x 2 root root 4096 Dec 3 2016 System Volume Information

# cd EFI
# ls -l
drwxr-xr-x 2 root root 4096 Dec 3 2016 Boot
drwxr-xr-x 5 root root 4096 Jul 15 14:17 HP
drwxr-xr-x 4 root root 4096 Dec 3 2016 Microsoft
drwxr-xr-x 2 root root 4096 Dec 22 2016 MX16

syg00 any suggestions or advice please and thank you.
(and yes next time I will backup the EFI partition)

Tom
(Naturally Nuts ... no pharmaceuticals required)
 
Old 07-21-2017, 07:46 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,528

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
You indicate you are trying to boot 'MXLinux' and are using a UEFI intall in your last post. The output you posted in your last post shows the contents of the EFI directory/partition which clearly shows 'MX16' so I'm not sure that reinstalling Grub is the solution. That directory should contain the needed folders to boot that system. What happens when you boot? Does it boot directly to windows? Does it no boot at all. If it boots directly to windows, you need to change the boot option priority. It would be useful if the next time you booted the system you logged into a terminal as root and ran this command, post the output here:

Code:
efibootmgr
On my HP Laptop on boot, I hit the Esc key and then get a screen with several options. One is F10 which goes to the BIOS and one is F9 which gives different boot options. When you do the F9, do you see anything other than windows or boot from disk? If so, what?

There is a fairly simple command to install Grub EFI from a booted system but given the fact that your EFI partition clearly shows the MX16 folder, I doubt that is the problem. The efibootmgr command output will show the various entries you have and their priority and that can be changed.

Last edited by yancek; 07-21-2017 at 07:48 AM.
 
Old 07-21-2017, 09:50 AM   #6
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Generally you want to install grub to the disk and not a partition. Try
Code:
grub-install /dev/sda
(without the partition number)
 
Old 07-22-2017, 08:33 AM   #7
zhouhedy
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
mount /dev/sda4 /mnt

grub-install --root-directory=/mnt /dev/sda


update-grub
 
Old 07-24-2017, 04:16 AM   #8
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Originally Posted by griffon View Post
I have tried installing grub to /dev/sda1 the default choice ...
However the following error occurs:

root@opus:~# grub-install /dev/sda1
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

# mount -t vfat /dev/sda1 /mnt
# cd /mnt
# ls -l
drwxr-xr-x 6 root root 4096 Jul 15 14:17 EFI
drwxr-xr-x 2 root root 4096 Dec 3 2016 System Volume Information

# cd EFI
# ls -l
drwxr-xr-x 2 root root 4096 Dec 3 2016 Boot
drwxr-xr-x 5 root root 4096 Jul 15 14:17 HP
drwxr-xr-x 4 root root 4096 Dec 3 2016 Microsoft
drwxr-xr-x 2 root root 4096 Dec 22 2016 MX16
Hi griffon, I actually dual boot Win10 and Slackware using UEFI.

The problem is that the grub commands do not work the same way as before due to UEFI. Your config files for grub remain on your / filesystem at /boot/grub/ but the grub EFI binary which boots at start is actually installed on the EFI partition, which in your case is /dev/sda1. If you look into EFI/MX16 I bet you'll find your grub EFI binary, since your system actually boots grub (but unfortunately the grub rescue).

Now, since you solved your problem with a few lines, you might want to add these lines to grub.cfg. So edit the file /boot/grub/grub.cfg and it should work. If it doesn't, try to see if there is a grub.cfg on the EFI partition near grub's EFI binary.

All the best.
 
  


Reply



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
A corrupted GRUB Suker Punch Ubuntu 7 05-04-2017 06:43 PM
Kernel Configuration Corrupted. blackl1nux Linux - Kernel 1 10-22-2011 02:24 PM
grub corrupted......help ashwinidubey Linux - Newbie 3 06-23-2008 01:46 AM
Recovering corrupted grub sunils1973 Debian 5 03-02-2008 10:31 PM
corrupted grub loader ti479 Linux - Software 2 11-28-2006 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:38 PM.

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