Need help restoring grub
Hello everyone,
I'm a Linux Newbie I like the software and everything, but there's 1 thing that got me totally frustrated. I went to format an external harddisk using Xp CD, and that apparently wiped out my grub. Now, I've searched thousands of sites on how to restore that. And I can't even seem to understand that thing.... a lot of them contains stuff like (hd0,0) with some sudo dev/sda something and grub, and a lot of things I can't find my way around them. Isn't there an easier way to do this ? I got completely frustrated, and now I'll just reformat and install the damn thing again. GRRRRRR |
I fixed your title (I'm sure it made you feel better, but it did not help us understand your issue......;))
To restore GRUB, you can boot from any Linux live CD (eg the one you used to install Linux). Please tell us more about your system---eg drive and partition setup, and which version of Linux |
Mention your Linux distribution
|
Quote:
|
Quote:
|
Drive and Partition Setup ??? Uggg
I just have Winows Vista, Windows 7 and supposedly Linux Mint 8 I went to a program in Linux, that's call Gparted I saw that my linux partition ( or I dunno how to call it) is dev/sda/6 there's was something else called linux swap. I understand that is used as a memory by linux....or something like that But that thing about hd0,0 or hd0,3 i just dunno what the heck that is |
(hd0,0)is the first partition on the first disk. If you only have one disk every partion will be (hd0,something)
/dev/sda6 = (hd0,5) |
If it serves as any help
My laptop came with Vista....then I installed Windows 7, and then Linux Mint 8 ME Also, is there a way to lock that grub so that it won't go anyway anymore ? |
ohh...so my linux partition is (hd0,5)
what's next ? |
Grub didn't just go away. You said you used a windows install disk to partion something. Windows always behaves as though it were the only OS in the world, so if you install windows after you have linux installed you are generally going to lose Grub, because Windows will overwrite the MBR which holds stage 1 of Grub. It's a better idea to use something like Gparted or your favorite windows based partition editor (so long as it understands that there is a world beyond windows) to manipulate partitions. The exception to this rule would be resizing a windows partition from inside windows, with it's built in utitlity.
|
sda6 and (hd0,5) are equivalent. the latter is the GRUB terminology.
To restore grub: boot from the Linux install CD, and get into a terminal. enter "grub" to start the GRUB shell. enter "root (hd0,5)", and then "setup (hd0)" take out the CD, reboot, and you should be back in business. Quote:
|
The closest you can come to a lock on the MBR is to do as pixellany says, or use the dd command to make a copy of it in your home directory. Next time windows overwrites the MBR, just copy your grub MBR back to the MBR. Search thes forums for instructions.
|
When I type grub and hit enter
it says that grub is not installed....etc, and to install it, type sudo apt-get install grub Is this normal ? |
I installed the grub....then entered grub and then root (hd0,5)
and it says error 21, selected disk does not exist |
Code:
fdisk -l |
All times are GMT -5. The time now is 05:01 PM. |