LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   manually edit FC4 grub.conf to add Ubuntu (https://www.linuxquestions.org/questions/linux-general-1/manually-edit-fc4-grub-conf-to-add-ubuntu-484775/)

alar 09-18-2006 06:07 PM

manually edit FC4 grub.conf to add Ubuntu
 
Before the fact: What am I doing?
I'm attempting to add Ubuntu info to FC4 boot. I'm in FC4 now.
And yes, grub is starting to make sense, but I haven't done this yet...

Question:
Do I still need boot
under Ubuntu option?

In front of me I have two files:

From FC4 there is /boot/grub/grub.conf
From Ubuntu there is /boot/grub/menu.lst

They are on separate drives. FC4 has to be primary because there is a w2k install there too. I have to explain to Ubuntu that it is still wanted, and all those lovely memory checks under menu.lst are appreciated. But Ubuntu can no longer be the primary boot. (I need windoze for work)


But before I reboot I'm just wondering....
Code:

#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,10)/grub/splash.xpm.gz
# hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd0,10)
        kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.11-1.1369_FC4.img

title  Ubuntu, kernel 2.6.15-26-386
        rootnoverify    (hd1,0) 
# should be root for Linux see posting below - thx Arow
        kernel          /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
        initrd          /boot/initrd.img-2.6.15-26-386
        boot


# Windoze wants hd0,0 - this works
title W2K
        rootnoverify (hd0,0)
        chainloader +1

I'm in Fedora and I have Ubuntu mounted. I grabbed the
ubuntu info from /boot/grub/menu.lst but am changing the drive (and text) from
root (hd0,0) to
rootnoverify (hd1,0) -- I'm guessing on this rootnoverify bit

to point Ubuntu to /dev/hdb

Because if
Code:

# fdisk -l

/* This is from fedora...*/
  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        446    3582463+  7  HPFS/NTFS
/dev/hda2            447        9213    70420927+  f  W95 Ext'd (LBA)
/dev/hda5            447        2996    20482843+  c  W95 FAT32 (LBA)
/dev/hda6            2997        3633    5116671  83  Linux
/dev/hda7            6184        7458    10241406  83  Linux
/dev/hda8            7459        8733    10241406  83  Linux
/dev/hda9            8734        8860    1020096  82  Linux swap / Solaris
/dev/hda10          8861        9152    2345458+  83  Linux
/dev/hda11          9153        9213      489951  83  Linux
/dev/hda12          3634        4849    9767488+  83  Linux
/dev/hda13  *        4850        6183    10715323+  83  Linux

Disk /dev/hdb: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

/* This is the Ubuntu drive from the fdisk -l output...*/

  Device Boot      Start        End      Blocks  Id  System
/dev/hdb1  *          1        4810    38636293+  83  Linux
/dev/hdb2            4811        4998    1510110    5  Extended
/dev/hdb5            4811        4998    1510078+  82  Linux swap / Solaris

Then I shall surmise that hda = hd0
and hdb = hd1 - ok. mebbe i already know this..
Just want to keep the reader up to date...

Here goes:
Code:

splashimage=(hd0,10)/grub/splash.xpm.gz
# hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd0,10)
        kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.11-1.1369_FC4.img

title  Ubuntu, kernel 2.6.15-26-386
        rootnoverify    (hd1,0)
        kernel          /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
        initrd          /boot/initrd.img-2.6.15-26-386
        boot /* ? */

If it fails I will repost.

I'm going to hold off for a bit here....

IMHO: fdisk -l is an much overlooked gem!


But why does fedora boot off
root (hd0,10)

when fdisk -l says it's: hda13?
Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        446    3582463+  7  HPFS/NTFS
...
/dev/hda10          8861        9152    2345458+  83  Linux
...
/dev/hda13  *        4850        6183    10715323+  83  Linux

Call me chicken-poop. But I'd appreciate all comments.
Merçi
:)

weibullguy 09-19-2006 05:14 AM

Quote:

Originally Posted by alar
Do I still need boot under Ubuntu option?

According to the GRUB manual, you don't need boot in your menu.lst at all. GRUB knows what to do. Boot is for booting from the GRUB command line.

Quote:

=alar]I grabbed the ubuntu info from /boot/grub/menu.lst but am changing the drive (and text) from root (hd0,0) to rootnoverify (hd1,0) -- I'm guessing on this rootnoverify bit
No, Ubuntu is Linux, use root. Read about the differences in the commands in the GRUB manual.

Quote:

Originally Posted by alar
Then I shall surmise that hda = hd0 and hdb = hd1

Correct.

Quote:

Originally Posted by alar
But why does fedora boot off root (hd0,10)

Because it is the 11th partition on the drive. GRUB starts numbering from zero and just counts by 1. Read about it in the GRUB manual.

alar 09-19-2006 04:45 PM

It worked:

Code:

# 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,10)
#          kernel /vmlinuz-version ro root=/dev/hda6
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,10)/grub/splash.xpm.gz
# hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd0,10)
        kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.11-1.1369_FC4.img

title  Ubuntu, kernel 2.6.15-26-386
        root (hd1,0)
        kernel          /boot/vmlinuz-2.6.15-26-386 root=/dev/hdb1 ro quiet splash
        initrd          /boot/initrd.img-2.6.15-26-386


# Windoze wants hd0,0
title W2K
        rootnoverify (hd0,0)
        chainloader +1

After I changed the rootnoverify to root!
Note: I also missed
/boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash

should be
/boot/vmlinuz-2.6.15-26-386 root=/dev/hdb1 ro quiet splash


Quote:
Originally Posted by alar
Code:

But why does fedora boot off root (hd0,10)
Because it is the 11th partition on the drive. GRUB starts numbering from zero and just counts by 1. Read about it in the GRUB manual.

--- Ahh. Quite right. hda3 and 4 are missing.

Thanks for looking Arow. :)
And there you have it folks.
manually edit FC4 grub.conf to add Ubuntu


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