LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-14-2007, 10:41 PM   #1
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Rep: Reputation: 30
Grub syntax for setup


I installed 64 bit Ubuntu on my son's Compaq V6000. Worked great I even updated it. However something went wrong with the Grub installation ( after a day or two ) . I could not even boot into Windows Xp . It would give an Error 17.
Somehow using grub-install I managed to get it to boot into XP which is really what he uses.

After reading about grub it seems what I need to do is use Grub setup . The parameters to this are Install-device and image-device .
However when I give the parameters in the form /dev/hda, /dev/hda6 , I get the message unrecognized string. How should these parameters be specified?
 
Old 09-14-2007, 11:02 PM   #2
rameshg87
LQ Newbie
 
Registered: Jan 2006
Location: Trivandrum, Kerala, India
Distribution: Redhat EL4, Ubuntu 6.10
Posts: 26

Rep: Reputation: 15
if you can get a grub command line somehow use grub-install /dev/hda1 for installing it on the first partition..and then change the root to that partition and give setup (hd0) to install stage 1 onto mbr.
 
Old 09-16-2007, 12:23 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
If you can get to a terminal in Ubuntu, you would issue command: sudo fdisk -l to see your disk partition structure. If for example, your Ubuntu / or /boot partition was /dev/hda6, you would tell grub where /boot is and where to install it with the four commands below:
Code:
sudo grub
root (hd0,5)
setup (hd0)
quit
Grub starts counting from (0), so the sixth partition is (5) in the command specifying the Linux /boot partition.
EDIT: After issuing the first command and entering the admin password, you'll be at a grub prompt (grub>), then issue the other three at that prompt.

Last edited by Junior Hacker; 09-16-2007 at 12:27 AM.
 
Old 09-16-2007, 04:14 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The previous replies should solve your problem. I just throw in a few pointers about Grub.

Grub calls hard disks (hd0, hd1,hd2 etc) and partitions by number (hd0,0), (hd0,1), (hd0,2)) and count everything from zero.

Ubuntu, especially updated versions using kernel 2.6.20 and newer, call all SCSI, Pata, Sata and USB hard disks as sda, sdb, sdc, sdd, sde, etc and the old Pata disk hda, hdb, hdc and hdd have been abandoned.

To find out how Ubuntu calls the partition you issue this command in Ubuntu terminal
Code:
sudo fdisk -l
The xp should be in a ntfs partition which will have Type ID 7.

To see how Grub "sees" the same partition you issue the following commands in Ubuntu terminal
Code:
sudo grub
geometry (hd0)
geometry (hd1)
quit
To see the relationship between the two, as seen by Grub, you issue this command in Ubuntu terminal
Code:
cat /boot/grub/device.map
If you still have a problem you will need to post the output of the above plus the content of "/boot/grub/menu.lst"

Last edited by saikee; 09-16-2007 at 04:18 AM.
 
Old 09-16-2007, 09:31 AM   #5
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Amazed at the number of prompt replies . I missed out that I cannot boot into the Ubuntu partitions and I know they are there un-corrupted .
I get the message 'cannot boot into partition ' or something similar.

I booted with a rescue disk from Sysreccd.org . I had done grub-install that got it booting it into Winxp the menu.lst file is there unchanged . Should that not ensure correct booting.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub setup heinola Slackware 7 09-19-2005 06:55 PM
Setup GRUB RiSK *BSD 1 02-26-2005 04:49 PM
syntax for grub.conf to add win98 to bootloader menu 7689mich Linux - Newbie 3 08-26-2004 12:13 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
grub setup linuxnube Linux - General 3 12-19-2003 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:21 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