LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-15-2008, 12:39 AM   #1
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 646

Rep: Reputation: 90
Advice for Lilo setup: Dual Boot Slackware / Ubuntu


Hi,

I have managed to successfully dual boot Slackware 12 and Ubuntu Gutsy Gibbon using Lilo but I am not sure if my method is particularly sound and I was keen to see if more experienced minds could offer a better way.

I have a single HDD partitioned into 3 primary partitions:

hda1 = Slackware 12
hda2 = Swap
hda3 = Gutsy Gibbon

A little primitive but it suits me. I added hda3 to fstab as follows:

Code:
/dev/hda2        swap             swap        defaults         0   0
/dev/hda1        /                ext3        defaults         1   1
/dev/hda3        /mnt/gutsy       ext3        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
After a bit of trial and error I set lilo.conf as follows:


Code:
# LILO configuration file
# Generated by me!!
#
# LILO global section
boot = /dev/hda
prompt
timeout = 300
vga = normal
lba32
# End LILO global section
# Linux bootable partition config begins
# Default boot is Slackware 12:
image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
  initrd = /boot/initrd.gz
  root = /dev/hda1
  label = Slackware
  read-only 
# Secondary boot is Ubuntu Gutsy Gibbon:
image = /mnt/gutsy/boot/vmlinuz-2.6.22-14-generic
  initrd = /mnt/gutsy/boot/initrd.img-2.6.22-14-generic
  root = /dev/hda3
  label = Gutsy
  read-only 
# Linux bootable partition config ends
It works well enough but I was a little puzzled at the path required to the Ubuntu kernel + initrd. Is this the standard way to do this or have a got things a little skewed?

It was suggested to me that I might copy the Ubuntu kernel + initrd to my Slaclware /boot directory and adjust paths to this but I was keen to keep some distance between the 2 distros.

Thanks for any advice,

Andrew

Last edited by andrew.46; 01-15-2008 at 12:42 AM. Reason: added info
 
Old 01-15-2008, 01:02 AM   #2
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
I think I got it right but you may want wait until someone else speaks up too.

You should be able to copy (Ubuntu's)

vmlinuz-2.6.22-14-generic

and the corresponding initrd

copy them to /dev/hda1

the /boot on that partition (right where Slack's kernel and initrd are)

and remove the /mnt/gutsy

from Ubuntu kern and initrd lines in lilo.conf

don't forget to then run /sbin/lilo
--

since, in lilo.conf, you have for ubuntu /dev/hda3 as / partition

it should then load (from same place Slack loads kern and initrd) ubuntu kern and initrd and using /dev/hda3 as / for ubuntu

I think this is more common than how you had done it.

Is this correct folks?

--
Alan.
 
Old 01-15-2008, 01:33 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,201

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Having release specific entries in lilo is a pain - every update in the Ubuntu kernel requires you to update and run lilo.
Chainload to Ubuntu, and set the timeout short - or zero.
 
Old 01-15-2008, 01:52 AM   #4
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 646

Original Poster
Rep: Reputation: 90
Hi,

Thanks for your reply:

Quote:
Originally Posted by syg00 View Post
Having release specific entries in lilo is a pain - every update in the Ubuntu kernel requires you to update and run lilo.
Chainload to Ubuntu, and set the timeout short - or zero.
I have not done this before but I presume that I:

1. Install Grub to hda3 rather than the mbr
2. Add the following to lilo.conf:

Code:
other=/dev/hda3
        label= Gutsy
        table=/dev/hda
Seems fairly straighforward, I will just have to have a look at Grub and find out how to install it after the main install :-)

Andrew

[Edit] Reinstalled and placed Grub on (hd0,2) which of course in Grub-speak is hda3 on the system described.

Last edited by andrew.46; 01-18-2008 at 01:30 PM.
 
Old 01-15-2008, 01:56 AM   #5
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,748

Rep: Reputation: 160Reputation: 160
Quote:
Originally Posted by andrew.46 View Post
It works well enough but I was a little puzzled at the path required to the Ubuntu kernel + initrd. Is this the standard way to do this or have a got things a little skewed?
Dunno if it's the standard way, but I've been doing exactly that with various other distros and Slackware over the years.
 
Old 01-15-2008, 02:47 AM   #6
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
if you really wanna have fun ... in lilo.conf put slack's kernel and initrd and keep root=/dev/hda3. It should also work fine, I think!


basically, you need to tell lilo where to find the kernel, the initrd and the params (root= is a param). Thats all , the /mnt or /boot doesn't matter.

You don't need to do chainloading as ubuntu and slack are both on primary partitions. If one of the kernels was on secondary partitions you would need to chainload.
 
Old 01-17-2008, 05:35 AM   #7
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 646

Original Poster
Rep: Reputation: 90
Hi,

Sorry to double-answer you post:

Quote:
Originally Posted by syg00 View Post
Having release specific entries in lilo is a pain - every update in the Ubuntu kernel requires you to update and run lilo.
Chainload to Ubuntu, and set the timeout short - or zero.
I have followed your advice and chainloaded Ubuntu (with Grub on hda3 rather than MBR) and all is working well. Thanks for that!

Mind you I could not get alpha of Hardy to run, Gutsy was a little broken so Feisty is in place. Does not exactly fill me with confidence for release of Hardy :-)

