Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

At first, Windows 7 was the only OS in the drive.

Then I installed MINT. Accidentally, I formated the sda1 partition (where the windows 7 bootloader was stored) as ext4, being the mount point of /boot. So then I couldn't boot Win7 anymore.

(By the way, MINT was installed in the sda5 partition)

Afterwards, I repaired the Win7 bootloader succesfully, which deleted GRUB(2?) loader, thus being unable to boot Mint.

I tried running:

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

Result message is:

grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Installation finished. No error reported.

And after reboot, I get the grub> prompt, but no OS options whatsoever.

(Keep in mind, there's no partition assigned for /boot)

share|improve this question

Don't use grub-install, enter the grub interactive shell and use these commands to install the bootloader correctly. Use your correct partition numbers.

root (hd0,0) (where is /boot with /boot/grub/grub.conf and grub stages files ?)
setup (hd0) (where do you want to install the bootloader?)

grub-install probably needs a /etc/mtab. If you wish to use grub-install, firstly copy /etc/mtab into /mnt/etc/mtab (don't worry about overwriting the older file, it's updated on every boot) then chroot into /mnt, and run your MINT grub-install script, inside the chroot.

share|improve this answer
A note on partition numbers: hd0 = sda, hd1 = sdb, etc.; (hd0,0) = sda1, (hd0,1) = sda2, etc. – Kevin Aug 17 '12 at 22:09

First, make sure that you have grub (if using Mint, apt-get install grub). Then run what Spidey posted. If you get error 15, quit the shell and run update-grub. It should ask you if you want to make a menu.lst, confirm yes. After that, try what Spidey posted and it should work.

share|improve this answer

Your Answer


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

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