Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 07-12-2005, 06:47 AM   #1
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Rescuing Fedora Core 4

Ok the general jist is i had to re-install windows XP and of course, my MBR has been stolen again. I researched into using the Rescue CD so popped it in, booted and went through the options, however when it came to detecting the file system it said there were no Linux partitions

Ok i thought, i'll do it manually, so i mounted my Linux partition under /mnt/sources (one of 2 directories in mount on the cd.

with mount /dev/hda5

i then did chroot /dev/hda5 checked my filesystem and it was indeed the right one.

Now comes the problem, when issuing the grub-install /dev/hda? i get

not a valid block device or file, with any partition i try.

I also ls -a in /dev and the only output is null.

Basically i'm wondering if it's borked and i ned to reinstall, i have some home files i'd like to recover (configs for fluxbox etc.) i know ,should have backed them up first :S

I appreciate your help
Old 07-12-2005, 01:29 PM   #2
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
To make a long story short, try doing a so-called native Grub installation from FC Rescue mode or with a Live-CD distro (e.g., Knoppix).

Installing grub natively requires a bit more knowledge, but it can usually overcome most grub problems associated with booting linux. (Notice how I didn’t say anything about fixing problems associated with booting windows?) Grub-install is just a shell script that invokes the grub shell.

Look in the Grub Manual ( ) in the section entitled “Installing GRUB natively” and try using the “find ...”, “root ...” and “setup ...” commands, in that order, from the grub prompt. If “/boot” is part of the “/” partition, you will:

grub> find /boot/grub/stage1

If “/boot” is a separate partition, you will:

grub > find /grub/stage1

I suspect that grub-install failed because you have a separate “/boot” partition. As I understand it, to use grub-install as you did, you need to have the fully reconstituted FC installation mounted (or at least the /boot part) in rescue mode. I am guessing that what you did was to mount the “/” partition without mounting “/boot” under it before issuing chroot.

Grub-install will only look in the mounted “/” folder, unless you tell it to do something else. You can use grub-install with that partially mounted configuration or without anything mounted, but you need to use the --root-directory option:

grub-install --root-directory=/boot /dev/hda

This is covered in the Grub Manual in the “Installing GRUB using grub-install” section, but it’s a lot easier to just do a native grub installation and to remember how you did it for the next time something goes wrong.
Old 07-14-2005, 05:05 AM   #3
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 31
boot using the rescue cd.
chroot /mnt/sysimage
grub-install /dev/hda

as long as there was no errors reported grub is now the bootloader
Old 07-14-2005, 07:28 AM   #4
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Original Poster
Rep: Reputation: 45
Linux can no longer see any devices on the machine, i tried that, ended up formatting the partitions, but thanks for all your help


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
Best live-cd distro for rescuing a system Coume Linux - Distributions 3 07-20-2004 10:50 PM
Severe problems with Fedora Core 1 and Fedora Core 2 installatiom TheOneKEA Fedora - Installation 2 07-14-2004 03:12 PM
Upgrading via Internet Fedora Core 1 to Fedora Core 2 cdean Linux - Newbie 2 05-31-2004 12:14 AM
Fedora Core 2 - Just days away! Final comments on Fedora Core 1 lrt2003 Fedora 3 05-12-2004 03:09 AM
Rescuing my Debian! mc_03 Debian 9 03-30-2004 07:19 PM > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration