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 10-22-2007, 11:29 AM   #1
raziel23x
LQ Newbie
 
Registered: Oct 2007
Location: Canton Mi
Distribution: Slackware 12 and Fedora 7
Posts: 15

Rep: Reputation: 0
How Do I Add Slackware to Fedora's Grub.conf


I Am some what new to Linux as in running it as a OS.

Okay In this order I installed to each of my partitions

Windows XP (hd0,0)
Windows XP System Restore (hd0,1)
Fedora 7 (hd0,2)
Slackware 12 (hd0,3)

Windows XP came on this pc and I decided to create two more partitions and installed Fedora and Slackware in this order

Fedora and installed grub.

AT first grub did not detect my XP install (NTFS) but detected my system restore which was a (FAT32). so I had to manually added XP to grub.

I set up my grub this way using Fedora as a example and googled on how to do this and I have no clue

Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,2)
#          kernel /boot/vmlinuz-version ro root=/dev/sda3
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=4
timeout=10
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.22.9-91.fc7)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.22.9-91.fc7 ro root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.22.9-91.fc7.img
title Fedora (2.6.20-2936.fc7xen)
	root (hd0,2)
	kernel /boot/xen.gz-2.6.20-2936.fc7
	module /boot/vmlinuz-2.6.20-2936.fc7xen ro root=LABEL=/ rhgb quiet
	module /boot/initrd-2.6.20-2936.fc7xen.img
title Fedora (2.6.20-2925.9.fc7xen)
	root (hd0,2)
	kernel /boot/xen.gz-2.6.20-2925.9.fc7 
	module /boot/vmlinuz-2.6.20-2925.9.fc7xen ro root=LABEL=/ rhgb quiet
	module /boot/initrd-2.6.20-2925.9.fc7xen.img
title Fedora-base (2.6.21-1.3194.fc7)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.21-1.3194.fc7.img
title Windows XP
	rootnoverify (hd0,0)
	chainloader +1
title Windows XP Restore
	rootnoverify (hd0,1)
	chainloader +1
title Slackware
	root (hd0,3)
        kernel /boot/linux-2.6.21.7 root=LABEL=/ rhgb quiet
	initrd /boot/initrd-2.6.21.7.img
I tried adding in slackware above like that but i get this error when i try to boot into it
Code:
root (hd0,3)
Filesystem type is ext2fs, partition type 0x83

kernel /boot/linux-2.6.21.7 root=LABEL=/ rhgb quiet

Error 15 File Not Found.
I never gotten to view Slackware interface even after reinstalling Fedora because I made a error with a bad install of a program i was working with which corrupted my install and Fedora did not detect the Slackware install nor i was able to access that partition through fedora to look up who it should look like.

I am mainly just trying to have two versions of Linux installed and windows to be able to test the program make making sure they can be accessed and used but more then one OS.

What i want is help if someone can tell me how to configure grub to boot up Slackware I Am running the latest Version of both Fedora and Slackware I just downloaded and burned them both to DVD and installed them 3 days ago. I have been using google without finding a answer that works
 
Old 10-22-2007, 12:43 PM   #2
raziel23x
LQ Newbie
 
Registered: Oct 2007
Location: Canton Mi
Distribution: Slackware 12 and Fedora 7
Posts: 15

Original Poster
Rep: Reputation: 0
Here is some more information in case you need it


Code:
[root@localhost ~]# fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1             572       20379   159107760   8e  Linux LVM
/dev/sda2               1         571     4586526    b  W95 FAT32
/dev/sda3   *       20380       22350    15832057+  83  Linux
/dev/sda4           22351       24321    15832057+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       30401   244196001    7  HPFS/NTFS
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              15G  5.6G  8.3G  41% /
tmpfs                1013M     0 1013M   0% /dev/shm
/dev/sdb1             233G  154G   80G  66% /media/Storeage
/dev/sda1             152G  121G   32G  80% /media/sda1
[root@localhost ~]#
 
Old 10-22-2007, 03:48 PM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You need to have the same root (hd0,2) for the slackware entry and make sure that your slackware kernel and initrd is copied into that directory with your other kernels.
 
Old 10-22-2007, 03:50 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If I'm not mistaken, Slackware uses the Lilo bootloader instead of grub.

The easiest way to configure the grub.conf in Fedora to boot Slack (assuming Lilo is properly set up in Slack) it this:

title Slackware
root (hd0,3)
chainloader +1

Grub should hand off the boot process to Lilo to boot Slackware.
 
Old 10-22-2007, 08:40 PM   #5
raziel23x
LQ Newbie
 
Registered: Oct 2007
Location: Canton Mi
Distribution: Slackware 12 and Fedora 7
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bigrigdriver View Post
If I'm not mistaken, Slackware uses the Lilo bootloader instead of grub.

The easiest way to configure the grub.conf in Fedora to boot Slack (assuming Lilo is properly set up in Slack) it this:

title Slackware
root (hd0,3)
chainloader +1

Grub should hand off the boot process to Lilo to boot Slackware.
I tried that already and Like I said in the OP I did not installed Lilo
 
Old 10-22-2007, 09:18 PM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
It shouldn't matter. If you installed grub to the boot sector of the Slackware partition, the chainloader +1 command would still work for booting Slackware.

Other than that, your original grub entry for Slackware just needs a small tweak. Change this:
Quote:
title Slackware
root (hd0,3)
kernel /boot/linux-2.6.21.7 root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.21.7.img
to this:
Quote:
title Slackware
root (hd0,3)
kernel /boot/linux-2.6.21.7 root=LABEL=/dev/sda4 rhgb quiet
initrd /boot/initrd-2.6.21.7.img
 