Andrew
 
Old 01-18-2008, 03:36 AM   #8
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Quote:
Originally Posted by syg00 View Post
Having release specific entries in lilo is a pain - every update in the Ubuntu kernel requires you to update and run lilo.
Chainload to Ubuntu, and set the timeout short - or zero.
This might have something to do with the fact that Ubuntu uses Grub to boot, and their update script can easily go tap out a new menu.lst file when the kernel changes.

...and one way or another, you're having to edit lilo.conf each time you put in a new kernel, unless you're leaving yourself no way to boot the old kernel if the new one doesn't work (which is a bad idea).
 
Old 01-18-2008, 03:45 AM   #9
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
This all seems too complicated to me. My personal preference would be to install grub to the mbr, either from slackware, (there is a grub package on the installation discs) or from Ubuntu and edit the menu.lst file so that it has the options to boot slackware or ubuntu. Chainloading introduces an unnecessary extra step.
 
Old 01-18-2008, 04:21 AM   #10
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 646

Original Poster
Rep: Reputation: 90
Hi,

Read your comment with interest:

Quote:
Originally Posted by arubin View Post
This all seems too complicated to me. My personal preference would be to install grub to the mbr, either from slackware, (there is a grub package on the installation discs) or from Ubuntu and edit the menu.lst file so that it has the options to boot slackware or ubuntu. Chainloading introduces an unnecessary extra step.
But can I say (as the OP) now that I have set it that way it runs very smoothly. I prefer Lilo and it is installed neatly on the MBR booting Slackware and Ubuntu but I do not have the patience to change the kernel / initrd numbers so Grub is sitting on my small Ubuntu partition automagically changing the numbers in menu.lst for me for the seemingly endless kernel upgrades and changes. Keeps it all a little 'seperate' too :-)

I guess it is a matter of choice here and I have made mine. Logically I would use Grub for everything as you suggest but I will wait until PV makes that choice and from what I here that may be a long wait.

Andrew
 
Old 01-18-2008, 05:54 AM   #11
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Quote:
...and one way or another, you're having to edit lilo.conf each time you put in a new kernel, unless you're leaving yourself no way to boot the old kernel if the new one doesn't work (which is a bad idea).
No. You are off mark.

lilo.conf would just have other=/dev/hda2 (which I assume is the ubuntu partition).

the ubuntu partition boot sector would have Grub.

This is similar to what you do when you boot windows but with lilo/grub in MBR.

The reason why the non-chainload is especially a pain is not because Grub has a menu.lst. In that sense every slack kernel upgrade is also a pain. But if you only use lilo, then everytime you install a new kernel, you would need to go Slack install (chroot to it or reboot and run slack) and from there run lilo again (not sure whether ubuntu will allow lilo to run correctly from the chroot). IF you used grub then you would need to tell both distros to edit the same menu.lst.

Quote:
This all seems too complicated to me. My personal preference would be to install grub to the mbr, either from slackware, (there is a grub package on the installation discs) or from Ubuntu and edit the menu.lst file so that it has the options to boot slackware or ubuntu. Chainloading introduces an unnecessary extra step.
1. Chainloading doesn't slow it down by any noticeable amount.
2. What you are saying won't work if a distro is on a logical partition.
3. This is the SANE thing to do if you have >2-3 distros. I can assure you, without this it is a horrendous amount of effort to maintain sanity , esp. considering how easy it is with chainloading. And as I said, this is what you are doing when you boot windows.



