In that case, as far as I know, you don't have to boot Linux to fix it (although you can, by manually entering the lines of the GRUB boot menu entry at the GRUB command line, or so I have heard).
But IMO, since the GRUB command line is mostly used for installing GRUB, the fact that you are being forcibly directed to it strongly implies that GRUB needs to be reinstalled (it can find itself on the MBR apparently, but can't find any of the later stage files that are normally kept in /boot/grub).
So what I would do is to type root (hd#,
(with # being the number of the hard drive that should contain the /boot folder or partiton) and then hit the TAB key to see where GRUB feels are the appropriate partitions to install itself.
Better yet, I would (before I even did the above) type find /boot/grub/stage1
to see if GRUB could find where it's supposed to be installed.
Then I would type root (hd#,#)
, based upon the results of the find command, to reinstall GRUB to the boot partition or folder, and then type setup (hd0)
to reinstall the now-self-aware GRUB to the MBR (or setup (hd0,#)
to install it to the root partition of the distribution, if you prefer to do that for some reason).
See the GRUB manual
for further details.
Now that I think about it, though, when you reinstall GRUB to the /boot partition or folder, keep an eye on the output. GRUB has this weird recursive thing (especially if you install it with grub-install
to a separate /boot partition), where it will wind up installed to /boot/boot/grub, instead of /boot/grub. At which point it won't be able to find itself (it's supposed to be able to, but that sure didn't work for me during my last reinstall). There's a whole explanation in the FAQ about how this is a feature and not a bug, but I'm not really buying it, as I found this "feature" nothing but trouble. However, it does mean that if you know GRUB to have been installed, but find /boot/grub/stage1
didn't find anything, you could try find /boot/boot/grub/stage1
and see if that works out better in terms of finding the stage files.
Fortunately, the solution is in the GRUB FAQ
as well; you must create a recursive symlink in the /boot directory, called boot, that links back to the higher level /boot directory, so that when GRUB tries to install in /boot/boot, it winds up back in /boot and creates /boot/grub instead of /boot/boot/grub.
You would create a symbolic link before (re)installing GRUB, with the command cd /boot && ln -s . boot
, but iirc, you have to boot from a LiveCD of some sort in order to mount /boot in the first place to actually do this (since you're unlikely to be able to mount anything from an unbooted system, though you could try parsing the GRUB menu line by line to boot, or just type quit
and see where you wind up).
I know this doesn't sound like much help (I find GRUB fairly confusing to set up), but I hope it's useful anyway.