grub won't load fedora 4, rescue disk says partition is unformatted!
Hi friendly linux folk,
here's the pickle: I've got GRUB prompt, and Fedora Core 4 won't boot. I need to have someone walk me through using GRUB. I can load Windows XP using the chainloader thing, but that's useless to me. My partitions (on an i686): hd0,0=bios hd0,1=windows hd0,2=linux swap hd0,3=fedora 4 I've tried using the fedora rescue CD (no floppy drive), and it gives me a command prompt, or if i try to get to the upgrade section of the CD, it tells me that the partition with linux on it has not been formatted. i've tried google, the wiki/man pages, etc. I'm lost. I know this is probably really simple because I have not changed the grub.conf file. Please HELP!! |
When you say that you are getting a grub prompt, are you getting:
grub_ --OR-- grub> It sounds like you are getting the grub shell (grub>) that will allow you to do a native grub installation. If so, then run through the find, root and setup commands like this: grub> find /boot/grub/stage1 which will probably output (hd0,3). Then run root: grub> root (hd0,3) or using whatever “find” found instead of (hd0,3). Then run setup: setup (hd0) reboot You should now be able to boot into FC4. All of this is covered in Grub Manual: http://www.gnu.org/software/grub/man...-GRUB-natively |
I've got
grub> |
And I tried
grub> find /boot/grub/stage1 and recieved: Error 15: File not found Yikes! |
Okay, tried the:
setup (hd0,3) and it gave me: checking if /boot/grub/stage1 exists...no checking if /grub/stage1 exists...no Error 2: Bad file or directory type I even tried it with the other partition numbers in case I had messed up what the numbers were and I got the same thing. Help!! |
Try:
grub> find /grub/stage1 Use this one if you have a separate /boot partition. By “hd0,0=bios” did you mean /boot? |
no, hd0,0 is the MBR/the BIOS/the dell diagnostics-- on all PCs it is usually located on the first section of the hard disk, i think?
hilary |
Did you use autopartitioning when you installed?
|
nope, I think I manually told it to do everything. Unfortunately I have linux on an extended partition.
|
grub> find /grub/stage1
prints: Error 15: File not found |
Something must really be messed up with your installation, if neither “find /boot/grub/stage1” or “find /grub/stage1” found anything. About now, I usually get out my Knoppix CD, boot the system with it and have a look around.
You can get a Knoppix iso image at: http://www.knopper.net/knoppix/index-en.html You can also run grub from Knoppix. BTW, if FC4 is installed in a logical partition within the extended partition, then it would need to be in hd0,4 or greater. The first logical partition is numbered as 5, whereas all primary/extended partitions are numbered 1-4. |
Disk /dev/hda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders units=cylinders of 16065 * 512 = 8225280 bytes Device Boot start end blocks id system /dev/hda1 1 5 40131 de dell utility /dev/hda2 * 6 642 5116702+ 7 HPFS/NTFS /dev/hda3 643 655 104422+ 83 Linux /dev/hda4 656 3648 24041272+ 5 Extended /dev/hda5 656 3648 24041241 8e Linux LVM This is what the partition table looks like. so in GRUB, hd0,0=dell utility, and so on, right? |
sorry that printed really messed up
|
Yes, those are the good-old Dell utilities in hda1.
It looks like hda3 is /boot. While you are in linux rescue mode, try running these commands and tell me, more or less, the first few things that are listed at the two ls command steps: mkdir /mnt/temp mount -t ext3 /dev/hda3 /mnt/temp cd /mnt/temp ls cd grub ls cd / umount /mnt/temp If the mount step fails, try running: e2fsck -f /dev/hda3 and see if there are problems with the filesystem. |
mkdir /mnt/temp
mount -t ext3 /dev/hda3 /mnt/temp prints: mount: mounting /dev/hda3 on /mnt/temp failed: Invalid argument I think i typed it in correctly? hilary |
e2fsck -f /dev/hda3
prints: group descriptors look bad... trying backup blocks... resize inode not valid. Recreate<y>? Should i recreate???? |
You’re getting error messages that I don’t usually see.
Something is amiss with hda3 with respect to an ext3 filesystem, so you don’t have much to loose by saying “y”. It doesn’t appear to be functional now and may not be after “y”. |
Well, if I can save my hard drive by taking it to a local computer shop for a hard drive recovery, will hitting <y> wreck any chances I have for saving what's on it??
|
I hit <n> and it printed:
Pass 1: checking inodes, blocks, and sizes Inode 7, i_blocks is 3074, should be 3044. Fix<y>? I hit <n> to each consequtive question and it told me that the: filesystem still has errors I tried it all over again and hit <y> for all questions. it told me that the file system was modified. |
It will only alter what is in hda3, so the NTFS stuff will be safe.
The worst thing that should happen is that hda3 will still be inaccessible, which is what I think is going to happen. It’s always remotely possible that you put /boot in the LVM, where grub cannot see it, and that hda3 was never formatted. |
thing is, i've been using fedora on this computer problem free for as long as fedora 4 has been out. It just all of a sudden has problems.
Grub had read the /boot files fine for months now??? |
Actually, having seen your post #19, it may be recoverable. So answer “y” to the questions. The LVM stuff will still be there.
|
I’m going to be off-line for several hours, so other readers of this thread should feel free to offer suggestions and encouragement.
|
Thankyou WhatsHisName
|
I don't know what happened, but it booted!!!!!!!
THanks thakns thanks thanks |
Just do this:
when the system boots and shows grub, 1. type your "root (hdx,x) " command first 2. then type chainloader +1 This is because there is another grub at the partition where it is installed probably. Tell me if it works. I load the same way here. If u have grub on a seperate partition instead of MBR, it happens |
You can also use <tab> to autocomplete grub entries if you want
|
At some point in the near future, you should backup /boot and run e2fsck on hda3 from rescue mode without mounting the installation.
For example, you could create /root/boot_backup and use “cp -a ...” to create an archival backup of /boot there. Then, if the hda3 ext3 filesystem could not be fixed using e2fsck, you could reformat it using “mke2fs -j ...” and then use “cp -a ...” to restore the backup copy to /boot. If you reformatted hda3 as ext3, you would need to either create 2 mount points and then mount hda3 in one and “/” (i.e., the logical volume) in the other so that you could copy from one to the other OR you could reassemble the entire FC4 setup like this: mkdir /mnt/sysimage mount /dev/VolGroup00/LogVol00 /mnt/sysimage mount /dev/hda3 /mnt/sysimage/boot chroot /mnt/sysimage cp -a /root/boot_backup/* /boot If you had other logical volumes for /home, /var, etc., then you should also mount them in a similar manner before using chroot. And the mount point doesn’t have to be named sysimage. It can be anything you want to call it. |
Thanks WhatsHisName
Except that I really understood none of that. If you or someone else could re-explain that to me in really simple newbie language, I'd be so grateful. Hilary |
I had a similar problem while installing FC4. Grub apparently didn't fully install. Most of the files were missing in the grub directory. I had Redhat 9 installed on a different computer, so I copied the grub directory to a thumb drive, then copied them back the the FC4 computer using a livecd. After editing grub.conf, I did get it to start loading the image file, without success. I did do lots of things before I figured out that this was the problem. Now I plan to reinstall FC4, and copy the files from my thumb drive afterwards. hope this helps
|
All times are GMT -5. The time now is 12:56 PM. |