I have a very broken Fedora 22 install.

Everything was working absolutely fine until I decided to dual boot F22 and Linux Mint MATE. I had Fedora installed on an SSD, and I installed LM on a different hard drive. After a while, I decided Linux Mint was not right for me, so I deleted all the LM partitions (I know I deleted all of them correctly; they were in a separate drive), and then, to remove the LM entries from the boot menu (or so I thought), I ran grub2-mkconfig -o /boot/grub2/grub.cfg. I restart my system, and wonder of wonders, I get: error: no such device: XXXXXXXXX..., and a grub-rescue> prompt.

Ideally, this question would have been helpful, but Fedora uses LVM.

How can I get a normal grub boot screen back? Or, how can I get my Fedora installation back?


Note: I would gladly post command outputs, but I don't know enough about any of this to know what would be useful.


It seems likely that Linux Mint's GRUB is still installed to the MBR, while its /boot partition got deleted. Thus the grub-rescue prompt, which appears when GRUB can't load its stage2 from the filesystem. Things to try, in order:

  1. It's possible that the Mint GRUB was in the MBR of the Mint disk, and the old (Fedora) GRUB is still in the MBR of the Fedora disk. To check this, go to the BIOS boot menu and try booting from the SSD which Fedora is on (assuming the current default boot device is the Mint HDD). If this works, it should just drop you back into a standard GRUB, hopefully with the options to boot Fedora already selected.
  2. If this isn't the case, you should try to bootstrap from the grub-rescue into your Fedora install. Then you can run grub2-install to make the Fedora GRUB boot again. To do this, you need to tell grub-rescue where Fedora's /boot is (I'm assuming it's on a separate partition, since that's the Fedora default), then bootstrap into normal.

    Try ls from the grub-rescue> prompt; it'll give you a list of devices like (hd0,msdos1) and so on. You can list an individual device by saying ls (hd0,msdos1)/ (note the trailing slash); the one you want is the one with a grub2 subdirectory and a bunch of initramfs and vmlinuz files.

    Once you've found the right device (of the form (hd<n>,msdos<m>) or maybe (hd<n>,gpt<m>)), you run set prefix=(<device>)/grub2 and set root=(<device>). Then you can:

    insmod normal
    insmod linux

    At this point, you should be back at the standard grub> prompt. Here you need to boot the OS normally, which depends on your setup. But you can run cat (<device>)/grub2/grub.cfg, which will give you the commands Fedora runs normally, and hopefully duplicate those.

  3. The prior procedure is long, complicated and sensitively dependent on your exact setup. If it fails, you can boot from a LiveCD (Fedora preferably), then run grub2-install from there. The command line in the referenced answer is a good starting place.

  • Thank you! Had to go to option 2, and only got to running 'normal' before I got my old boot menu back. Now I'm back in Fedora. Now if I run grub2-install /dev/sdb, should I be good?
    – Hatchet
    Oct 22 '15 at 23:00
  • 1
    You should now be able to run grub2-install with the argument of the SSD that's your main boot device. This was the missing step in your deleting Mint; you updated everything except the very first boot step.
    – Tom Hunt
    Oct 22 '15 at 23:01
  • Yes! It worked! Rebooted to make sure. Thank you. You have been most helpful.
    – Hatchet
    Oct 22 '15 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.