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.
p4 system with asus p4p800vm i865 chipset(ICH 5).
Boot from a live distro and look at the partitions.
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
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?.....so brushing aside such doubts I issued
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
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.
|All times are GMT -5. The time now is 09:21 PM.|