LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-15-2008, 05:37 PM   #1
googlix
LQ Newbie
 
Registered: Oct 2007
Location: São Paulo - Brazil
Distribution: Debian Etch 4.1 r1
Posts: 12

Rep: Reputation: 0
Restoring GRUB boot loader


Hello everybody!!

I have tried to repair my GRUB installation using a live cd (Windows has eaten it!!) but I could not make it works. I needed to install Windows in my box and as everybody knows Windows replaces any existent loader by its own. To resolve this I decided to boot with my live cd and get used of the chroot command (chroot /dev/hda - that's my Red Hat partition) and finally run grub-install /dev/hda to install GRUB in the MBR again. These steps didn't work because there were not any device file in the /dev filesystem.

Is there any other way of getting GRUB recovered? Why there isn't any device under /dev after running chroot?

Thanks a lot!!

Last edited by googlix; 01-15-2008 at 05:39 PM.
 
Old 01-15-2008, 06:15 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
/dev/hda is the hard disk only; you need to add the partition number, such as /dev/hda2 (or whatever the partitiion is for you Linux partition).
 
Old 01-15-2008, 06:18 PM   #3
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
I do not like grub-install...it does not give correct feedback.

when you boot that live cd again try

Code:
su
grub
root (hdx,y)
setup (hd0)
quit
read my signature on what numbers to use for x and y....but if / is on hda1 they are 0,0

when grub is issued...and your live cd has no grub error will be command not found
at end of setup....you should see a message about embedding grub and the word succeeded.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless Keyboard not working to select boot options (Grub boot loader) psrini_vasan Fedora 7 12-16-2009 06:45 PM
Restoring boot menu with grub shell Freestone Linux - Newbie 5 07-08-2006 11:09 AM
Fedora Remove and restoring windows MBR boot loader eng_muhammad Fedora 3 12-03-2005 01:39 PM
Removing Lilo, restoring to windows boot loader seeker131 Linux - Newbie 7 03-01-2005 06:26 PM
Restoring boot loader (with boot disk?) Kylotan Linux - General 0 07-08-2004 07:29 AM


All times are GMT -5. The time now is 06:12 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration