LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-28-2008, 11:16 AM   #1
varya
LQ Newbie
 
Registered: Mar 2008
Distribution: Xubuntu
Posts: 6

Rep: Reputation: 0
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?

Last edited by varya; 03-28-2008 at 11:18 AM. Reason: to introduce tags
 
Old 03-28-2008, 02:02 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
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.
 
Old 03-28-2008, 05:10 PM   #3
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
"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)
 
Old 03-28-2008, 09:05 PM   #4
bob56
LQ Newbie
 
Registered: Jan 2008
Distribution: Mepis
Posts: 7

Rep: Reputation: 0
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 View Post
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?
 
Old 04-01-2008, 12:13 AM   #5
varya
LQ Newbie
 
Registered: Mar 2008
Distribution: Xubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
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.

Last edited by varya; 04-01-2008 at 12:14 AM. Reason: more answers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache2 reload problem mariusek Linux - Newbie 1 05-11-2007 09:44 AM
Tomcat reload servlet is very slow, but reload jsp is fast and good? gsbarry Programming 2 04-28-2006 09:34 PM
still problem in reload grub manomohan Red Hat 1 09-27-2005 07:22 AM
How to reload the grub in Red Hat 9.0 vvsd_prasad Linux - Software 0 07-01-2004 05:18 AM
RELOAD problem by squid cccc Linux - Networking 0 04-05-2004 05:28 PM


All times are GMT -5. The time now is 04:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration