LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How do i add slack to GRUB? (https://www.linuxquestions.org/questions/slackware-14/how-do-i-add-slack-to-grub-120354/)

Tyir 11-26-2003 11:51 PM

How do i add slack to GRUB?
 
Hi,

So I got slackware installed, hurrah!
I skipped the LIO install since i figured I could just use my GRUB thats in my /boot in my RH9 install
So I restarted, GRUB came up and i booted into Rh

Now, i need to add slackware to the /etc/grub.conf file
This is what I have so far...
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/hdb2
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-20.9)
        root (hd1,0)
        kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdc=ide-scsi
        initrd /initrd-2.4.20-20.9.img
title Red Hat Linux (2.4.20-8)
        root (hd1,0)
        kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
        initrd /initrd-2.4.20-8.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
title Slackware 9.1
        root(hd0,3)


The new / partition is the 4th partition in the 1st hardrive, so
hence the root(hd0,3)
Now i need to figure out where the kernel is installed, but I couldn't figure it out.
The RH install gets it from /boot

But i don't know where to go now.
I did a basic install, with a / partition, a /home partitoin and a swap

Thanks

Note:
I did try to get this on my own, i tried reading the GRUB documentation but couldn't figure it out :(
I foudn 2 simialr threads
http://linuxquestions.org/questions/...003/07/1/70130
and
http://www.linuxquestions.org/questi...003/02/3/45487

both were relativly unresolved :P

Tyir 11-27-2003 08:12 AM

Sorry...anyone?

If i can't get this, should i install LILO?
And I'm no super clear how this works, woudl I install in in the /boot partitoin of my RH install?

Scruff 11-27-2003 08:20 AM

Hmm. After using LILO all my linux time, I don't have a clue about Grub. I looked over the code you posted, and while I have some ideas I don't want to get you jammed up on my mistake.

You could install LILO. A lot more people use it and could probably walk you through that. I would install it to the MBR. I know, it says dangerous but I have always done it that way and usually see it recommended that way. Here is an example from my lilo.conf file (located in slack @ /etc ): You can see its a little easier to understand:

Code:

# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hda3
  label = Slackware
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = /boot/vmlinuz.old
  root = /dev/hda3
  label = Slack.old
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# DOS bootable partition config begins
other = /dev/hda1
  label = WinXP
  table = /dev/hda
# DOS bootable partition config ends

Once you got it installed, you would then add RedHat to your lilo.conf. You would just need to know which partition its on, and the specific kernel name and location.

aaa 11-27-2003 08:42 AM

Add this line to GRUB:
kernel /vmlinuz [options go here]

or:

kernel /boot/vmlinuz [options]

Browse in your Slack hd from RH to make sure those files exist.

Tyir 11-27-2003 02:27 PM

Ok, i added /mnt/slackmount to my RH fstab

SO if i go to /mnt/slackmount/boot
There is:
Code:

15:21:31 - /mnt/slackmount/boot> ls
config            System.map            vmlinuz
config-ide-2.4.22  System.map-ide-2.4.22  vmlinuz-ide-2.4.22
 15:21:32 - /mnt/slackmount/boot>

So I went back to grub.conf
And added
Code:

title Slackware9.1
        root(hd0,3)
        kernel /vmlinuz-ide-2.4.22

Rebooted, and when I selected slack, said file now found

At the top of grub.conf, it says this is relative to /boot
So obviously this is the /boot partition from the other drive....
So now I was thinking, and there seems to be 2 possiblities...

1)I copy the files from /mnt/slackmount/boot to /boot
So there will be the new kernel for slack at the same place as my older kernel for RH

2)
Instead of what i wrote, mabye to to get it indirectly, something like...
kernel ../mnt/slackmount/boot/vmlinuz-ide-2.4.22

But the second one seems complicated

I'm really not sure about this :(
Can i do 1? Are you allowed ot just move the files over there?

Thanks

DavidPhillips 11-27-2003 05:03 PM

That's what I do all the time, I use only one /boot partition.

You would copy the files over, edit your /etc/fstab to point to /boot just as it is in thr RH fstab


Or you can leave it as is and add the path to the lines
title Slackware 9.1
root(hd0,3)
kernel /boot/vmlinuz-2.4.???? ro root=/dev/hda4 hdc=ide-scsi
initrd /boot/initrd-2.4.????.img

Tyir 11-27-2003 06:18 PM

thanks
I ended up copying the files


but there wasn't an image file, or whatever..
So i left that line out, and i was able to boot..





Now i gotta figure out how to set everything up :)

Tyir 11-27-2003 06:50 PM

Allright....this is being typed up on slack! :)


Final question...
I added the line
Code:

LABEL=/boot      /boot            ext3        defaults        1  2
into my new fstab

do i need this?

DavidPhillips 11-27-2003 10:24 PM

I guess you copied the files in slack's /boot to the /boot partition? You don't actually need the fstab entry there.

Without it the /boot partition will not mount at boot and to mount it you would need to do it manually. In case you want to install a new kernel or something.

It's probably best to leave it in.


All times are GMT -5. The time now is 09:39 AM.