LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2005, 12:28 AM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
need help creating default grub configure file.


i have two harddrives on my system. On hdb i have FC2 installed. On hda i just installed slackware 10. I can only boot into FC by using a boot disc i made. i did grub-install /dev/hda to install it. So when i start up i can get into the grub shell. It is grub 0.94. my question is that the config file should be menu.1st in /boot/grub/grub.config or something like that right? But this is the content of /boot/grub/

device.map ffs_stage1_5 reiserfs_stage1_5 stage2
e2fs_stage1_5 jfs_stage1_5 splash.xpm.gz vstafs_stage1_5
fat_stage1_5 minix_stage1_5 stage1 xfs_stage1_5

I read you can do grub-update to create a default config file but when i do whereis grub-update i get no results. I've been reading info grub and online but haven't been successful yet. If anyone could help i'd appreciate it.
 
Old 02-28-2005, 01:58 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
Well, you basic grub.conf or menu.lst is as follows:

default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Linux
root (hd0,1)
kernel /vmlinuz-2.6.10
initrd /initrd-2.6.10

Now it all depends on how you partitioned your hard drive. hd0,0 refers to the first hard drive {hda} and the first partition {hda1}. I don't know how you partitioned yours so mine may not work for you.
 
Old 02-28-2005, 02:01 AM   #3
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
From the grub shell i did this command.

install (hd1,0)/boot/grub/stage1 (hd0) (hd1,0)/boot/grub/stage2 p (hd1,0)/boot/grub/menu.conf

in emacs i created /boot/grub/menu.conf - this is the file i created.

default = fedora core 2
timeout = 10
color = white/black blue/black
splashimage = (hd1,0)/boot/grub/splash.xpm

#Fedora Core 2
title Fedora Core 2
root (hd1,0)
kernel /boot/vmlinux-2.6.5-1.358
boot /boot/initrd-2.6.5-1.358.img

then i rebooted and now instead of going to the grub shell grub is printed at the top left corner of the screen in capital letters in white with a blinking cursor next to it. If anyone can help i give my thanks in advance.
 
Old 02-28-2005, 02:20 AM   #4
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
well i created a file menu.config. should i change the name of it to menu.lst then do in the grub shell:

p (hd1,0)/boot/grub/menu.lst

or does it not matter?
 
Old 02-28-2005, 04:38 AM   #5
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
well i have had some sucess. I changed the file to grub.conf. Now i get a menu but i get Error 15: File not found when it looks for vmlinuz. This is my current grub.conf:

default = Fedora Core 2
timeout = 10
color = white/black blue/black
splashimage = (hd1,0)/boot/grub/splash.xpm.gz

#Fedora Core 2
title Fedora Core 2
root (hd1,0)
kernel /vmlinuz-2.6.5-1.358
initrd /initrd-2.6.5-1.358.img

my guess is that im not refering to vmlinuz correctly in the grub.conf file so im looking up that. At first it was because i out of habit put vmlinux and i just double checked that the version numbers matched up.
 
Old 02-28-2005, 05:37 AM   #6
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
ok im getting closer now FC2 starts to load up but then i get this error message:

Kernel panic: no init found try passing init= option to kernel.

here is my newest grub.conf file.

default = Fedora Core 2
timeout = 10
color = white/black blue/black
splashimage = (hd1,0)/boot/grub/splash.xpm.gz

#Fedora Core 2
title Fedora Core 2
root (hd1,0)
kernel /boot/vmlinuz-2.6.5-1.358
initrd /boot/initrd-2.6.5-1.358.img

thanks for any help. i appreciate it.
 
Old 02-28-2005, 08:09 AM   #7
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Here's what a menu.lst / grub.conf for FC3 might look like. You will need to change the vmlinuz and initrd to match your setup.

# 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 (hd1,1)
# kernel /boot/vmlinuz-version ro root=/dev/hdb2
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=15
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
title Fedora Core
root (hd1,1)
kernel /boot/vmlinuz-2.6.10-1.766_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10-1.766_FC3.img
title Windows
rootnoverify (hd0,0)
chainloader +1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
Creating a configure script hylke Programming 4 04-21-2005 01:47 PM
grub configure to take it's conf file from a fat32 partition hq4ever Linux - General 1 11-20-2004 04:55 PM
creating file with default text..how to? rohan208 Linux - General 3 05-10-2004 04:53 AM
I need the default RH 9 .configure file bad. Pcghost Linux - General 4 07-01-2003 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration