LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-11-2011, 09:29 PM   #1
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,361
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Dual Boot Slackware with CentOS using CentOS GRUB


I would post this in a CentOS forum, but there doesn't seem to be one here at LQ. I know there's a Red Hat forum, but as a long-time Slackware user, I'd rather ask this question here. If I should ask it in the Red Hat forum, please just steer me in the right direction.

Background:

For various reasons, I have to learn my way around CentOS. I have an old computer (P3) with Slackware on it. I threw in a second HDD that I had lying around and installed CentOS to it. I was figuring that I'd just decline installing GRUB or point GRUB to Slackware as the second OS and end up with dual boot.

The CentOS install, though, blew right past that part with offering me any options. It put a small boot partition on the CentOS drive and now the box boots straight into CentOS.

I've spent the better part of the day trying to get GRUB to boot the Slackware drive and had no luck, though I've learned a lot about GRUB error messages.

By the way, CentOS uses GRUB v 0.97.

Question:

I was wondering if someone could point me to a reference that would help.

Here's the output of fdisk -l on that computer (/dev/sda is a 4GB SCSI disk that was originally the boot disk for Windows 2000 server on that computer):

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2432    19535008+  83  Linux
/dev/hda2            2433        4998    20611395    5  Extended
/dev/hda5            2433        4742    18555043+  83  Linux
/dev/hda6            4743        4998     2056288+  82  Linux swap / Solaris

Disk /dev/hdb: 10.0 GB, 10005037056 bytes
255 heads, 63 sectors/track, 1216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1          13      104391   83  Linux
/dev/hdb2              14        1216     9663097+  8e  Linux LVM

Disk /dev/sda: 4551 MB, 4551129088 bytes
138 heads, 63 sectors/track, 1022 cylinders
Units = cylinders of 8694 * 512 = 4451328 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1022     4442602+  83  Linux
Here's the currentGRUB file. I added the section about Slackware. I've also tried pointing it at:

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 (hd1,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=20
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-238.5.1.el5)
        root (hd1,0)
        kernel /vmlinuz-2.6.18-238.5.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-238.5.1.el5.img
title CentOS (2.6.18-194.32.1.el5)
        root (hd1,0)
        kernel /vmlinuz-2.6.18-194.32.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-194.32.1.el5.img
        kernel /vmlinuz-2.6.18-194.32.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-194.32.1.el5.img
title CentOS (2.6.18-194.el5)
        root (hd1,0)
        kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-194.el5.img

title Slackware
        rootnoverify (hd0,0)
        chainloader +1
I've also tried:

Code:
title Slackware
        rootnoverify (hd0,0)
        chainloader +1
        boot
Code:
title Slackware
        root (hd0,0) 
        kernel /boot/vmlinuz-huge-smp-2.6.29.6-smp root=/dev/hda1
. . . and several other permutations.

Slackware's LILO:

It's been six months or more since I used this computer. It's my experiment-er "play" computer and I had taken the HDD out to test a computer for one of the members of my LUG, so I can't remember exactly how I configured the LILO install, but, if I did what I usually do, I installed it to the MBR of /dev/hda. I have considered just blowing away LILO, but I'd be happier if I could just use GRUB to call LILO.
 
Old 04-11-2011, 10:28 PM   #2
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 69
I'm totally lost around grub. Couldn't you boot a Slack cd and rerun lilo adding CentOS to it?
 
Old 04-11-2011, 10:35 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
So, what error message do you get when you try to use your slackware entry?

Just guessing, I think you'd need to use something like...
Code:
title Slackware
        root (hd0,0)
        kernel /boot/vmlinuz-generic-smp-2.6.29.6-smp ro
        initrd /boot/initrd.gz
The beauty of grub is that you can enter the grub command line and test the root command to see if it is pointing to the correct partition as well as seeing if you have the kernel and initrd lines correct.

Last edited by Richard Cranium; 04-12-2011 at 03:47 AM. Reason: I'm too stupid to read carefully; I missed that the OP does NOT have a /boot partition. hakan56 didn't miss that.
 
Old 04-12-2011, 01:06 AM   #4
hakan56
Member
 
Registered: Nov 2004
Location: Sweden
Distribution: Slackware64-14.0
Posts: 53

Rep: Reputation: 9
Code:
title Slackware
        root (hd0,0) 
        kernel /boot/vmlinuz-huge-smp-2.6.29.6-smp root=/dev/hda1
That looks alright, add "ro" to the "kernel-line", but I think it should boot anyway.

You have installed slackware on hda1 without a separate boot-partition...but you have 3 disks and perhaps the "disk-numbers" has changed...try locking for your kernel with the "grub-commands" you see here..
http://www.linuxquestions.org/questi...8/#post4319224
..if you don't know that your initrd.gz is working, try locking for the "huge-kernel"

/Håkan
I think you can only "chainloader +1" if the other "boot-loader" is installed in the rot-partition (/)

Last edited by hakan56; 04-12-2011 at 01:20 AM.
 
