LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to configure grub (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-configure-grub-764230/)

jmc1987 10-24-2009 04:17 PM

Trying to configure grub
 
Okay on /dev/sda
sda1 is windows xp
sda2 slackware /boot /system files
sda3 slackware swap
sda5 Centos LVM

Now my question is when I install CentOS grub did not automaticly setup the slackware partition and I have to configure it manually.

And I am a little lost.

This is my grub.conf file

Quote:

[root@centos ~]# cat /boot/grub/grub.conf
# 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,4)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol01
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.el5)
root (hd0,4)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
title Slackware
root (hd0,1)
kernel /vmlinuz-generic-2.6.29.6
title Other
rootnoverify (hd0,0)
chainloader +1
How should I do the slackware in grub?

Thanks for the help

pixellany 10-24-2009 04:38 PM

So Slackware /boot is on sda2 (To grub, this is (hd0,1))

Suppose that the kernel image is named "vmlinuz", and the initrd image is named "initrd" **.

the grub menu.lst entry will be:

title Slackware
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 ro
initrd /boot/initrd

**I always set up soft links in /boot so that these exact names can be used in the config files. This way, I never have to keep track of the exact file names.

jmc1987 10-24-2009 05:15 PM

Okay I tried what you said

Quote:

#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.el5)
root (hd0,4)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
title Slackware
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 ro
initrd /boot/initrd
title Windows
rootnoverify (hd0,0)
chainloader +1
but is says file not found when I try to boot.

Any ideas?

Just to verify that slackware is on /dev/sda2 I mounted it and check the files and it is there.

sysfce2 10-24-2009 06:05 PM

What do you get when you enter 'find /boot/vmlinuz' at the GRUB prompt?

jmc1987 10-24-2009 06:13 PM

file not found

colorpurple21859 10-24-2009 06:26 PM

for your grub kernel entry use the following:
kernel /boot/vmlinuz root=/dev/hda2 ro
or

kernel /boot/vmlinuz root=/dev/sda2 ro

if neither one works then there is good chance centos grub will not boot a slackware partition.
take your slackware install disk and install lilo to the root partition of slackware, then make the following entry in your grub
rootnoverify (hd0,1)
chainloader +1

sysfce2 10-24-2009 06:40 PM

Did you make a separate boot partition?
Your kernel may be /vmlinuz

Does 'find /vmlinuz' (at GRUB prompt again) find your slackware partition (hd0,1)?

EDIT: I guess also that your kernel could be named something else. Check that there is a vmlinuz in /boot.

jmc1987 10-24-2009 06:55 PM

in my slackware boot I have

boot_message.txt
config
config-generic-2.6.29.6
config-generic-smp-2.6.29.6-smp
config-huge-2.6.29.6
config-huge-smp-2.6.29.6-smp
diag1.img
README-.initrd
slack.bmp
System.map
System.map-generic-2.6.29.6
System.map-generic-smp-2.6.29.6-smp
System.map-hug-2.6.29.6
System.map-hug-smp-2.6.29.6-smp
vmlinuz
vmlinuz-generic-2.6.29.6
vmlinuz-generic-smp-2.6.29.6-smp
vmlinuz-huge-2.6.29.6
vmlinuz-huge-smp-2.6.29.6-smp

This is everything in my /boot file

colorpurple21859 10-24-2009 07:14 PM

to install lilo go back into setup with the slackware install disk select the partition you installed to again, but do not format. get back to the main menu select configure system select no or cancel untill you get to the lilo setup. select simple, install to root partion. after installing lilo select cancel and no to all other prompts untill you get back to the main screen reboot. add the chainloading entry to grub.

sysfce2 10-24-2009 07:15 PM

That's kind of weird then that GRUB couldn't find it.
What file system is being used?

The file not found could be coming from the ram disk though - I don't see initrd in your listing - try removing that line from grub.conf.

Another option could be to copy the kernel to the CentOS boot folder and then using:

root (hd0,4)
kernel /boot/vmlinuz root=/dev/sda2 ro

colorpurple21859 10-24-2009 07:18 PM

sysfce2 idea will work too, never thought about doing that.

jmc1987 10-24-2009 07:31 PM

Quote:

Originally Posted by colorpurple21859 (Post 3731358)
to install lilo go back into setup with the slackware install disk select the partition you installed to again, but do not format. get back to the main menu select configure system select no or cancel untill you get to the lilo setup. select simple, install to root partion. after installing lilo select cancel and no to all other prompts untill you get back to the main screen reboot. add the chainloading entry to grub.


I am not trying to use lilo I am trying to use grub.

File system I selected when I installed slackware was ext3

colorpurple21859 10-24-2009 07:57 PM

I know your not using lilo. I was in the middle of typing when sysfce2 had posted. most grubs from other distos will not boot a slackware formatted partition, I was telling you one way to get slackware to boot from centos grub because I also use a grub that will not boot a slackware partition, however sysfce2 way will work too, and is an easier way. if you have ide harddrive use /dev/hda2, sata then /dev/sda2. will need to copy vmlinuz-huge-smp-2.6.29.6-smp to centos boot directory and use it in your kernel line of grub, vmlinuz is a link to it


All times are GMT -5. The time now is 11:04 AM.