View previous topic :: View next topic |
Author |
Message |
generic_genus n00b
Joined: 26 Apr 2005 Posts: 9
|
Posted: Sun Jul 09, 2006 3:49 pm Post subject: Dual Boot Gentoo & Ubuntu |
|
|
Hey, to help educate my little brother about linux I installed ubuntu-6.06 on a spare partition as I didn't want him messing with my gentoo installation and wanted him to install a distribution for himself. The installation went fine (atleast the files were placed on the partition) however for whatever reason ubuntu didn't install a boot manager which I thought would be no problem.
I added Ubuntu to lilo.conf, ran lilo which reported no problems, then rebooted and ubuntu failed to boot (gentoo still boots fine). It appears the initrd boots giving me a shell but complains about the target filesystem not having /sbin/initctl and not being able to mount /proc /dev etc... so my question is how do I configure lilo from gentoo to boot both distros?
The contents of my lilo.conf:
Code: |
boot = /dev/hdb
delay = 80
password = ****
image = /boot/vmlinuz
root = /dev/hdb3
label = gentoo
read-only
image = /mnt/ubuntu/vmlinuz
root = /dev/hdb1
initrd = /mnt/ubuntu/initrd.img
label = ubuntu
read-only
|
This is the first time I've tried to dual-boot two linux distros, so I'm guessing there is a gap in my knowledge that I can't find using google, so hopefully someone out there with have a simple answer.
thanks in advance |
|
Back to top |
|
|
St. Joe Apprentice
Joined: 13 Apr 2005 Posts: 242 Location: USA
|
Posted: Sun Jul 09, 2006 4:08 pm Post subject: Re: Dual Boot Gentoo & Ubuntu |
|
|
generic_genus wrote: |
The contents of my lilo.conf:
Code: |
boot = /dev/hdb
delay = 80
password = ****
image = /boot/vmlinuz
root = /dev/hdb3
label = gentoo
read-only
image = /mnt/ubuntu/vmlinuz
root = /dev/hdb1
initrd = /mnt/ubuntu/initrd.img
label = ubuntu
read-only
|
|
I don't think you need to include the /mnt prefix since you've already defined root=.
Try something like this:
Code: |
image=/vmlinuz
root=/dev/hdb1
initrd=/initrd.img
label=Ubuntu
read-only
|
_________________ For every hammer there is a nail.
For every nail there is a thumb. |
|
Back to top |
|
|
welp Retired Dev
Joined: 24 Sep 2005 Posts: 103 Location: Ipswich, UK
|
Posted: Sun Jul 09, 2006 4:13 pm Post subject: |
|
|
No offence, but I would suggest that you use GRUB rather than lilo. If you use GRUB, you can follow the howto at: http://gentoo-wiki.com/HOWTO_Dual_boot _________________ Gentoo/BSD, Gentoo/Alt AT and Bugday lead
AMD64, Xfce, Sunrise, www-servers, net-irc, lang-misc, Artwork
If you find a bug, submit it! Bugzilla |
|
Back to top |
|
|
generic_genus n00b
Joined: 26 Apr 2005 Posts: 9
|
Posted: Sun Jul 09, 2006 8:48 pm Post subject: |
|
|
The /mnt/ubuntu is needed (lilo complains cannot find file if not used), the first configuration attempt used your suggested config but didn't work so I added the /mnt/ubuntu to solve this and lilo doesn't complain.
I've considered using grub but I've always used lilo since I first installed linux 5 years ago and until now I've never really had a reason to change. Why would I be offended by you making a sensible suggestion? However, since I have lilo installed I would prefer a lilo solution. Ofcourse if there is no known lilo solution I will change to grub, despite the fact I find the config file syntax illogical (though thats probably just because it is unfamiliar). Also the howto you pointed to and 99% of those available are generally for a linux system and an "other" OS e.g. windows/BSD
I'm thinking of creating a shared boot partition for both gentoo and ubuntu (i.e. place both gentoo kernels and ubuntu kernels on the same seperate partition), however I'd rather not re-install. I suppose I could just use the same kernel, but I want the two distros to be as independent as possible since ubuntu is for my 13 year old brother to break and hopefully learn something.
Another point is the howto here http://www-128.ibm.com/developerworks/linux/library/l-dboot.html seems to use a config very similar to mine but uses two identical distros, so is my problem related to some kind of difference between ubuntu & gentoo init?
So in summary:
*Anyone get any other ideas about what I'm doing wrong?
*Will this definitely work with grub? |
|
Back to top |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Sun Jul 09, 2006 8:55 pm Post subject: |
|
|
lilo does not complain because it can find the kernel image, but when booting the image isn't in /mnt/ubuntu anymore and that will give you problems, but I don't know how to do it except when you use a separate /boot partition with the kernel images for both gentoo and ubuntu on it. BTW ubuntu did overwrite my mbr without asking, so are you sure the install finished? |
|
Back to top |
|
|
generic_genus n00b
Joined: 26 Apr 2005 Posts: 9
|
Posted: Sun Jul 09, 2006 9:25 pm Post subject: |
|
|
It said it was finished so all I can say is yes, booting the ubuntu install using the kernel off the install CD works fine, so I'd say it was installed fine. The auto-generated menu.lst seems to be in order (and seems to have detected my gentoo install aswell, which is nice) however doing "grub-install /dev/hdb" does not work. Is this correct command to run? as I'm ignorant of all things grub, I'm getting the feeling this may be beacuse I boot from the second physical drive.
Also as far as I understood lilo, it does not deal with files at boot it usese a physical address, so the mount point is irrelevant at boot (since no partitions are mounted). I believed the big reason for using grub was that it does refer to files at boot, or am I wrong?
Last edited by generic_genus on Mon Jul 10, 2006 10:17 am; edited 1 time in total |
|
Back to top |
|
|
idella4 Retired Dev
Joined: 09 Jun 2006 Posts: 1600 Location: Australia, Perth
|
Posted: Mon Jul 10, 2006 8:34 am Post subject: |
|
|
generic_genius,
yes, booting off the second drive does cause 'issues'. That's where it gets all tangled.
I've tried it a few times and consistently get a grub error at boot.
Rule of thumb is to boot off the first drive, then everything 'behaves' normally.
It's something I've not done yet, but if you're in that position, why don't you try treating b as a when
using grub-install /dev/...
As a rule I use grub-install and cite a home partition rather than an mbr of a drive.
e.g. grub-install /dev/hdb2 or whatever is the home partition.
once you get a working grub, it's just a matter of adding valid entries to /boot/grub/menu.lst of the selected hosting linux system. _________________ idella4@aus |
|
Back to top |
|
|
generic_genus n00b
Joined: 26 Apr 2005 Posts: 9
|
Posted: Mon Jul 10, 2006 10:11 am Post subject: |
|
|
Everything is working , ubuntu had kindly placed grub on the first disk all correctly configured, just my bios was set to boot off the second. So to dual-boot two linux distros you have to place the boot manager on the first physical HDD (/dev/hda), just to clarify for anybody reading this in the future with a similar partition scheme to me.
And idella your second suggestion of placing grub on /dev/hdb2 or some other partition doesn't work.
In hindsight this is the first thing I should have done, but simple solutions aren't always the most obvious. Oh well, thanks for your help everybody, it's appreciated. |
|
Back to top |
|
|
idella4 Retired Dev
Joined: 09 Jun 2006 Posts: 1600 Location: Australia, Perth
|
Posted: Tue Jul 11, 2006 6:10 pm Post subject: |
|
|
that doesn't surprise me. There are so many factors that influence. All just part of learning and figuring it all out. _________________ idella4@aus |
|
Back to top |
|
|
|