LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 12: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, 01:57 PM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
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, 10: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, 10:19 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 10: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, 10:54 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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-11-2007, 11:43 PM   #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-11-2007 at 11:52 PM.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:58 AM.

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
Open Source Consulting | Domain Registration