Visit Jeremy's Blog.
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 03-01-2006, 10:31 PM   #1
Registered: Aug 2003
Location: Pondicherry,India
Distribution: Fedora Core 3, RedHat 9.0, SUSE 8.1 Personal,
Posts: 49

Rep: Reputation: 15
Red face Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk

1) Happy system with Windows xp SP2 and Fedora Core 4.
2) Both on a single harddisk - xp on the sole primary partition and FC4 on extended (/boot,/,/home,swap) and other NTFS partitions.
3) Harddisk had an empty 10 GB partition in the extended just after the swap.
4) Partitioned the empty partition into 2 using the Disk management in Adin ools->Compter management in XP.
5) partition table changed = GRUB lost = problem begins.


1)booted into the Fedora rescue cd -> chrooted into /mnt/sysimage -> grub-install --recheck /dev/hda
2)/dev/hda:no such device or not a block device.
3)fdisk -l -> cannot open /proc/partition
4)parted -> no device found (smthing like that) -> Retry/Cancel?
5)df -> shows only / and /dev/proc
6)the /dev partition has only one file called "null"
7)I am ABLE to access all my partitions ie. /boot,/,/home but why does the programs (fdisk,parted,grub) unable to see the harddisk.

i even tried taking the image of the /boot partition:
dd if=/dev/hda6 of=linbootsec.img bs=512 count =1
complains -> input file /dev/hda6 cannot be found.

Please suggest ways to restore GRUB.

Any help is greatly appreciated.

Misc info:
p4 system with asus p4p800vm i865 chipset(ICH 5).
Old 03-02-2006, 02:05 AM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Boot from a live distro and look at the partitions.
Old 03-02-2006, 08:27 PM   #3
Registered: Jul 2004
Location: Canberra
Distribution: Mint 7
Posts: 204

Rep: Reputation: 30
I had this happen with a different distro found I had to use lilo to setup the MBR that allowed me to boot into linux and then I could reinstall grub quite strange
Old 03-03-2006, 04:00 AM   #4
Registered: Aug 2003
Location: Pondicherry,India
Distribution: Fedora Core 3, RedHat 9.0, SUSE 8.1 Personal,
Posts: 49

Original Poster
Rep: Reputation: 15
Hello all,
Finally got the problem solved. Although its not quite clear as to what solved it, i did the following after frustrating search and thought:
1)the partition table was obviously altered and hence /etc/fstab had invalid entries reflecting the old structure. =>Removed unwanted entries and tried to make the file a minimal one.

2)By trial and error guessed what could be the root partition number .....found it to be /dev/hda6 and not /dev/hda5 as it was earlier.By keeping this as a reference changed other partition device name entries and rebooted.

3)Bingo! fdisk -l at last gave an output. But i don't understand this. does fdisk read the fstab file for any querying? brushing aside such doubts I issued
grub-install --recheck /dev/hda
this gave a different error this time stating the file
/boot/grub/stage1 not read correctly
4)Then I had to painstakingly study the
info grub
pages and learnt how to install it natively. I think it was easy at the end and I did learn a lot.Thank God I had this problem or else I would'nt have learnt so much.

5)But no, the problems were not yet over. The native install method just gave me a grub prompt from where I could enter commands everytime I wanted to boot. This was ok with me but thinking of my father I badly wanted the menu interface....and then further research(?!!) gave me the perfect answer
root (hd0,5)
install /grub/stage1 (hd0) /grub/stage p /grub/menu.lst
Hope this thing helps someone with a near-similiar problem.
Old 03-05-2006, 03:01 PM   #5
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Thanks for: a) posting your answer, b) posting this answer.

Very useful to my understanding of the finer/deeper points of GRUB.

sfdisk can back up & restore partition tables.

gpart is supposed to fix trashed partition tables. I say "supposed to" because it is complicated & I haven't used it yet.


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
Restoring GRUB using a rescue cd aus9 Linux - Software 7 05-13-2013 02:31 AM
grub won't load fedora 4, rescue disk says partition is unformatted! Linux - Software 29 12-01-2005 07:33 AM
reinstalling grub in rescue mode ELconkestador Linux - Newbie 5 02-13-2005 04:43 AM
reinstalling grub on rescue mode mabus92920 Linux - Newbie 3 01-15-2005 06:04 AM
grub reinstall from rescue CD shashikanth Linux - Software 12 08-22-2004 05:40 AM > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 02:43 PM.

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
Open Source Consulting | Domain Registration