LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   windows reload, grub problem (https://www.linuxquestions.org/questions/linux-newbie-8/windows-reload-grub-problem-631285/)

varya 03-28-2008 11:16 AM

windows reload, grub problem
 
hi, i have a single hardrive which i made into three partitions. one is ntfs which has the windows on it. second one is fat and is just a normal partition in windows.

then third parition contains the xubutnu.

now i have reinstalled the windows, and grub is gone. only windows can be loaded now. so i have used xubuntu live cd and tried the following tutorial:
http://www.justlinux.com/forum/showt...905#post837905

started using steps D and E; as mentioned;
when i use command chroot, it says
chroot: cannot run command `/bin/bash': No such file or directory

also following errror when
ubuntu@ubuntu:~$ sudo root (hd0,1)
following error
bash: syntax error near unexpected token `('

what should i do now inorder to reload the grub?

i have found another thread in this forum, but it did not answer my questions. also is there a way that i can recover mbr? even after i've reinstalled the windows?

Junior Hacker 03-28-2008 02:02 PM

If your partition order is Windows first, Fat second and Linux in the third, you should be able to boot the live CD and issue the four commands below in a shell.
Code:

sudo grub
root (hd0,2)
setup (hd0)
quit

The "root" command tells grub where to find the grub configuration in the Linux partition. The "setup" tells grub to set itself up in the MBR of the first drive.

Duck2006 03-28-2008 05:10 PM

"Junior Hacker" is write but i would use the commands

sudo grub
find /boot/grub/stage1 "this way you know what partition that your linux is installed on"
root (hdx,y) "what ever the command with find shows"
setup (hd0)
quit

to make sure that the linux partition is (hd0,2)

bob56 03-28-2008 09:05 PM

Try MEPIS
 
By default, GRUB installs in the master boot record (MBR) of the hard drive. When you re-install Windows, it overwrites the MBR and destroys GRUB. There is an easier way to restore it. If you have a working windows installation, download and burn the live CD for MEPIS linux. You don't have to install it, but running from the live CD there is a MEPIS utility for re-installing GRUB (it will be accessible from an icon on the desktop). The utility will search your hard drive for the various partitions and OS's and re-install GRUB.

While you have it, though, I recommend you try MEPIS. It is Debian based like ubuntu, but with a KDE desktop. I have tried both and found MEPIS to be a much more pleasant experience

Quote:

Originally Posted by varya (Post 3103225)
hi, i have a single hardrive which i made into three partitions. one is ntfs which has the windows on it. second one is fat and is just a normal partition in windows.

then third parition contains the xubutnu.

now i have reinstalled the windows, and grub is gone. only windows can be loaded now. so i have used xubuntu live cd and tried the following tutorial:
http://www.justlinux.com/forum/showt...905#post837905

started using steps D and E; as mentioned;
when i use command chroot, it says
chroot: cannot run command `/bin/bash': No such file or directory

also following errror when
ubuntu@ubuntu:~$ sudo root (hd0,1)
following error
bash: syntax error near unexpected token `('

what should i do now inorder to reload the grub?

i have found another thread in this forum, but it did not answer my questions. also is there a way that i can recover mbr? even after i've reinstalled the windows?


varya 04-01-2008 12:13 AM

it worked :)
 
i have followed the instructions of junior hacker and it worked.

thanks a lot.

@bob56: thanks for your suggestion. will try mepis in a vm on linux.


All times are GMT -5. The time now is 03:16 AM.