Ask Your Question

How to reinstall or fix GRUB in Fedora without a recovery option on the Live CD?

asked 2014-02-02 06:18:49 -0500

Bucic gravatar image

updated 2017-01-13 15:08:16 -0500

mattdm gravatar image

The recovery entry seems to be no longer available in Fedora 20 livecd, so I had to do grub reinstallation. Normally you'd go grub2-install /dev/sda but it returns the following error:
Path ‘/boot/grub2’ is not readable by GRUB on boot. Installation is impossible. Aborting.

System details:
BIOS system (non-UEFI)
My /boot seems to be on sda2 (don't know how to verify that), my main system partition.
Microsoft basic data* means ext4 partition
no separate /boot partition
sda3 is another fedora install.

mount | grep -i boot returns nothing when I issue this command while booted into my main (sda2) system.

fdisk -l
Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: XXX

Device           Start          End   Size Type
/dev/sda1         2048       264191   128M BIOS boot partition
/dev/sda2       264192     52582399    25G Microsoft basic data
/dev/sda3     52582400    117229567  30.8G Linux LVM
edit retag flag offensive close merge delete


If your boot partition is on sda2, why would the "Type" be "Microsoft basic data"? Check to see where it's mounted with mount |grep -i boot. Also, make sure the same partition that has the /boot/ directory is listed in your /etc/fstab file.

ILMostro gravatar imageILMostro ( 2014-02-02 09:46:29 -0500 )edit

@Ahmad Samir I know. This is why let's forget about the "rescue" mode. If I could/wanted to run the live dvd I wouldn't bother asking this question.

Bucic gravatar imageBucic ( 2014-02-02 14:43:33 -0500 )edit

25GBs for boot partition ? I doubt. Most likely the /dev/sda1/ (BIOS boot partition). Do you have a separate /boot partition (have you created one ? ) , or you mean /dev/sda2 is you Fedora root / (installation) and /boot is included there ?

NickTux gravatar imageNickTux ( 2014-02-03 00:59:39 -0500 )edit

OP has to be clarified; the ongoing comments are not helping much

ILMostro gravatar imageILMostro ( 2014-02-03 16:13:24 -0500 )edit

Please don't expect me to clarify confusion you yourself introduce. OP edited to explicitly state there is no separate /boot partition on my system. "Microsoft basic data" explained.

Bucic gravatar imageBucic ( 2014-02-05 13:15:18 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2014-02-02 10:29:23 -0500

Ahmad Samir gravatar image

updated 2014-02-03 11:50:09 -0500

AFAIK, the "rescue" boot option is available only with the Fedora installation DVD iso (4GB+), not the Live media.

EDIT: expanding the above.

First of all you have a GPT-labelled HDD, so I think /dev/sda1 is a BIOS Boot Parition which is needed to boot from a GTP HDD on non-UEFI systems. I've never had this setup but it seems that grub2-install should work c.f.

IIUC, to re-install grub2 using a Live CD, you'd need to:

1- Boot into the Live session and create a directory to mount your installation filesystem e.g. /mnt/sysimage

2- Mount your / at /mnt/sysimage, since you have LVM you'll need to mount the logical volume for your /, note that I've never used LVM so you can't help you there...

3- If you have a separate /boot partition (which in case of using LVM you most likely do), mount it at /mnt/sysimage/boot, this is most likely /dev/sda1, you should check /etc/fstab of the installed system after you mount /. As was posted by others /dev/sda2 is has a windows filesystem (NTFS probably) so it's not /boot.

4- Mount bind these ones:

mount --bind /dev /mnt/sysimage/dev
mount --bind /proc /mnt/sysimage/proc
mount --bind /sys /mnt/sysimage/sys 

You do need the /dev mount bind, it seems to work without having to mount /proc or /sys.

5- Then chroot:

chroot /mnt/sysimage

6- Reinstall grub2:

grub2-install /dev/sda

Someone at posted about an alternative method, after step 3 above you can reinstall grub2 like this:

grub2-install --root-directory=/mnt/sysimage /dev/sda

I did test it on a non-LVM setup (in a VM) and it seems to work. Edit: I forgot to add that using the 'grub2-install --root-directory' method would work best if the grub2 version in the Live session is the same (or as near as possible) as the installed system, i.e. using an F20 Live CD to re-install a grub2 on an F20 installed system.

edit flag offensive delete link more


I'll test the method the next time I brake grub, which shouldn't take long ;) Any idea what made my case so special that it's not covered in the fedora Grub2 wiki?

Bucic gravatar imageBucic ( 2014-02-05 13:30:48 -0500 )edit

That rescue mode should also be available on the network install .iso file - so if you're getting it from somewhere on the Internet, it's a much smaller download+cook time. Also the rescue mode can automatically search for and mount your fedora system (i.e. steps 2, 3 and 4 of your detailed solution).

Cobra gravatar imageCobra ( 2014-02-06 04:41:41 -0500 )edit

Two notes:

  1. On my system, the boot drive is /dev/sdc1. I got a lot of errors until I realized I had to leave out the drive number in the grub2-install command (sdc instead of sdc1). Following advice on other websites, I also added a "recheck" switch: grub2-install --recheck /dev/sdc
  2. After running grub2-install I had to remake the grub menu using grub2-mkconfig -o /boot/grub2/grub.cfg
MichaelClerx gravatar imageMichaelClerx ( 2014-08-05 12:22:26 -0500 )edit

This worked for me on Fedora 19. After restoring a Clonezilla image, my PC would boot to the GRUB prompt and get stuck there. The GRUB menu of available linux kernels never displayed. It turns out I needed to reinstall grub.

I have an out-of-the-box fedora installation (using LVM). This is what I mounted in steps 2 and 3:

mount /dev/fedora/root /mnt/sysimage

mount /dev/sda1 /mnt/sysimage/boot

Thank you Ahmad for a great answer.

ann b gravatar imageann b ( 2014-09-09 17:18:06 -0500 )edit

This solved my grub2 boot! now I am up and running, thank you!

imbagwapito gravatar imageimbagwapito ( 2014-12-26 14:19:32 -0500 )edit

answered 2015-03-12 05:52:52 -0500

Install grub2-efi-modules, if grub2-install complains about missing /usr/lib/grub/x86_64-efi

edit flag offensive delete link more


exact error (for those doing a web search)

grub2-install: error: /usr/lib/grub/x86_64-efi/ doesn't exist. Please specify --target or --directory.

i also got "grub2-install: error: cannot find EFI directory." until i separately mounted the efi partition to /mnt/sysimage/boot/efi

kxra gravatar imagekxra ( 2016-05-20 11:35:41 -0500 )edit

I encountered '/usr/lib/grub/x86_64-efi/ doesn't exist.' on Step 6, but because I am using standard BIOS PC, so I had to add --target=i386-pc at the end of the grub2-install command

MazterGee gravatar imageMazterGee ( 2017-05-03 16:56:55 -0500 )edit

answered 2014-02-02 10:26:11 -0500

Marc lml gravatar image

updated 2014-02-02 10:26:41 -0500

Have you tried restoring Grub by booting from the live-DVD?

Please see my answer on this question on howto do this:

edit flag offensive delete link more


Could you copy-paste the relevant part of the linked answer here? There's a lot of 'non-standard' commands there and I'm afraid some of them may be not valid for my case.

Bucic gravatar imageBucic ( 2014-02-02 14:41:36 -0500 )edit

@Bucic this is the chroot method. You will use the second set of commands, but you have to boot from a Live Fedora media.

NickTux gravatar imageNickTux ( 2014-02-03 01:03:27 -0500 )edit

Question Tools



Asked: 2014-02-02 06:18:49 -0500

Seen: 156,179 times

Last updated: Jan 13 '17