LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-18-2006, 04:05 AM   #1
openfun
Member
 
Registered: Nov 2004
Location: Netherlands
Distribution: Mandrake, Red Hat, Debian
Posts: 34

Rep: Reputation: 15
Question Problem with restoring grub


Since I reinstalled my windows xp, the grub was no longer available for my dual booting. I am trying to restore the grub, however not succeeded yet. What I am doing is to boot from the installation CD, and enter the "rescue" session, then I can get a root access shell. Afterwards, I type:

grub-install /dev/sda

where /dev/sda is my harddisk and the partitions are as following:

/dev/sda1 ntfs windows
/dev/sda5 ntfs windows
/dev/sda6 ntfs windows
/dev/sda7 swap
/dev/sda8 /
/dev/sda9 /usr
/dev/sda10 /home
etc...

I always get the error after such a command:
/sbin/grub-install: line 480: test: -gt: unary operator expected
/sbin/grub-install: line 493: test: -eq: unary operator expected
/sbin/grub-install: line 491: expr: command not found
...blam blam blam...
grub>root(hd0,)

Error 12: Invalid device requested
.....

This happens even if I try: grub-install hd0


Please help me with such an annoying thing. Thank you very much in advance!


By the way, my linux is Ubuntu dapper beta1
 
Old 05-18-2006, 01:11 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Try following this link and performing either B4 or B5.
 
  


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
Restoring GRUB to MBR slidermsu Ubuntu 2 01-08-2006 08:09 PM
restoring grub nayankk Linux - Newbie 2 09-10-2005 03:59 PM
Restoring Grub Sevoma SUSE / openSUSE 6 12-31-2004 10:52 PM
problem restoring grub redhat 8 rock_sg Linux - Hardware 0 07-30-2003 01:15 AM
Restoring GRUB sami Linux - Newbie 11 10-30-2002 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:45 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
Open Source Consulting | Domain Registration