Quote:
Keeps it all a little 'seperate' too
thats one very imp. advantage. I don't trust ubuntu to mess with my mbr. Esp. since I am playing around with it I wouldn't know what I am doing . (i.e , I would ask the distro with which I am comfortable with to install to the MBR and ask the new distro which I am playing with to install on its own root partition , so I can't mess up much.

Only problem with chainloading is if the filesystem of the other root partition you want to install to uses the boot sector of the partition (e.g XFS)


A possible solution is to have a seperate boot partition , ubuntu and slack would mount the same partition to /boot. Then everything works fine. But I don't like that much, as I prefer the modularity (ergo, the security) of chainloading.

Last edited by duryodhan; 01-18-2008 at 06:01 AM.
 
Old 01-18-2008, 06:06 AM   #12
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
> What you are saying won't work if a distro is on a logical partition.

In my experience it works fine with logical partitions. All I have to do is edit menu.lst. Very easy.
 
Old 01-18-2008, 08:44 PM   #13
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
afaik, lilo mbr code can't access logical partitions (cos you can't see the logical partitions from the mbr). I am pretty sure thats the case for grub too, but if you are saying that isn't so then so be it. I still stick by my advantages of chainloading.
 
Old 01-18-2008, 10:09 PM   #14
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,441

Rep: Reputation: 70
The easiest way to have a dual boot scenario with Slackware and Ubuntu is to first install Slackware and then install Ubuntu. I believe Ubuntu installs grub to the MBR by default and this is fine. Just add your Slackware entry (or entries) to menu.lst as needed. By default Ubuntu even adds these for you, though you may want more. For instance the end of my menu.lst file looks like

Code:
title           Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title           Microsoft Windows XP Professional
root            (hd0,0)
savedefault
makeactive
chainloader     +1


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb5.
title           Slackware Linux (on /dev/hdb5)
root            (hd1,4)
kernel          /boot/vmlinuz root=/dev/hdb5 ro vga=788 mp3player=off
savedefault
boot


# Slackware MP3 MODE
title           LINUX_MP3 (on /dev/hdb5)
root            (hd1,4)
kernel          /boot/vmlinuz root=/dev/hdb5 ro vga=788 single mp3player=on
savedefault
boot

#Huge kernel for Slackware
title           Slackware Linux Huge Kernel (on /dev/hdb5)
root            (hd1,4)
kernel          /boot/vmlinuz-huge root=/dev/hdb5 ro vga=788 mp3player=off
savedefault
boot
I also edited the menu.lst file so that the automagic entries are how I want them. Whenever Ubuntu updates a kernel it uses that file to automatically update ...well that file. It is easy to edit it from Slackware using a mount point as well and you don't have to run lilo.

Unless a person plans on ditching Ubuntu in this duo or forgoing kernel updates I don't understand why anyone would want to use lilo instead. Either way, it sounds like the OP is getting this working.
 
Old 01-19-2008, 12:35 AM   #15
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,748

Rep: Reputation: 160Reputation: 160
Quote:
Originally Posted by duryodhan
afaik, lilo mbr code can't access logical partitions
I don't know where you get that idea. LILO has worked with logical partitions for as long as I've been using Linux.

There were problems with older (pre 1999-ish) versions of LILO accessing kernels installed beyond the 1024th cylinder on a disk, but these were easily overcome and had nothing to do with the type of partition Linux was installed on.
Quote:
Originally Posted by shadowsnipes
# Slackware MP3 MODE
... mp3player=on
OK, i give up. WTH is "Slackware MP3 mode?"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 boot (xp pro and slackware 10.2) using lilo creeper_lin Slackware 4 06-06-2006 05:02 PM
Lilo with Ubuntu, dual boot with Mandrake ploosh Ubuntu 2 03-17-2005 06:34 PM
Advice for dual-boot sys setup gliengul Linux - Newbie 4 05-19-2004 02:24 PM
Lilo hideing partician on dual boot setup. stinehart Linux - Software 4 11-27-2003 01:50 PM
Slackware dual boot, lilo troubles... lt1derful Linux - Newbie 2 07-01-2003 08:58 PM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration