LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub.conf question (https://www.linuxquestions.org/questions/linux-software-2/grub-conf-question-275428/)

ndegrace 01-08-2005 12:54 PM

grub.conf question
 
Hi,

I accidently destroyed my grub.conf file (don't ask me...) and I can't recreate it. I'm no grub expert and I barely remember its content. Is there a way to regenerate it?

Thanks a lot,
Nathalie.

blinux1 01-08-2005 01:24 PM

what distro do you use? Because when I have a problem like that in Mandrake 9, but I don't want to loose any harddrive information (of course) I reinstall mandrake using the upgrade selection--and this automatically goes through the reinstallation of grub or lilo (recognizing your partitions and such).

ndegrace 01-08-2005 01:30 PM

I'm using GNU Grub 0.94 on Linux Fedora Core 2

ndegrace 01-09-2005 08:44 AM

I've tried updating my current installation... didn't work.

I've tried installing version 1.0.5... got a compilation error.

Here is what I think my file looked like...

boot=/dev/hda
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
default=0
timeout=10
title Fedora Core 2 (2.6.5-1.358)
root (hd0,0)
kernel /boot/vmlinuz ro root=LABEL=/
initrd /boot/initrd-2.6.5-1.358.img

vmlinuz is pointing to the right image file. But I'm not sure about the (hd,partition) parameter...?

Here's what I get when I do a df

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 12246940 4243560 7381264 37% /
/dev/hda1 101086 8075 87792 9% /boot
none 156968 0 156968 0% /dev/shm

Is it ok tu use (hd0,0)?
Thanks.

LasseW 01-09-2005 10:31 AM

Yes but if /boot is on a separate partition it should be left out from the kernel and image paths. I have a configuration similar to yours, here's an excerpt of my grub.conf including comments:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz

title Fedora Core (2.6.9-1.681_FC3) Multi-user Graphics mode
root (hd0,0)
kernel /vmlinuz-2.6.9-1.681_FC3 5 root=LABEL=/
initrd /initrd-2.6.9-1.681_FC3.img

ndegrace 01-09-2005 03:51 PM

Problem solved!

You were right!

#boot=/dev/hda
splashimage=(hd0,0)/grub/splash.xpm.gz
default=0
#fallback=1
timeout=10
title Fedora Core 2 (2.6.5-1.358)
root (hd0,0)
kernel /vmlinuz ro root=LABEL=/
initrd /initrd-2.6.5-1.358.img

Thank you for your time and advice.


All times are GMT -5. The time now is 07:38 PM.