LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Boots to grub; can't FIND grub.conf, start1 (http://www.linuxquestions.org/questions/fedora-35/boots-to-grub%3B-cant-find-grub-conf-start1-457524/)

pushtostart 06-23-2006 06:10 AM

Boots to grub; can't FIND grub.conf, start1
 
Hello all, I hope that I don't frustrate the forum with my first post. I am new to linux, but am otherwise pretty comfortable with computers. Here's my issue:

I had a good installation of Core 5 running. I wanted to try to load DSL onto my USB Flash Drive. After booting off of DSL and trying to start Frugal Lite to perform the installation, which is what I thought needed to be done, the process seemed to hang at a line creating a directory in /etc/...
After several minutes I was impatient, and somewhat concerned about my nice new Core 5 installation. I rebooted the machine and pulled out the CD and was met with:
GRUB>

I'm new to all of this so I started doing some research. I checked my partitions, which were still the default:
HD0,0
HD0,1

I tried FIND /boot/grub/grub.conf and FIND /boot/grub/start1 and found nothing. I don't recall if those were the exact paths offhand, but I had copied them verbatim from a forum. I also wasn't able to mount the partition /dev/hda.

Next, I rebooted to the Core 5 Installation Disc 1 and started linux rescue. When I got to the shell, I typed chroot /mnt/sysimage. I tried to edit the HD for grub.conf with nano, but it I'm greeting with a new file.

What should I run, check, modify to get grub to start Fedora again? Please include commands and paths as I'm still learning the environment. Any help would great!

Thanks!
Bryan

prozac 06-23-2006 06:21 AM

Quote:

I tried FIND /boot/grub/grub.conf and FIND /boot/grub/start1 and found nothing.
The default location for grub.conf is /etc and not /boot.
Quote:

I also wasn't able to mount the partition /dev/hda.
/dev/hda refers to a whole drive and not just a partition, you should try
Code:

fdisk -l
to see what your partitions are example /dev/hda1, /dev/hda2

boot with the fedora cd in rescue mode and after the chroot /mnt/sysimage try this

Code:

grub-install hd0

pushtostart 06-23-2006 07:55 AM

Thank you prozac! I'll try those out tonight and report back.

Does anyone know of a pdf or other file that lists out the directory structure for fedora, as a reference?

prozac 06-23-2006 07:56 AM

the directory structure is more or less same for every other distro with minor exceptions.

decrepit 06-23-2006 08:04 AM

I'm not a linux expert, but on all my installation grub.conf is in /boot/grub, but in this core4 installation there is a link in /etc to grub.conf.

[mike@core4 ~]$ cd /boot/grub
[mike@core4 grub]$ ls
device.map grub.conf minix_stage1_5 stage2
e2fs_stage1_5 iso9660_stage1_5 reiserfs_stage1_5 ufs2_stage1_5
fat_stage1_5 jfs_stage1_5 splash.xpm.gz vstafs_stage1_5
ffs_stage1_5 menu.lst stage1 xfs_stage1_5

pushtostart 06-23-2006 08:30 PM

Code:

fdisk -l
returned:
/dev/hda1
/dev/hda2
with hda1 being marked as boot.

When I ran
Code:

grub-install hd0
This message was returned:
The file /boot/grub/stage1 not read correctly.

What should I check or do next? Is grub hosed?

Thanks!

syg00 06-23-2006 09:16 PM

The files you were looking for were "menu.lst" and "stage1" - as per the ls above from decrepit.
Try the find commands again (correct this time ;) ) and use the partition returned (say (hd0,0) ) in the following
Code:

root (hd0,0)
setup (hd0)
reboot

If that doesn't work, yes your grub is hosed.

EDIT: you may need to do the find against /grub/... rather than /boot/grub/... - at that stage, Linux mounts are assumed for /boot even though Linux hasn't been loaded as yet.

pushtostart 06-24-2006 07:36 AM

Thanks syg00!

I tried the FIND and came up null.
root (hd0,0)
Filesystem type unknown, partition type 0x83
setup (hd0)
Error 17: Cannot mount selected partition

So this isn't good. How can I reinstall GRUB? I was reading that I can boot Linux manually by loading the kernel, but I'd have to find the full kernel name. Should I use the rescue CD to do that? I would be running something like:
root (hd0,0)
kernel <kernel name> ro root=hd0
boot
correct?
The syntax is a bit off, so I'll have to recheck it. I would like to rescue this machine rather than reinstall everything. Thanks for all of your help!

Trip in VA 06-24-2006 08:49 AM

Manually booting is not that difficult, it's just intimidating. I know; I've done it more than once when I screwed up GRUB.

You've got the basic idea down. Did you have /boot on a different partition? If not, it could change how you have to do this; these instructions assume a separate /boot partition on /dev/hda1.

root (hd0,0)

What you can do to figure out your kernel is to type the 'vmlinuz' or some part of the kernel name (if it's Fedora's default, it will be vmlinuz{number}) and press tab. Assuming it's reading the partition correctly, that is. So you'll type this (the {tab} is where you press tab to get the number):

kernel vmlinu{tab} root=/dev/hda1 ro

Then, to get it started, you type 'boot' as shown.

At least, that's been my experience. If you don't have a separate /boot partition, you might need to alter this line accordingly:

kernel boot/vmlinu{tab} root=/dev/hda1 ro

Let us know how it works out.

- Trip

pushtostart 06-25-2006 09:24 AM

Thanks for your help Trip in VA!

It doesn't look good:

kernel vmlinu<tab>
Error 11: Unrecognized device string

kernel /vmlinu<tab>
Error 17: Cannot mount the selected partition

kernel /boot/vmlinu<tab>
Error 17: Cannot mount the selected partition

It looks like it's time to start over. I was just getting ndiswrapper going to try and use my wireless card and get online. Oh well, I hope I took good notes! Thanks for everyone's help, I did learn a bit more about the evironment though.

daveymg 10-09-2006 05:01 PM

Quote:

Originally Posted by pushtostart
Thanks for your help Trip in VA!

It doesn't look good:

kernel vmlinu<tab>
Error 11: Unrecognized device string

kernel /vmlinu<tab>
Error 17: Cannot mount the selected partition

kernel /boot/vmlinu<tab>
Error 17: Cannot mount the selected partition

It looks like it's time to start over. I was just getting ndiswrapper going to try and use my wireless card and get online. Oh well, I hope I took good notes! Thanks for everyone's help, I did learn a bit more about the evironment though.

I got to this thread after researching for a solution to the same problem/symptom. FWIW, I was able to correct the problem by booting from the FC CD, going into rescue mode and issuing the command fsck -y /dev/hda1

The fsck fixed many problems on hda1, after which I was able to reboot the system correctly.

My original problem occurred after the machine was powered of without being shutdown cleanly.

dg


All times are GMT -5. The time now is 04:03 PM.