LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-04-2007, 01:58 PM   #1
zephyrcat
Member
 
Registered: Jun 2007
Posts: 107

Rep: Reputation: 15
How to boot many versions of linux on one HD?


Hi!

I have an old dell system (p4 3-4ish years old) that I would like to use to install various linux distros. I understand, however, that I need a boot manager to choose which partition I want to boot each time I start up. When I tried to find boot managers though I was confused, because some said they could support a certain number of OSs and others did not specify. Do I need a boot manager for what I am doing and if so what boot manager should I use.

Note: I would like to be able to have 15-20 partitions.

Thanks!
 
Old 06-04-2007, 02:04 PM   #2
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
you should use grub. it will come with most distros and you will usually be able to install it during the OS install.
 
Old 06-04-2007, 02:10 PM   #3
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
What I typically do is to make a separate /boot partition (make sure it's a primary partition) for the first linux I install (that way if I nuke the first distro, I can still boot all the others). Install the first bootloader (which comes with each linux distro) to the MBR (master boot record). Anyway, what I do is then install each of the other bootloaders (grub or lilo, I prefer grub) into the / partition for that distro NOT in the MBR. Then I use the first grub to boot the second distro's grub/lilo.

So here's summary:
1) Install first linux distro with grub into the MBR and a separate /boot partition.
2) Install second linux distro with grub/lilo in the / partition for that distro.
3) Boot first linux and edit /boot/grub/menu.lst to chainload second linux's grub/lilo.
4) repeat for each distro

Also, for partitioning, I like to use GParted. It has a nice live CD you can split your drive up ahead of time. It's also included on many other live CD's.

Here's a link to booting tips for grub. There's a section on chainloading.
 
Old 06-04-2007, 02:27 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
I'm afraid you won't be able to use more than 15 partitions before long. Already Linux can't recognize more than 14 usable partitions on a SATA drive and the most recent distributions are now imposing the same limit on PATA drives.

Installing multiple distros on a single disk should be easy enough. I always use GRUB and do it like this: install one distro, let it install GRUB. Then I copy the menu.lst file from /boot/GRUB, after which I install a second distro and again I let it install GRUB; this obviously overwrites the first one. If the newer GRUB didn't pick up the first distro, no problem, I can add it manually because I did copy out the data from my original menu.lst.
 
Old 06-04-2007, 02:29 PM   #5
zephyrcat
Member
 
Registered: Jun 2007
Posts: 107

Original Poster
Rep: Reputation: 15
Thanks so much for the responses.

