LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-11-2007, 01:33 PM   #1
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Grub Install


Hi,

Previously, I have a dual boot of WinXP and Ubuntu using Grub.

However, I did a fixmbr using the winxp disk and my grub is gone and I can't access my ubuntu now. What should I do to install the grub without deleting my ubuntu partition?

Thanks.
 
Old 08-11-2007, 02:57 PM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
Boot from a live cd /rescue disk. At the prompt type:

Code:
root (hd0,0)
point it to wherever your /boot/grub folder is. Then type:

Code:
setup (hd0)
to install to MBR, followed by

Code:
exit
Reboot without cd
 
Old 08-11-2007, 11:13 PM   #3
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by mdg
Boot from a live cd /rescue disk. At the prompt type:

Code:
root (hd0,0)
point it to wherever your /boot/grub folder is. Then type:

Code:
setup (hd0)
to install to MBR, followed by

Code:
exit
Reboot without cd
Hi,

My root is installed to sda6 of my one and only sata hdd. So it should be (hd0,5)?

However, after I typed root (hd0,5), it says syntax error near unexpected token 'hd0,5'

P.S I am booting from Ubuntu Live CD using its Terminal to execute the commands.
 
Old 08-11-2007, 11:19 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Those commands have to be entered from a GRUB prompt. After booting, open a terminal and type:

grub ##starts the GRUB shell
root (hd0,5) ##your assumption was correct---- hda6 in Bashese = hd0,5 in Grubese
setup (hd0)
 
Old 08-11-2007, 11:29 PM   #5
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pixellany
Those commands have to be entered from a GRUB prompt. After booting, open a terminal and type:

grub ##starts the GRUB shell
root (hd0,5) ##your assumption was correct---- hda6 in Bashese = hd0,5 in Grubese
setup (hd0)
Hi I got an error after typing "root (hd0,5)", saying "Selected disk does not exist"
 
Old 08-11-2007, 11:54 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Huh ...
Just type in "root (" and hit the <tab> key - it should list all the valid disks it finds.
What do you get ???. As a matter of interest, you can also use <tab> after the comma to get a list of known partitions.
 
Old 08-12-2007, 12:43 AM   #7
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00
Huh ...
Just type in "root (" and hit the <tab> key - it should list all the valid disks it finds.
What do you get ???. As a matter of interest, you can also use <tab> after the comma to get a list of known partitions.
hmm..... after I typed in "root (" and hit the <tab> key, no list is being displayed. And if I typed in "root (hd0," <tab>, it says "Selected disk does not exist".

Ubuntu did not recognise my hdd?

However, I went back to bash, typed sudo fdisk -l, it did manage to list all the partitions correctly.

Latest Update: I did not "sudo grub" in the 1st place. It works now

Last edited by subaruwrx; 08-12-2007 at 12:52 AM.
 
  


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
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
Grub - Does fedora automatically install a bootloader like grub? or... mitchell7man Linux - Software 10 05-09-2007 11:49 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 01:55 PM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 03:01 PM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 02:06 PM


All times are GMT -5. The time now is 09:35 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration