LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 03-30-2005, 08:18 AM   #1
shishimo
Member
 
Registered: Jun 2003
Distribution: Fedora Core 3, so tasty
Posts: 62

Rep: Reputation: 15
normal FC3 grub restore not working!


I installed windows on a partition on my comp that i had previously deleted it from. my grub went away, and i tried the following to get it back:

1. boot fedora dvd
2. linux rescue
3. chroot /mnt/sysimage
4. grub-install /dev/hda

here's what happens: when i chroot, all of my dev files go away because the /dev that is under /mnt/sysimage is empty, so grub-install cant find hda. also, i tried:

ln -s /dev /dev/dev

but that didn't work. also, i tried not doing the chroot and just making symlinks from / into /mnt/sysimage whenever it told me it couldnt find something, but when i tried to do a symlink in /usr/share for the actual grub files, it told me i was in a read-only file system!

please help me get my linux system back, because i dont want to be stuck with the alternative again! help is much appreciated, because I am out of ideas..

thanks
 
Old 03-30-2005, 10:03 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Try this:

Make the /mnt/sysimage mountpoint /:
chroot /mnt/sysimage

Run grub:
grub

Tell grub to reinstall on the first disk, first partition:
root (hd0,0)
setup(hd0)
quit

Exit the chroot and reboot:
exit
exit

Last edited by macemoneta; 03-30-2005 at 10:06 AM.
 
Old 03-30-2005, 10:10 AM   #3
shishimo
Member
 
Registered: Jun 2003
Distribution: Fedora Core 3, so tasty
Posts: 62

Original Poster
Rep: Reputation: 15
thanks for the reply! ok, i tried to run those commands, and got the following errors:

grub> root (hd0,0)
Filesystem type unknown, partition type 0x7

grub> setup (hd0)

Error 17: Cannot mount selected partition

also, i might be able to chroot if i can mount /dev to /mnt/hda2/dev... but i have no idea how to do that, since there is not fstab entry for /dev, is there?
 
Old 03-30-2005, 10:36 AM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
OK, that's your Windows NTFS partition (partition type 7), and grub can't find it's files there, which is to be expected.

Which partition contains your Linux /boot directory (usually setup as a separate partition)? Lets say that it's on the same hard drive, in the second partition (remember that grub counts from 0). In that case, change the root command in the previous post to:

root (hd0,1)

This tells grub that the /boot/grub files are on the first hard drive, second partition.

If the /boot partition is on the first partition of the second drive, then the root command would be:

root (hd1,0)

The setup command tells grub which drive's MBR to modify. If your boot drive is actually the second drive, then specify:

setup (hd1)

I hope that's clear...
 
Old 03-30-2005, 02:30 PM   #5
ksnash
Member
 
Registered: Jul 2003
Location: Pensacola,Florida
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
define grub device

in grub, define your grub device:

device (hd1) /dev/hda <=this can be hd0

then define which is your root partition for /boot

root (hd1, 1) <==/boot on second partition of the defined device hd1

last step

setup (hd1)

also make sure your grub.conf has correct drive specifications for everything.
 
  


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 Restore roopunix Linux - Networking 5 08-29-2005 05:29 PM
How to restore Evolution? (FC1 to FC3) Ed-MtnBiker Fedora 10 03-15-2005 10:45 AM
How do I restore USB service in FC3 csanghavi Linux - Newbie 1 12-24-2004 06:50 AM
restore default settings on fc3 tamashii Fedora 1 11-21-2004 09:16 AM
How can I restore GRUB ? xtrips Linux - Software 5 07-30-2003 03:22 PM


All times are GMT -5. The time now is 07:35 AM.

Main Menu
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