So this is what I would do for the first distro (Ubuntu 7.04) I am installing?
1. Make a primary partition with /boot set (don't think "set" is the right word, but I know how to do this).
2. Later in the installer I will have a choice to include Grub (is that right?) and I install it to MBR

Second distro:
1. Install it in / partition and modify that file (will that be easy or is there a guide to doing that?)

Is this right?

Thank you very much!
 
Old 06-04-2007, 02:34 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Oooh, it seems like you're in for a carnage. Every distro has its own /boot, /, /home etc. partitions - if you install a second distro over the / partition of the first one, you simply kill it.

If you're new to this, you may want to download and burn the Gparted LiveCd first - it allows laying out partitions before you start installing any distros - it tends to make things a lot simpler.
 
Old 06-04-2007, 02:41 PM   #7
zephyrcat
Member
 
Registered: Jun 2007
Posts: 107

Original Poster
Rep: Reputation: 15
Got it. I will download that and make the partitions there. What type should I make them and how many can I make?

Thanks!
 
Old 06-04-2007, 02:56 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
There is a howto for booting 145 systems in my signature.

I recommend one Linux per partition. In my case I wrote the menu.lst before installing any of the system. I hosted Grub in a data-only partition.

Yes the 2.6.20 kernel and later have abandoned the Pata disk convention and all hard disk/pen drives etc will not be able to have more than 15 partitions.

The major and minor numbers of a disk reference has 256 devices names. SCSI/Sata/USB disks can be daisy-chained to 16 disks so each have 16 devices name. Taking the whole disk itself like sda away and you are left with 15 partitions. As one of the primaries must be converted to an extended partition there could be a amximum of 14 systems in a future hard disk. This effectively means we could only have 3 primies, 1 extended partition (which is used to define the boundaries of the first and the last logical partitions) and 11 logical partitions.

I believe if one has to it is possible to install 44 systems in a Sata disk. So the race is on to see who gets there first.

The trick is you create 11 logical partition in the sda1, hide it, then the next 11 partition in sda2, hide it again and repeat the same procedure for sda3 and sda4. When you need to run any of them you unhide the relevant extended partition. To Linux when an extended partition is hidden it will be treated as foreign. This technique requires Grub to be host elsewhere.
 
Old 06-04-2007, 02:58 PM   #9
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by zephyrcat
Second distro:
1. Install it in / partition and modify that file (will that be easy or is there a guide to doing that?
Here's an example
Code:
/dev/hda1 -- /boot (Ubuntu 7.04, install Grub to MBR)
/dev/hda2 -- / (Ubuntu 7.04)
/dev/hda3 -- / (Debian 4.0, install Grub to this partition, NOT the MBR)
/dev/hda4 -- logical partition
/dev/hda5 -- / (PC LinuxOS, install Grub to this partition, NOT the MBR)
etc
After each install, boot Ubuntu and then do sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.0 to make a backup (increment the 0 each time so you always have a working backup). Then do sudo gedit /boot/grub/menu.lst to edit the file. At the bottom add something like
Code:
title Debian Etch on hda3
rootnoverify (hd0,2)
chainloader +1
Then save and exit.

Then when you reboot, you'll get the Ubuntu grub menu with Debian Etch on it. Then when you select Debian here, it will boot to the Grub you installed with Debian and you select your kernel from that list and let it boot. By doing this, each distro's Grub will only have to handle the kernel's for that distro and won't even be aware other distro's are installed. That makes it easy to remove a distro if you don't like it. You just reinstall over the partition and then modify the "title" line of the Ubuntu grub menu.lst.
 
Old 06-04-2007, 03:18 PM   #10
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Three primary partitions; the first one for swap, which is twice the size of your RAM & needs to beformatted as Linux-swap. All the other partitions (primary and logical) will contain distributions. The fourth one should be an extended partition - you can then create logical partitions inside.

Partitions will be numbered; do not go higher than 15 - beyond that, they may become invisible to Linux for reasons I expained before.

As for the size of those partitions, those are up to you. If you want to maximize the number of distributions, you can reserve one partition per distribution and use a single partition to store your personal data - which can be accessed from any of distribution - pretty convenient.
So : fifteen minus one swap minus one data partition minus one extended partition (this is only a container for the logical partitions but it counts too) = a maximum of 12. Whether you really need that many is up to you - you can simply make a handful of partitions, then create a data partition and leave free space after that; then you can always add more partitions in the unallocated space whenever the need arises (a good idea - having plenty of empty partitions just sitting there isn't everything either).
Each partition (other than swap and data) should be anything from 7 to 12GB, depending on how much you want to install; 7 is for a basic system (already quite rich), 12 for a very complete one (not to say "bloated"). You can make a variety of sizes if you want to: some 10GB, some smaller, some larger. The data partition can be as large as you want it to be. Or you can take it step by step: create partitions for only one system, install a distro, then use Gparted to make more when you want to install another distro.
Each partition needs to be formatted as well. Swap as linux-swap, the rest as either ext3 or xfs. I prefer xfs (is somewhat faster) but it is not supported by all distros (Fedora and CentOS come to mind); ext3 is supported by all.

Of course, there are alternative layouts to installing everything within a single partition (in which case, during install, you select only one partition and select "/" as its mount point); you could also make separate partitions and mount them under "/home" (not really needed if you already have a shared data partition - just a waste of partitions) as well as other ones ("var", "tmp" etc) - but if you want to use as few partitions as possible, that too would be a waste.

Leave the data partition alone during install; the best thing is to add manually when everything is set up.
 
Old 06-04-2007, 03:37 PM   #11
zephyrcat
Member
 
Registered: Jun 2007
Posts: 107

Original Poster
Rep: Reputation: 15
Tryping Gparted now...

Ok... I burned the Gparted Cd and I am headed over to put it in right now. I post again when I have an idea what I am going to do.

Thanks for all the help, I will probley need more of it. :-)
 
Old 06-04-2007, 03:41 PM   #12
zephyrcat
Member
 
Registered: Jun 2007
Posts: 107

Original Poster
Rep: Reputation: 15
I chose the first option (something auto-configuration) so I hope I chose the right thing.
 
Old 06-04-2007, 03:44 PM   #13
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
One last remark; if you choose xfs for your /partition, you may be limited to Lilo as a bootloader - many distributions refuse to install GRUB when the your /boot partition is on xfs. Not that it matters if you have no preference for either Grub or Lilo.
 
Old 06-04-2007, 03:48 PM   #14
zephyrcat
Member
 
Registered: Jun 2007
Posts: 107

Original Poster
Rep: Reputation: 15
Not have a lot of luck...

It could not start X so it told me to use Forcevideo. I tried that with vesa and 1024x768 it returned two cryptic errors. I have intel integrated graphics, if that helps. I am going to try a different mode on startup.

(Also, if I mess something up it does not matter, because there is nothing on this drive.)

EDIT: The less cryptic of the two is:

Fatal server error:
no screens found

Above that it says something about screens found, but none have a usable configuration.

Last edited by zephyrcat; 06-04-2007 at 03:53 PM.
 
Old 06-04-2007, 03:51 PM   #15
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by zephyrcat
I tried that with vesa and 1024x768 it returned two cryptic errors. I have intel integrated graphics, if that helps.
The cryptic errors are important to helping us diagnose...
 
  


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
Can't boot!! Kernel Panics!! Two machines, several versions!!! WHAT AM I DOING WRONG? Czar420 Linux - Newbie 11 05-18-2007 02:03 PM
How to lilo: 2 mdk versions with dual boot? ronaldv Mandriva 4 12-06-2005 11:56 AM
Multi Boot (Red Hat 9 and 2 versions of Win XP) Slindner Linux - Newbie 1 08-30-2004 04:43 AM
Unable boot multiple kernel versions off of Redhat machine liangjz Linux - Newbie 3 03-16-2004 11:01 AM
Boot loader lilo for two Redhat versions emmanuelmathew Linux - Newbie 1 08-16-2003 06:44 AM


All times are GMT -5. The time now is 12:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration