LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-26-2005, 10:59 AM   #1
viajante
LQ Newbie
 
Registered: Dec 2004
Posts: 7

Rep: Reputation: 0
Dual Booting Ubuntu With Lilo And Mandriva


I have Mandriva installed on my system. I've been happy with it for several years, but I'd like to try something debian-based, like Ubuntu.

I can install it fine. The problem is the bootloader. I don't want to blow away my Mandriva installation, so I don't want Ubuntu doing anything with the MBR. Seeing as I already have Mandriva installed, and I'm using LILO for a boot loader, I think I should be able make an entry for Ubuntu in lilo.conf and then be able to choose it at boot time.

Unfortunately, I can't figure out how to do it. If anyone could offer some advice, I'd really appreciate it, aside from blowing away the current MBR/LILO.

Here's the specifics:

/hda1 /boot ext3
/hda5 swap
/hda6 / ext3
/hda7 /home ext3
/hdb1 / ext2

I'm using hdb1 for the Ubuntu installation, and /hda5 for the swap area.

I'm guessing I need to mount the hdb1 drive, so I've got this entry in my fstab

/dev/hdb1 /mnt/debian ext2 defaults 0 0

Here's my lilo.conf, showing just the pertinent information:

boot=/dev/hda
map=/boot/map
install=menu
default="linux-nonfb"
keytable=/boot/us.klt
prompt
nowarn
timeout=50
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/hda6
initrd=/boot/initrd.img
append="noapic devfs=mount acpi=ht resume=/dev/hda5 splash=silent"
vga=788
read-only
image=/mnt/debian/vmlinuz
label="debian"
root=/dev/hdb1
initrd=/mnt/debian/initrd.img
# append="noapic devfs=mount acpi=ht splash=silent"
vga=788
read-only

The "debian" references are due to my prior attempts at installing debian, which yielded the same problem. I've not bothered to change the names of the mount points.

What am I not doing right?

-Al
 
Old 10-26-2005, 11:31 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Instead of mounting your ubuntu partition, make a directory in your /boot called "ubuntu":

# mkdir /boot/ubuntu