Old 10-22-2007, 10:00 PM   #7
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
raziel23x,
Just a thought, if you can boot into fedora why don't mount the Slackware partiton
and check the /boot directory to make sure that you have the image & initrd names
correct. I have never seen a install of Slackware use what you have unless you have
changed them.

Here's a example of my grub

Code:
  title Slackware-12 on (/dev/hda5)
  root (hd0,4)
  kernel /boot/vmlinuz root=/dev/hda5 ro vga=773
  initrd /boot/initrd.gz
In your first post you had the following which makes me think that
grub could not find your boot image.

Code:
root (hd0,3)
Filesystem type is ext2fs, partition type 0x83

kernel /boot/linux-2.6.21.7 root=LABEL=/ rhgb quiet

Error 15 File Not Found.
Also, and I may be wrong on this, but when you installed Slackware it
probably did install the lilo package but you choose not to run the
"liloconfig" scrip during the install which would set up lilo as your
boot manager. I do that all the time because I like grub better not
meaning is is better, it is just what I like to use.

Hope this helps.
 
Old 10-23-2007, 02:27 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
The partitions being out of order is not a good thing. But if fedora is booting okay it should be no problem. Boot your fedora install and then mount the slackware partition and copy the slackware kernel and initrd into your fedor /boot directory. Then edit the grub.conf entry for slackware like this:
title Slackware
root (hd0,2)
kernel /boot/linux-2.6.21.7 root=/dev/sda4 ro quiet
initrd /boot/initrd-2.6.21.7.img
 
Old 10-23-2007, 02:48 AM   #9
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Why go through so much pain?

While installing Slack .. tell it to install lilo on boot sector of root partition. and then ask grub to chainload
 
Old 10-23-2007, 10:27 AM   #10
raziel23x
LQ Newbie
 
Registered: Oct 2007
Location: Canton Mi
Distribution: Slackware 12 and Fedora 7
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by duryodhan View Post
Why go through so much pain?

While installing Slack .. tell it to install lilo on boot sector of root partition. and then ask grub to chainload

okay I did that but now i have a new issue i cant get Slackware to load into X-windows.

How do i boot into X?
 
Old 10-23-2007, 11:38 AM   #11
raziel23x
LQ Newbie
 
Registered: Oct 2007
Location: Canton Mi
Distribution: Slackware 12 and Fedora 7
Posts: 15

Original Poster
Rep: Reputation: 0
OKay I got i did a google searcha nd found my answer to x windows and slackware but now to figure out how to do updates and add software like yum does by it checking online for a newer Version and if it is possible to install yum into slackware
 
Old 10-23-2007, 12:20 PM   #12
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Or slapt-get, the Slackware port of Debian's apt.
 
Old 10-23-2007, 01:54 PM   #13
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Quote:
Originally Posted by gnashley View Post
The partitions being out of order is not a good thing. But if fedora is booting okay it should be no problem. Boot your fedora install and then mount the slackware partition and copy the slackware kernel and initrd into your fedor /boot directory. Then edit the grub.conf entry for slackware like this:
title Slackware
Code:
root (hd0,2)
kernel /boot/linux-2.6.21.7 root=/dev/sda4 ro quiet
initrd /boot/initrd-2.6.21.7.img
Gnashley, can you tell me what's the difference between root (hdx, x) and root=/dev/sdx (why these two arguments are called root but show to different locations?)

And why this wouldn't work:
Code:
root (hd0,3)
kernel /boot/linux-2.6.21.7 root=/dev/sda4 ro quiet
initrd /boot/initrd-2.6.21.7.img
Thank you.

Last edited by Alien_Hominid; 10-23-2007 at 01:56 PM.
 
Old 10-23-2007, 02:24 PM   #14
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
afaik, root(a,b) tells it where to look for the kernel images etc. etc. you should keep this the same as where you put the grub stage files etc. Thats why people keep their /boot partition different.

the root=/dev/sdaX is a parameter passed to the kernel. This is the partition that the kernel will mount in / and then do a switchroot to.

Essentially , they are totally unrelated. Grub needs to be able to read the root (a,b)/(kernel parameter) to load the kernel. So if you don't have the support for that particular partition in grub (if that partition is a XFS fs while your grub only support ext etc.), then the root(a,b) won't be able to be read.

In simple terms, just keep the root(a,b) the same everywhere as you can be sure that grub can read that 1 partition. I don't think I have seen anyone use multiple partition withing grub. Even more importantly, I am pretty sure that there is no way this could work for logical partitions where a root=/dev/sda6 could work. I think root(a,b) has to always be a primary partition and of a FS that grub can read.

Although you might want to wait for GNashley, I don't use Grub by default ... this is based upon when I used LFS for some time. And ofcourse he might be able to explain better. If you still didn't understand, please tell me what part. Also, there is a long thread in my subscriptions that goes into booting etc. very deeply, I will have to search for it , I will post the link here after sometime.
 
Old 10-23-2007, 04:38 PM   #15
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
This line is for GRUB, using the grub syntax:
root (hd0,3)

The other time you use root=/dev/sda4 that is part of the *kernel* command line.
As I mentioned you can use root (hd0,2), because that is where your installed grub is looking for things, including the menu.lst or grub.conf in your case.
 
  


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
What's up with Fedora's LVM & Grub? Voelcker Fedora 9 01-20-2008 11:48 PM
Grub.conf to add a windows partition SpartacusJones Linux - Software 4 06-16-2007 12:01 AM
manually edit FC4 grub.conf to add Ubuntu alar Linux - General 2 09-19-2006 04:45 PM
add linux booting partition / option to grub.conf powah Linux - General 2 04-04-2006 05:07 PM
syntax for grub.conf to add win98 to bootloader menu 7689mich Linux - Newbie 3 08-26-2004 12:13 AM

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

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

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