Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Mar 2005
Command line configuration of GRUB
I have a Debian/GNOME installation on my slave drive and Windows XP on my master. I recently had to completely reinstall Windows because of some strange corruption I got after installing a program. Of course, after doing that I lost my GRUB bootloader.
To fix this I did a minimal install of Debian on another partition and that reinstalled GRUB. From there I booted into a shell and went about manually configuring GRUB. Yes, I know I could have used a Live CD, but sadly none of them work on my computer. Believe me, I tried.
Just to save anybody else the trouble, DO NOT TYPE THE FOLLOWING:
By doing this you will COMPLETELY disable any access to your Windows drive. All the data is still there, but it's like it becomes invisible to the computer. The CORRECT commands are as follows:
What I did wrong was, by typing two extra characters, I installed GRUB on the boot partition of the Windows partition instead of on the MBR. After doing that, I couldn't view my Windows drive from Linux, I couldn't mount the drive in Linux, I couldn't boot Windows and I couldn't even run a repair installation from the XP disc.
How did I fix this?
A program called TestDisk. It works on both Windows and Linux and you can download it here: http://www.cgsecurity.org/wiki/TestDisk. I got my copy from the Debian stable repository. I'm not quite sure how it works, but after reading the instructions and following the prompts I was able to reconstruct the Windows partition's boot record. Everything is now back to normal!
So, for anybody that wants to do a manual install of GRUB: it's setup (hd0) NOT setup (hd0,0)!