Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

all. I'm kind of new to Linux and I need some help. I wanted to install a Linux distro to a flash drive so that I can have a portable OS with all my settings, programs, etc. wherever I go. So I fired up a Linux Mint Live CD and installed Mint to the flash drive, and this seems to work OK. But now, whenever I try to boot up my system normally without the flash drive plugged in, it doesn't seem to work. It basically hangs for a bit, and then I get the following prompt:

error: no such device: (some long hex val)
grub rescue>

However, when I try powering my system up when the USB is plugged into the computer, it gives me an option between using the OS installed on my USB and the OS installed on my HD. Selecting the latter, everything loads up just fine. I'm guessing that installing Mint to the flash drive somehow messed with my native Grub installation, but, again, I'm kind of new to Linux, so I'm not sure exactly why. Any help is greatly appreciated.

share|improve this question

you should have made a /boot partition on the local HD

share|improve this answer
up vote 0 down vote accepted

OK, I've fixed the issue as follows (with the help of the tutorial here:

1) Fire up the Linux Mint Live CD.

2) We want to mount the partition we installed Mint to. I didn't know the name of this partition, so I opened up Terminal, then typed in "sudo fdisk -l" to print out a list of partitions. Turns out, for me, this was /dev/sda1, but this might differ for you.

3) We mount the appropriate partition using "sudo mount /dev/sdXY /mnt". Again, for me, this was partition sda1.

4) Next, we reinstall grub on the mounted partition: "sudo grub-install --root-directory /mnt/ /dev/sda". Note the lack of the trailing "1" at the end of the drive name.

That's it. Then reboot, and everything should be working again.

Also, I've discovered a tool that helps install Linux on USB drives for you (UNetbootin). This seems like a much better option, since you can run this directly within your current install of Windows or Linux, and you don't run the risk of accidentally modifying your boot loader installation in the process.

share|improve this answer

As you've already solved your problem, this is for future readers:

You've probably installed the grub bootloader to the wrong partition during the Mint install. It should of course go on the USB Key. You've probably overwritten the bootloader of your internal HDD.

Re-installing grub on your HDD (as detailed in your own answer) will only help if there was a grub install there in the first place. If your original system used another bootloader (lilo, windows bootloader) or was configured to boot directly into one of the partitions (like Windows does in a normal full-disk installation) you need to repair the bootloader with the appropriate tools from a rescue system.

If the boot configurations before and after are too different (like when you installed to the partition (/dev/sda1), but it was on the device before (/dev/sda)), you might be facing a re-install of your original OS.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .