Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an internal hard drive with the Linux distro I use daily. Today, I wanted to test another distro, I installed it on a USB flash drive, but GRUB was installed on my internal hard drive.

Why on hell would GRUB go on my hard drive, and how can I recover my previous GRUB menu?

(My daily distro is Fedora with encrypted LVM).

share|improve this question

migrated from serverfault.com Jan 4 '14 at 20:29

This question came from our site for system and network administrators.

boot with a live cd, if you are using grub2 fedoraproject.org/wiki/GRUB_2 – c4f4t0r Jan 4 '14 at 15:15

As c4f4t0r said, boot with a live CD. You can then run grub-install /dev/sda or whatever drive you need. You may need to bind mount /proc, /boot, /dev and /sys and the chroot into your mounted linux installation first.

share|improve this answer

It sounds like you still have a grub installed, just without the menu. You can use its command line to boot your existing distro. Press ESC or Shift, etc. to get into the grub menu. Then press c for the command line.

Then you can just run the lines that would normally boot your machine (they're in /boot/grub/grub.cfg normally). Something like:

grub> linux (hd0,0)/vmlinuz-3.12-1-amd64 root=/dev/mapper/Zia-root ro verbose
grub> initrd (hd0,0)/initrd.img-3.12-1-amd64
grub> boot

Your may need an insmod or two (possibilities include at least ext2, part_msdos, and gzio). Your normal grub.cfg will probably do searches by fs UUID, which is more robust, but you can just give disk numbers as above.

Once you have your machine booted, use your distro's normal way of installing grub (e.g., grub-install)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.