grub.conf question

grub.conf question

Post by Nath » Mon, 10 Jan 2005 03:09:47


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.
 
 
 

grub.conf question

Post by ux » Mon, 10 Jan 2005 03:27:35

1. Reinstalling grub from the installation cds may help.
select update option during installation rather than a new
installation. select grub to be the boot loader and from packages
select any one kernel package and start installation. It has worked for
me.
2. Otherwise following text is there in my grub.conf file
# grub.conf generated by anaconda
#

# Note that you do not have to rerun grub after making changes to this
file

# NOTICE: You do not have a /boot partition. This means that

# all kernel and initrd paths are relative to /, eg.

# root (hd0,1)

# kernel /boot/vmlinuz-version ro root=/dev/hda2

# initrd /boot/initrd-version.img


boot=/dev/hda

default=0

timeout=30

splashimage=(hd0,1)/boot/grub/splash.xpm.gz


title Red Hat Linux (2.4.20-8)

root (hd0,1)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img

title Windows XP

rootnoverify (hd0,0)
chainloader +1

3. A hard learnt lesson : ALWAYS MAKE A COPY OF IMPORTANT FILES BEFORE
EDITING THEM.

 
 
 

grub.conf question

Post by 7 » Mon, 10 Jan 2005 23:26:57


Easiest way I find is to download the Mepis LiveCD,
boot up off that LiveCD, use its installer to install
grub to desired partition and edit the /boot/grub/menu.lst file.
and then reboot.
http://www.yqcomputer.com/
 
 
 

grub.conf question

Post by Nath » Mon, 10 Jan 2005 23:32:54

I've tried updating my current installation... no success

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

Based on your file, here's what I think mine 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 to use (hd0,0) ?
Thanks.
 
 
 

grub.conf question

Post by Nico Kadel » Tue, 11 Jan 2005 00:27:45


It Depends(tm). Depending on your OS distribution, you may be able to
un-install and re-install grub from a rescue CD, which for RedHat and
sensible OS's will try to auto-generate a grub.conf for you.

SuSE, however, breaks the hell out of grub-install and grub.conf and does
serious oddness to it, so you have to use yast to reset it from scratch.
 
 
 

grub.conf question

Post by Nico Kadel » Tue, 11 Jan 2005 00:29:08


He's running Fedora Core 2, you can use the installation CD from that or the
rescue CD to do precisely this.
 
 
 

grub.conf question

Post by 7 » Tue, 11 Jan 2005 01:36:19


Thanks for that - will try that - useful advise for me too.
 
 
 

grub.conf question

Post by Nath » Tue, 11 Jan 2005 06:54:21

Problem solved!

I was told that I had to leave /boot from the kernel and image paths
since it is on a seperate partition.

#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 all for your time and advices.
 
 
 

grub.conf question

Post by Lawrence D » Fri, 14 Jan 2005 20:20:48

In article < XXXX@XXXXX.COM >,



Doesn't matter under SuSE. You'll see that your /boot directory contains
a symlink to itself. This means that paths beginning with /boot always
work.