LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting up grub for dual boot (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-grub-for-dual-boot-209275/)

wjn 07-24-2004 07:55 PM

Setting up grub for dual boot
 
I just set up Fedora on an unused hard drive on this this system. It has RH9 on the other drive and it's working fine.

At the Fedora install I chose to install grub with the idea of making it a dual boot system. This would have been dandy but unfortunately I didn't know what to put in for the boot commands for the RH9 installation. And I still don't.

I thought maybe I could look at the grub.conf file but of course that file is the problem so boy was I amused to find out I couldn't get any help there.

Well, I couldn't help but think that my lilo.conf.anaconda file might have the info in it that needs to be entered into the grub.conf file. Perhaps if I post it here, someone can look at it and tell me what needs to be in the grub file?

As ususal, thanks in advance.


Here's the LILO file for the RH9 installation.

prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
restricted
password=huff0rd
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.20-8
label=linux
initrd=/boot/initrd-2.4.20-8.img
read-only
append="hdb=ide-scsi root=LABEL=/"

Here's the grub file I'm trying to fix.


# 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=20
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$.rXbQVh3$VZLw0phA9T4yuSUrJQiB8/
title Fedora Core (2.4.22-1.2197.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2197.nptl ro root=LABEL=/1 hdb=ide-scsi rhgb
initrd /initrd-2.4.22-1.2197.nptl.img
title Fedora Core (2.4.22-1.2115.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/1 hdb=ide-scsi rhgb
initrd /initrd-2.4.22-1.2115.nptl.img


title RH9
root (hd1,0)
kernel /vmlinuz-2.4.20-8
initrd /boot/initrd-2.4.20.8.img
append initrd=initrd.img hdb=ide-scsi root=/dev/hdc1


The red part of the grub file is the part I wrote myself.

Thanks in advance,

Bill

osvaldomarques 07-24-2004 11:58 PM

Hi wjn,
Basically, you don't tell us if you have a boot partition on RH9. In your "red" lines you say to grub that the kernel is on the root directory of partition /dev/hdc1, when you state "root = (hd1,0)". But you say that "initrd" is in "/boot" directory of the same disk. And you say to the kernel "root=/dev/hdc1".
So, if you have a separated "/boot" partition where kernel and initrd are, you have to specify
Code:

root = (hd1,x) # x is the number of the boot partition /dev/hdcn - 1
kernel /vmlinuz-2.4.20-8 hdb=ide-scsi root=/dev/hdc1 # the real root partition (/)
initrd  /initrd-2.4.20.8.img

If you don't have a separated boot partition, you need to specify
Code:

root = (hd1,x) # x is the number of the root partition /dev/hdcn - 1
kernel /boot/vmlinuz-2.4.20-8 hdb=ide-scsi root=/dev/hdc1 # the real root partition (/)
initrd  /boot/initrd-2.4.20.8.img

If this hints are not enough, please post the results of "fdisk -l" to give us some hint of where are the partitions?

wjn 07-25-2004 11:33 AM

Thanks, Osvaldo...

Here is the result of fdisk -l


Disk /dev/hdc: 41.1 GB, 41174138880 bytes
16 heads, 63 sectors/track, 79780 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 77765 39193528+ 83 Linux
/dev/hdc2 77766 79780 1015560 82 Linux swap

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 4739 37961595 83 Linux
/dev/hda3 4740 4865 1012095 82 Linux swap

I hope this helps you to figure this out, I'm a bit thick on this topic.

Thanks again...

Bill

wjn 07-26-2004 12:25 PM

I'm going to take the liberty of bumping this thread back to the top in case somebody might have missed it.

I hope this isn't a breach of etiquitte on the board. If so, my apologies.


All times are GMT -5. The time now is 05:28 AM.