LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Update Slackware 14 LILO (http://www.linuxquestions.org/questions/slackware-14/update-slackware-14-lilo-4175437524/)

vitalstrike82 11-17-2012 12:06 AM

Update Slackware 14 LILO
 
Hi all,

I like to dual boot 2 versions of distros in my machine.
I have already install Slackware 14 into my system.
2nd comes into my machine is RHEL 6.

I have install the RHEL 6 into system without any bootloader.

I want to boot my RHEL from LILO.
Is there anyway i can automatically update LILO or have to do it manually?
If manually, how do i do it? thanks...

kikinovak 11-17-2012 12:23 AM

Quote:

Originally Posted by vitalstrike82 (Post 4831176)
Hi all,

I want to boot my RHEL from LILO.
Is there anyway i can automatically update LILO or have to do it manually?
If manually, how do i do it? thanks...

You have to do it manually. It's quite simple.

Boot your Slackware system.

Create a mountpoint for your RHEL installation, for example:

Code:

# mkdir /mnt/rhel
If your RHEL install has a separate /boot partition, mount it on /mnt/rhel. Otherwise, just mount the RHEL root partition:

Code:

# mount /dev/sdXY /mnt/rhel
Change into the /mnt/rhel directory and look for the exact path to your kernel and the corresponding initrd.

Now edit /etc/lilo.conf and add a stanza for RHEL, which would look approximately like this:

Code:

image = /boot/vmlinuz-generic-3.2.29
  initrd = /boot/initrd.gz
  root = /dev/sda3
  label = Slackware
  read-only
image = /mnt/rhel/path/to/rhel-kernel
  initrd = /mnt/rhel/path/to/rhel-initrd
  root = /dev/sdXY -> the root partition of your RHEL installation
  label = RHEL
  read-only

Commit your changes:

Code:

# lilo
And that's it.

Cheers,

Niki

vitalstrike82 11-17-2012 12:39 AM

Hi Thanks for the information
In that case, is it i have to manually always mount the redhat partition to /mnt/rhel?

If yes, where can i set to mount the redhat partition automatically when ever i start the machine?

kikinovak 11-17-2012 01:08 AM

Quote:

Originally Posted by vitalstrike82 (Post 4831184)
Hi Thanks for the information
In that case, is it i have to manually always mount the redhat partition to /mnt/rhel?

Short answer: no you don't. Your Redhat partition only needs to be mounted while you invoke the 'lilo' command, so LILO can actually find your RHEL kernel and initrd. So manual mounting will do.

Now go try it and see if it works. Then I'll explain the rest (what to do when there's a kernel update) later.

vitalstrike82 11-17-2012 02:28 AM

Hi,
I have tried to update lilo manually. It is not able to boot the rhel.

This is my partion profiles where sda2 is slackware root and sda4 is the rhel root:
Code:

/dev/sda4


  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              63    4000184    2000061  82  Linux swap
/dev/sda2  *    4000185    40001849    18000832+  83  Linux
/dev/sda3        40001850  103268351    31633251  83  Linux
/dev/sda4      103268352  156301311    26516480  83  Linux
root@chongming:/mnt/rhel/boot#

Below is what i have set in the lilo.conf file
Code:

# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda2
  label = Linux
  read-only
image = /mnt/rhel/boot/vmlinuz-2.6.32-71.el6.i686
initrd = /mnt/rhel/boot/initramfs-2.6.32-71.el6.i686.img
root = /dev/sda4
label = RHEL
read-only
# Linux bootable partition config ends

I have tried using the liloconfig to set the lilo automatically. It does not detect my rhel partition.

Thanks for spending time look at my problem

kikinovak 11-17-2012 02:56 AM

Two things.

1. I'm not sure about this, but try to write your RHEL-related stanza like the first one, with indented lines.

2. With this configuration, when you invoke 'lilo', what does it actually say? Do you get any error messages?

guyUnix 11-17-2012 03:16 AM

Quote:

Originally Posted by kikinovak (Post 4831229)
Two things.

1. I'm not sure about this, but try to write your RHEL-related stanza like the first one, with indented lines.

2. With this configuration, when you invoke 'lilo', what does it actually say? Do you get any error messages?

Hi, may i know what is the RHEL-related stanza you are refering to? apologies for my poor understanding of english

markush 11-17-2012 03:22 AM

I have tried such a setup as kikinovak described several times (but some years ago) when I had multiboot with Slackware, Arch and Gentoo. It never worked.

I would either chainload RedHat, this means install lilo on RedHat but on the Superblock of the partition (here the line of lilo.conf in RedHat)
Code:

boot = /dev/sda4
and in Slackware's lilo.conf
Code:

other = /dev/sda4
  label = RedHat
  table = /dev/sda

But I don't know if RedHat supports lilo. Another way would be to install Grub on RedHat and boot both Slackware and Redhat with Grub (which can boot multiple systems).

Third way is to create a boot-directory for both Slackware and RedHat and put there both kernels.

Markus

vitalstrike82 11-17-2012 01:43 PM

Hi Markush,

thanks for the helpful information.

If setting up LILO requires so much issues, is it possible if i install rhel hat again and try to install its boot loader into my current MBR which contains LILO?

Will it override the current loader in the MBR or create another MBR in the hard disk?

I'm quite new to this MBR, so do pardon me asking these basic questions.

Lastly if you can see my partitions, i'm currently having the slackware root as bootable. The rhel root /dev/sda4 is not a bootable disk. Will this create any problems?

Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              63    4000184    2000061  82  Linux swap
/dev/sda2  *    4000185    40001849    18000832+  83  Linux
/dev/sda3        40001850  103268351    31633251  83  Linux
/dev/sda4      103268352  156301311    26516480  83  Linux
root@chongming:/mnt/rhel/boot#


markush 11-17-2012 01:51 PM

In my opinion the bootable flag is unimportant. I have not set it within the last few years, no issues.

As of the bootloader: the last bootloader which is installed overwrites the earlier settings. You'll only have to install Grub on RedHat (if it isn't already installed) and configure it. Please note that there are differences between the older and newer versions of Grub, but I can't help with this. Read the manpage.

Markus

vitalstrike82 11-17-2012 02:34 PM

Thanks markush.
You mentioned install the grub on rhel.

based on your experience, should it be install at the current MBR or in the root dir of rhel, /dev/sda4?

Thanks

markush 11-17-2012 02:44 PM

When you want Grub to boot both, Slackware and Rhel, you'll have to install it in the MBR of /dev/sda

Markus


All times are GMT -5. The time now is 02:55 AM.