1 members found this post helpful.
Old 04-12-2011, 06:50 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,361

Original Poster
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Thank you all for your suggestions.

bonixavier:

I really don't want to be messing with the CentOS install right now or I'd try that; I need CentOS for something I'm studying.

Right now the box is booting directly into GRUB and bypassing LILO completely. (I wonder whether GRUB just blew away LILO; I'll check whether dd can tell me something about that.)

I'm pretty clueless about either GRUB or LILO, since I don't normally have to dual-boot.

I install the distro and the bootloader, reboot, and the distro works. So this is an opportunity for me to learn. The way I learn is by breaking things.

Richard Cranium and hakan56:

I've gotten error messages 13, 15, and an endless hang.

I'll try your suggestions tomorrow and report back.

I did not try adding an initrd entry in the GRUB menu because, when I mount the Slackware drive, there's no initrd in /boot, but, what the hey! the worst that can happen is that it won't work.

Right now I'm watching the Philadelphia Phillies play baseball. I don't get much opportunity to see them on television in this part of the world so I'm not passing this up (grin).
 
Old 04-12-2011, 07:00 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
If lilo is installed to the MBR try
Quote:
root (hd0)
chainloader +1
Quote:
root (hd0,0)
points to the first partition on the disk and not the MBR

Last edited by colorpurple21859; 04-12-2011 at 07:01 PM.
 
Old 04-12-2011, 07:38 PM   #7
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
OPTION 1:

GRUB 0.97 requires a patch to support 256-byte inodes. Partitions formatted for EXT2, EXT3 or EXT4 by newer versions of Slackware default to 256-byte inodes. The GRUB installed by CentOS won't be able to load Slackware's kernel file if GRUB hasn't been patched. You can either put the Slackware kernel file into a partition formatted with 128-byte inodes or update GRUB using the patched version in Slackware.

OPTION 2:

The usual installation of LILO installs it to the MBR, so installing GRUB most likely left you with no boot sector for LILO. Chaining to LILO will work, but you have to make sure to install LILO to the Slackware Linux partition's boot sector instead of the Master Boot Record. Then have GRUB chain to the Slackware Linux partition's boot sector.

OPTION 3:

If you prefer LILO to start first, install LILO to the MBR and install GRUB to the CentOS Linux partition's boot sector.

OPTION 4:

You can format the Slackware partition using 128-byte inodes. That will allow you to boot using any version of GRUB. It will also allow "Ext2fs" for Windows to read files from the partition.

For example:

mke2fs -j -I 128 /dev/sda2

The uppercase "I" option specifies the inode size.

Last edited by Erik_FL; 04-12-2011 at 07:52 PM.
 
Old 04-14-2011, 07:51 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,361

Original Poster
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Quote:
Originally Posted by Erik_FL View Post
OPTION 1:

GRUB 0.97 requires a patch to support 256-byte inodes.
I did some more experimenting (calling it testing would be over-dignifying it) today and I think Erik_FL has nailed it.

When my Slackware subscription CDs arrive, I'll take another look at this.

Thank you everyone for taking the time to offer your ideas.
 
Old 10-26-2011, 07:54 AM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,361

Original Poster
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
I know this is old, but I have solved the problem, though with Fedora, not CentOS because the CentOS box is terminally ill.

I had a working Fedora 15 on /sda3 and /sda4 on a laptop. (Partitions /sda1 and /sda2 were the old C:\ and boot drives from a Win XP load.)

I blew away the first two partitions created a 15 GB partition formatted ext2 and formatted the remainder ext4 for /home. After installing Slackware to the ext2 partition, I did not install LILO, but instead entered the following in the grub menu.lst (Note: Fedora still uses Grub 0.97):

PHP Code:
title Slackware Linux
        root 
(hd0,0)
        
kernel /boot/vmlinuz ro root=/dev/sda1 quiet 
It works just fine without an initrd line. Don't ask me why.

Now I have to get the Broadcom wireless working with Slackware (it works just fine with Fedora--I'm typing this on that computer right now).

Last edited by frankbell; 10-26-2011 at 07:56 AM.
 
Old 10-26-2011, 11:04 AM   #10
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
It works just fine without an initrd line. Don't ask me why.
Probably because /boot/vmlinuz is a symlink to the huge kernel
 
  


Reply



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
LXer: PV-Grub on CentOS 5.2 PV DomU at Xen 3.3 CentOS 5.2 Dom0 (all 64-bit) LXer Syndicated Linux News 0 10-05-2008 10:12 PM
need to dual boot centos 5.1 with xp but centos is already installed. extendedping Linux - Software 4 05-13-2008 08:40 PM
Dual boot centos 4.2 haiders Linux - Newbie 2 12-08-2006 12:15 PM
grub.conf dual boot xp centos xp does not load Envision5000 Linux - Newbie 8 03-06-2006 10:04 PM
CentOS / Slackware Dual boot Problem Dankles Slackware 2 11-01-2005 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:47 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
Open Source Consulting | Domain Registration