Check your /mnt/debian/boot directory(i.e. ubuntu's /boot) and copy over the ubuntu vmlinuz and initrd.img:

# cd /boot/ubuntu
# cp /mnt/debian/boot/vmlinuz vmlinuz
# cp /mnt/debian/boot/initrd.img initrd.img

Now, edit the "debian entry in lilo like so:

image=/boot/ubuntu/vmlinuz
label="ubuntu"
root=/dev/hdb1
initrd=/boot/ubuntu/initrd.img
# append="noapic devfs=mount acpi=ht splash=silent"
vga=788
read-only

You might want to check your ubuntu bootloader config file and see what append options are used, if any, and add the same ones to the above.

Next, save the changes to lilo.conf and run lilo to write your changes to the mbr:

# lilo -v

The ubuntu entry should be added without error. Try booting up into ubuntu.

Actually, accessing ubuntu's vmlinuz and initrd through the ubuntu mount point in mandrake should work as well, but sometimes there are problems with that approach. Copying the ubuntu vmlinuz and initrd to a directory in mandrake's /boot has worked better for me.
 
Old 10-26-2005, 01:59 PM   #3
viajante
LQ Newbie
 
Registered: Dec 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Your instructions get me in the ballpark, and I thank you for them.

However, I then run into a filesystem error during the boot process, and it seems to be the same error I've encountered in trying to use debian, ubuntu, and now kubuntu. The wording varies, but it's basically the same error -- a problem trying to set up the TTY's, and I'm guessing its because it's not pointing to the right file system due to something I'm missing in my LILO configuration.

The init script is in the / directory. In it are the following commands:

# export rootmnt=/root
# mount -n -o bind ${rootmnt}/dev /dev/.static/dev
# mount -n -o move /dev /{rootmnt}/dev

These command yield the following errors:

mount: Mounting /root/dev on /dev/.static/dev failed: No such file or directory
mount: Mounting /dev on /root/dev failed: No such file or directory
Target filesystem doesn't have /sbin/init

The latter message is the result of a test statement.

Anyway, I get dumped into Busyboy where it tells me "Can't access tty; job control turned off." In Debian it tried to load tty1 a half dozen times, timed out for 30 seconds and then tried again twice more, only to finally dump me into a kernel panic, and I was unable to trace the error.

Kubunto was kind enough to put me into Busyboy, where I could I do a pwd and see I'm in /. Then, I do a dir /root and find that it contains the files that are on /hda1/boot.

I think this is the problem, for the /root directory contains the boot files on the first hard disk (hda1) and init is not going to find any root file system in there. It should be looking on /hdb1 for them.

Am I missing something in lilo.conf?

image=/boot/ubuntu/vmlinuz-2.6.12-9-386
label="ubuntu"
root=/dev/hdb1
initrd=/boot/ubuntu/initrd.img-2.6.12-9-386
# append="noapic devfs=mount acpi=ht splash=silent"
read-only

I had to use the full filename instead of symlinks for vmliunz and initrd.img. I can't find any append parameters on the (k)ubuntu install and I've tried booting with and without them.

-Al
 
Old 10-26-2005, 03:07 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
What kernel are you using in mandrake, 2.6.x or 2.4.x?
With a 2.6 kernel you should not use "devfs=mount" so I'm wondering why you have that in your append line. I assume you got that out of your lilo.conf entry for mandrake. If anything, with a recent 2.6 kernel, you would use "devfs=nomount". Devfs is deprecated and replaced by udev in recent 2.6 kernels. You could try using "devfs=nomount" in the append line for ubuntu.

Is either hard drive a sata drive?
Also, please post your /etc/fstab for both mandrake and ubuntu. The reason here is that with sata drives, the device file changed from hdx to sdx about a year ago in the 2.6 kernel series. This can cause some complications when using lilo from a distro with an older kernel and trying to boot to a newer series 2.6 kernel. The trick there is to put the "root=/dev/hdxx" as the old kernel recognizes it and put a "root=/dev/sdxx" in the append line as the newer kernels recognize it.
 
Old 10-26-2005, 03:56 PM   #5
viajante
LQ Newbie
 
Registered: Dec 2004
Posts: 7

Original Poster
Rep: Reputation: 0
This is the kubuntu fstab. If it's glaringly different from a regular Ubuntu, let me know and I'll re-burn the Ubuntu CD and reinstall it and then re-post (makes no diff which one I use, I'm just trying to get something debian to boot):

proc /proc proc defaults 0 0
/dev/hdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda1 /media/hda1 ext3 defaults 0 2
/dev/hda6 /media/hda6 ext3 defaults 0 2
/dev/hda7 /media/hda7 ext3 defaults 0 2
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

This is the mandrake fstab:

/dev/hda6 / ext3 defaults 1 1
/dev/hda1 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hda7 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0022,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0022,iocharset=iso8859-1,sync,codepage=850 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
none /mnt/hd supermount dev=/dev/ide/host0/bus0/target1/lun0/part1,fs=ext2:vfat,--,umask=0022,iocharset=iso8859-1,kudzu,codepage=850 0 0

As you can see in the Mandrake fstab, I'm using a 2.6 kernel

Mandrake: vmlinuz-2.6.3-27mdk
Kubuntu: vmlinuz-2.6.12-9-386

I'm using IDE drives (ribbon cables). The drives used to be jumpered for cable select (CS), but to ensure the proper drive is booting I've got them set for master and slave. Based on what you said, I take it there's no need to "root=/dev/sdxx"

I'm using "devfs=mount" because that's what I've always used, so it's a holdover from the 2.4 kernels. I'll replace it with "devfs=nomount" and give it a try.

Appreciate your help, and please let me know if I should reburn the Ubuntu CD instead of continuing with Kubuntu.

Thanks!

-Al
 
Old 10-27-2005, 02:15 PM   #6
viajante
LQ Newbie
 
Registered: Dec 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Still no luck in getting this to work. :-(

Does anyone have any other ideas I can try?

-Al
 
Old 10-28-2005, 11:23 AM   #7
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
In your kubuntu installation take a look at /boot/grub/menu.lst; that's ubuntu's grub config file which is analogous to lilo.conf. See what options are there in the append line and use the same options with your ubuntu lilo.conf entry.
 
Old 10-28-2005, 09:36 PM   #8
viajante
LQ Newbie
 
Registered: Dec 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the repsonse kilgoretrout.

I decided to take the plunge and overwrite the MBR. I selected the option to formate the entire hdb drive using LVM. It told me that I could install Grub on the MBR, and that there was a Mandrake install already on hda. I told it to go ahead.

It figured out ALL of my Mandrake configurations and added Kubuntu as the default boot., and it actually booted. I was worried that it wouldn't even boot, for when I tried to do this with Debian, i got a bunch of 1 0 1 0 1 0 1 0 1 0 1 0 1 0 on the screen and had to use the Mandrake Rescue disk to recover the MBR.

First thing I did was to try to boot Mandrake. It booted fine. I rebooted into Kubuntu and it began to to finish the install process.

Looks like a really nice install, albeit its geared for newbies and is missing lots of KDE stuff that I want. Found the docs and I'll redo apt so it points to the universal sources and then I should be a happy camper.

Thanks for going the extra mile on this to try and help me out. I will look at the difference between the the grub and lilo configuration files to learn how they work [differently].

-Al
 
Old 11-06-2005, 02:39 PM   #9
jhack
LQ Newbie
 
Registered: Nov 2005
Location: orleans
Distribution: mdk 10.1, mdk 9.1
Posts: 1

Rep: Reputation: 0
for the very same reasons (as post #1) I tried to install kubuntu 5.10 on the second ide disk of my home computer currently under both mdk9.1 and mdk10.1 exactly as you did. I wanted to choose which disk to boot from ide0 or 1 and did not want to mess up with ide0 MBR. All went fine (almost !) and I got the very same error messages... This is obviously not a mandriva problem ! I just send this reply to let know whoever might be interested in mandriva/debian/ubuntu communities that this problem arises. By the way I first tried the standard install with grub on /dev/hdb beeing careful about the differences in numbering scheme of grub... but got the same error... it seems that install on the second IDE drive is the problem ? I also tried using the strategy outlined in #2 by kligoretrout, I am familiar with this technique which is my standard multiboot procedure. It failed the boot starts screen blanks then get into a wrong video mode ? some meaning less patches of colored dots here and there on a blank screen...
Cheers all

Last edited by jhack; 11-10-2005 at 01:15 AM.
 
  


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
Dual booting problem (ubuntu 5.04) fireedo Ubuntu 12 04-24-2007 12:34 PM
Dual Boot Ubuntu, Suse, Mandriva & Fedora rickbman Linux - Newbie 3 11-26-2005 04:05 PM
Dual-booting an old FC w/Ubuntu? Blackfire Linux - General 1 08-09-2005 04:06 AM
Lilo with Ubuntu, dual boot with Mandrake ploosh Ubuntu 2 03-17-2005 06:34 PM
Dual-booting Ubuntu using Grub fails tsalem Linux - Newbie 10 01-25-2005 09:47 PM

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

All times are GMT -5. The time now is 01:12 PM.

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