LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - General (http://www.linuxquestions.org/questions/forumdisplay.php?f=1)
-   -   Chainloading questions and about LILO and GRUB (http://www.linuxquestions.org/questions/showthread.php?t=4175437651)

vitalstrike82 11-18-2012 02:36 AM

Chainloading questions and about LILO and GRUB
 
Hi all,

firstly thanks for reading my post.

My question is about booting of 2 linux distros in my machine.
I have check that i have 2 loaders in my /dev/sda, LILO and GRUB. The commands as shown below shows that i have 2 loaders in MBR

Code:

[root@localhost rhCM]# dd if=/dev/sda bs=512 count=1 2>&1 | grep GRUB
Binary file (standard input) matches
[root@localhost rhCM]# dd if=/dev/sda bs=512 count=1 2>&1 | grep LILO
Binary file (standard input) matches

In fact i have no idea how boot loaders works, or how it should be install

I install slackware using lilo into my system first.
Recently i install rhel 6 into my system as well. It is using grub. I thought that installing the GRUB into MBR will override LILO, but i seems it is not. Please correct me if i'm wrong. SO this is my first question, does this way of installing override the LILO in MBR, or it simply never over-write, create a GRUB and there will be 2 loaders in MBR

So after googling for past 3 days, i use the method of chainloading using the rhel grub to boot slackware as well but when i try to boot slackware, it return error 13: Invalid or unsupported format.

Therefore my 2nd question is does chainloading requires both booting to be using the same loader, say GRUB for 2 linux distros.
Using different loaders will not work for for my case slackware LILO and RHEL GRUB.


Thanks for reading my post

syg00 11-18-2012 03:12 AM

Quote:

Originally Posted by vitalstrike82 (Post 4831832)
I have check that i have 2 loaders in my /dev/sda, LILO and GRUB. The commands as shown below shows that i have 2 loaders in MBR

Noooo ...
You have checked that there may have been (at least) 2 boot-loaders at some time. I'm surprised that both strings still remain, but grub only writes what it needs - it doesn't overwrite the entire area it has to write code into.
I can't comment on lilo as it's been many years since I used it.
Quote:

Recently i install rhel 6 into my system as well. It is using grub. I thought that installing the GRUB into MBR will override LILO, but i seems it is not. Please correct me if i'm wrong. SO this is my first question, does this way of installing override the LILO in MBR,
Yes.
Quote:

Therefore my 2nd question is does chainloading requires both booting to be using the same loader, say GRUB for 2 linux distros.
No. However it does require that the target was installed into the partition boot record rather than the MBR so it has the code to support this. Simple answer is to chroot into Slack and re-install lilo to the (Slack) root partition. Then chainloading from RHEL will work as you require.

vitalstrike82 11-18-2012 07:16 AM

Hi

Installing the LILO for slackware into the slackware root partition instead of the MBR really solves my problem
Current MBR is from RH GRUB and it is installed after slackware.

Thanks for the advice. :)


All times are GMT -5. The time now is 11:46 PM.