LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Need help adding second linux distro to grub (https://www.linuxquestions.org/questions/linux-desktop-74/need-help-adding-second-linux-distro-to-grub-653465/)

physicsgeek42 07-03-2008 11:13 PM

Need help adding second linux distro to grub
 
So, I'm already dual-booting Windows and openSUSE, and I want to add Slackware to the mix. I've installed slackware on /dev/sda4, but I refrained from installing LILO at that time because I've heard that GRUB is easier to use, and I was kind of afraid that it might screw up openSUSE because obviously it's a little more tightly integrated than slack. I'm a little unsure exactly how to add slack to my /boot/grub/menu.lst, and if there is anything else that I would need to do. Thanks!

Oh, afterthought: what would be a good command to list my partition table for y'all to see?

weibullguy 07-04-2008 12:12 AM

It's pretty simple. You need to add a line for the title, the grub root (probably the first drive) and a kernel statement. It's all clearly explained in the GRUB manual, but here is an excerpt from my /boot/grub/menu.lst that shows three options on one of my machines.
Code:

#-------------------------------------------------------#
# Following are the Gentoo 2006.1 kernels on this      #
# machine.  The Gentoo installation is on hda5.        #
#-------------------------------------------------------#
title Gentoo 2006.0 (2.6.19-20070916-SMP)
      root (hd0,0)
      kernel /gentoo/gentoo-2.6.19-20070916-SMP ro root=/dev/hda5 VGA=791
      savedefault

#-------------------------------------------------------#
# Following are the Cross Linux from Scratch kernels on #
# this machine.  The CLFS installation is on hdb6.      #
#-------------------------------------------------------#
title CLFS 1.0.0 (Multilib 2.6.19.1-SMP-20070105)
        root (hd0,0)
        kernel /clfs/clfskernel-2.6.19.1-SMP-20070105 ro root=/dev/hdb6 VGA=791
        savedefault 2

title CLFS 1.0.0 (Multilib 2.6.19.1-SMP-20070105 Backup)
        root (hd0,0)
        kernel /clfs/clfskernel-2.6.19.1-SMP-20070105 ro root=/dev/hda9 VGA=791
        savedefault 2

To list your partition table, execute fdisk -l /dev/hda (replace /dev/hda with the device you want to list)

physicsgeek42 07-04-2008 11:22 PM

Okay, my openSUSE root is on /dev/sda5, and my slack is on /dev/sda4, and this is what it looks like now:

Code:

# Modified by YaST2. Last modification on Sat Jun 21 04:35:54 UTC 2008
default 0
timeout 8
gfxmenu (hd0,4)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.5-1.1
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BEVS-_WD-WXEY07J72272-part5 resume=/dev/sda3 splash=silent showopts vga=0x314
    initrd /boot/initrd-2.6.25.5-1.1-pae

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.0 - 2.6.25.5-1.1
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BEVS-_WD-WXEY07J72272-part5 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x314
    initrd /boot/initrd-2.6.25.5-1.1-pae

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd0,4)
    chainloader (hd0,0)+1

Should this line clear it up, assuming /slack is where /dev/sda4 mounts under openSUSE?

Code:

title Slackware
    root (hd0,3)
    kernel /slack/boot/vmlinuz root=/dev/sda4

any idea what all the other stuff in my existing entries does? Also, what do the "ro" and "VGA=791" do in yours?

weibullguy 07-05-2008 12:36 AM

No, where the Slackware partition mounts when you use SuSE is irrelevant. When you choose to boot Slackware, your setup will look for the Slackware kernel named vmlinuz in /slack/boot. It should read /boot/vmlinuz.

The 'ro' causes the kernel to mount the drive read-only initially; later the drive will be remounted read/write. This is generally done so fsck can run on / at bootup.

The VGA=791 sets the grub screen geometry. You can choose from the following:
Code:

Color depth      | 640x480  800x600  1024x768 1280x1024
-----------------+-------------------------------------
256        (8bit)|  769      771      773      775
32000    (15bit)|  784      787      790      793
65000    (16bit)|  785      788      791      794
16.7 Mill.(24bit)|  786      789      792      795

The rest of the stuff is explained in the link in my original post.

physicsgeek42 07-05-2008 11:39 PM

Problem solved! Thanks!


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