Results 1 to 9 of 9
How do I repair or re-install grub without formatting?
I am using lenny, p4 3.00Ghz, pure intel....
- 10-14-2009 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 88
[SOLVED] grub hell!
How do I repair or re-install grub without formatting?

I am using lenny, p4 3.00Ghz, pure intel.
- 10-14-2009 #2
Can you boot into the system? If so, just run update-grub. Another option is to use the Super Grub Disk.
- 10-14-2009 #3
Here is a good Grub booting tips howto.
- 11-06-2009 #4Just Joined!
- Join Date
- Jan 2008
- Posts
- 53
easy grub fix!
Use the GRUB command you can found in live-cd of other distros, try it with Ubuntu or openSUSE, i have not test it in another distro than these two!.
now once you are into the live cd if you are using ubuntu do this to gain admin privileges, because i do not like sudo i use this alternative:
$ sudo passwd root
passwd:
Retype the passwd:
$ su
passwd:
For openSUSE do this:
$ su
#
And that is all.
Now being root mount each partition until find the one containing /boot/grub/menu.lst, read it and you will find a line saying something like this:
root (hd#1,#2)
then exit and run the grub command:
grub
now copy what you saw
>root (hd#1,#2)
then do
>setup (hd0)
to record into the mbr
and ready
that is all
have fun!
- 11-07-2009 #5
As suggested by daark.child, its really easy to re-install GRUB using SuperGRUB CD. If you have LiveCD of any Linux distro ( except Ubuntu 9.10 ), just chroot / partition of Debian and execute grub-install /dev/sdx command with root privileges.
Code:mount -t ext3 /dev/sd<root_partition> /mnt chroot /mnt grub-install /dev/sdx Press Ctrl+D to exit chroot umount /dev/sd<root_partition>
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 11-11-2009 #6Just Joined!
- Join Date
- Sep 2008
- Posts
- 88
At that time, no!(I formatted my box: patience issues, not stable internet services here.) But am still willing to learn.
- 01-12-2010 #7Just Joined!
- Join Date
- Sep 2008
- Posts
- 88
- 01-12-2010 #8
Post the output of sudo fdisk -l and df -h commands.
Code:sudo fdisk -l df -h
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 01-12-2010 #9Just Joined!
- Join Date
- Jan 2008
- Posts
- 53
Grub hell!
Yes u got that message because the mbr is locate in hd0 and for install it u run the grub comand as root then setup where is located the root partition with "root (hd#1,#2)" and then install it on the mbr with "root (hd0)".
If you are doing it with grub-install i'm shure u type './grub-install /dev/hda1', else if u did, u'r going back were you started.
it should be: './grub-install /dev/hda'
It is not going to work if you are setting a bad partition o disk no present.
You have Ubuntu so the same CD works well, i just write suse as an example, but you can use wathever distro that allows u tu use the grub command, run the cd of ubuntu 9.1 on livecd mode, then wait to get a graphical enviroment, once u are in, go to a shell and type:
/*For setting the root password*/
$ sudo passwd root
passwd:
/*To gain root access, more confortable than doing sudo at the beginning*/
$ su -
now suppose your distro recognice your hard drive as hda mount each partition until find /boot/grub/menu.lst on it, suppose you found it on hda1.
so the drive is (hd0,0) so you will run as root:
#grub
/*Once in the grub command now copy what you saw
>root (hd0,0)
/*then do to install in the mbr*/
>setup (hd0)
If you found the /boot/grub/menu.lst on hda6 for example do the same but watch that the drive info change:
The drive is (hd0,5):
#grub
/*Once in the grub command now copy what you saw
>root (hd0,5)
/*then do to install in the mbr*/
>setup (hd0)
If you have more than one hard drive and supposely u found it on the second one, the drive info change, but we do the same, suppose you found it on hdb3:
The drive is (hd1,2):
#grub
/*Once in the grub command now copy what you saw
>root (hd1,2)
/*then do to install in the mbr*/
>setup (hd0)
The same if your disk is sda1 sdb1 or wathever in grub the root option is always (hd#1,#2) where #1 is the drive a=0,b=1,c=2...z=n-1 and #2 is the partition 1=0,2=1,3=2,....n=n-1.




