You are not logged in.

#1 2006-04-25 13:14:59

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

possible to multi-boot on a single partition?

/dev/hdb1 - distro1
/dev/hdb3 - distro2
/dev/hdb5 - distro2

we all know it's pretty easy to get that set up to multi-boot via grub or lilo, but what if we have a single partition?

/dev/hdb1/distro1
/dev/hdb1/distro2
/dev/hdb1/distro3

is there a way to set up grub/lilo to multi-boot and change the root directory to one of those?

i know it works, because that's how i have my system set up right now to mess around with distros....although to get it working i have to use a boot CD, mount the partition, and move all the directories to the distro i want in the root directory.

Offline

#2 2006-04-25 13:40:14

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: possible to multi-boot on a single partition?

grub and lilo won't do that on their own. you will have to work with initrd/initramfs and chroot to the right distribution, which is pretty easy for someone with enough experience.

Offline

#3 2006-04-25 13:40:21

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: possible to multi-boot on a single partition?

As far as I know, there is no way to boot multiple OSes off a single partition because the partition tables would be different and would overwrite each other.
That's where VMWare and the like step in, they create a "file system" that holds the tables self contained.

Edit: Sorry, I just noticed you say "distros". That should be possible, but I do not know how to do it.
wink

Offline

#4 2006-04-26 02:06:26

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: possible to multi-boot on a single partition?

you couldnt just put other distros in directories in one partition, most distros end up having some stuff hardcoded, and you're going to have a hard time forcing them to install to those directories.

however if you managed to install a distro to an image, then with some work in initrd/initramfs you could theoretically mount the partition, and then mount up the appropriate disk image for the distro you want.... but it wouldnt be easy, and I'd just backup and repartition if I were you.

James

Offline

#5 2006-04-26 11:53:15

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: possible to multi-boot on a single partition?

I don't see a problem in using chroot. Once you chrooted to /distro1 the programs do not care that it is a subdirectory, they don't even know.

Offline

#6 2006-04-26 13:03:35

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: possible to multi-boot on a single partition?

brain0 wrote:

I don't see a problem in using chroot. Once you chrooted to /distro1 the programs do not care that it is a subdirectory, they don't even know.

It won't be quite the same as X (and maybe other apps too) won't (AFAIK) run inside a chrooted enviroment, you will have to run multiple OSes at the same time and if you chroot, you will still be using the kernel, initscripts etc of the OS you chrooted from. And you can't always use one distro as rescue for the other; if you mess something up with the OS you chroot from the other OS won't work unless you boot up a livecd or sometihng and chroot from there...

Offline

#7 2006-04-26 13:25:13

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: possible to multi-boot on a single partition?

No, I won't. I would mount the root partition in initramfs, then chroot to /distroX and execute init. The kernel is unique for each system, only the bootloader is shared.

Offline

#8 2006-04-28 15:38:06

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: possible to multi-boot on a single partition?

See also the new BITLOCKER in Vista which frustrates dual boots:Referenced in OSNews


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB