LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-13-2010, 02:38 AM   #1
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 874

Rep: Reputation: 113Reputation: 113
A way to play with many distros


I am always playing with new distros and trying to see what I like to use a desktop or server but I was just thinking. Having 100 partitions on one disk (figure of speach) is a joke lol. So I got this idea if I used a small spare partition and install the linux distro on it. then just mounted that partition on my main distro and moved all the files into the root directory as the name of the distro. For example

Say Ubuntu is my main distro on /dev/sda3 and I installed slackware on /dev/sda4 but moved all the files in a folder named slackware in the / of /dev/sda3. There for slackware would be on /slackware on /dev/sda3. So If I updated the fstab in slackware and my grub that boots the system I should work right?
 
Old 09-13-2010, 03:10 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
IMHO, virtual machines are the best way to play with multiple distros (something I also enjoy).

My personal preference is VMWare, but I've heard only Good Things about VBox. I definitely encourage you to try several virtualization options, and see what works best for you.
 
Old 09-13-2010, 03:25 AM   #3
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 874

Original Poster
Rep: Reputation: 113Reputation: 113
Yea but doing that means you are going to run a os inside of an os. Would that use more ram and cpu?

Okay I copies slackware to a slackware folder in / on my unbuntu installation and configured grub like this
Code:
###Slackware Start####
title Slackware 13 32bit vmlinuz-huge-smp-2.6.29.6-smp
uuid            c6eb6df7-748a-44b2-b993-1020a32f5655
kernel /slackware/boot/vmlinuz root=/dev/sda3 ro
boot

###Slackware End###
It boots till it get to the input devices and it stops at configure microsoft keyboard.

Just to add my ubuntu is installed on sda3. and my ubuntu UUID is the one list

Last edited by jmc1987; 09-13-2010 at 03:34 AM.
 
Old 09-13-2010, 08:16 AM   #4
Perceptor
Member
 
Registered: Jul 2007
Location: the Future
Distribution: Slackware
Posts: 128

Rep: Reputation: 64
You could chroot from your Ubuntu installation, check this link. But I don't think that you could boot copied Slackware directly from another distro's partition, there's a reason why each distro gets its own partition. You could use this trick though, so the chroot command is executed automatically on startup.
It would be much easier to use virtualization: VirtualBox is very easy to install and use.

Last edited by Perceptor; 09-13-2010 at 08:24 AM. Reason: Spelling
 
Old 09-13-2010, 04:22 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,658

Rep: Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257Reputation: 2257
If you have a newer system with enough ram you should use a VM. If not then you are stuck with live usb flash installs or live cd's or as you say. 100 partitions. There are some distros that can be booted from I think grub4nt straight from an iso image. Might see pendrivelinux.com for tips.
 
Old 09-13-2010, 05:21 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
If you really want to know how to boot many, many OSs then please use LQ's [SEARCH] for posts by the LQ user saikee. (The link should do the search for you, then just choose a post he has replied to).

Booting multiple everything seems to be his speciality, and he is very knowledgeable about grub and grub2. For a start, you could follow the links in his Sig.

But for booting problems, he's the man. Please be polite, and clear and concise with your question, because I expect he's quite busy
 
Old 09-13-2010, 05:25 PM   #7
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
I'm with paulsm4 and jefro...VMs are the way to go, assuming your machine has the processing power/memory for it (ideally a few gigs of RAM, and a CPU that supports hardware virtualization). I have a whole ton of VMs in VirtualBox with different Linux distros.

The only real negative about this method is that you don't really get much of a feel for the distro's actual hardware support. The VM's provided "hardware" is usually guaranteed to work with most distros with at least the default settings, so you never get to experience the headaches of dealing with hardware incompatibilities (builds character, LOL ). For example, usually if the distro's LiveCD boots to a GUI by default, it'll just set the X server resolution to the usual default of 800x600.

EDIT: @tredegar: You could have just linked straight to saikee's profile, then the OP could have looked up their posts under the "Statistics" tab.

Last edited by MrCode; 09-13-2010 at 05:31 PM.
 
Old 09-13-2010, 05:48 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
tredegar,

Thanks for the kind word. I some times do lose patience by going directly to the point rather beating around the bush.

The OP's idea serves little purpose in my view. The two distros cannot coexist in the same partition because each can use different versions of the same software. The X-window for example will have two set of files and some of which can contradict each each.

If the Slackware from sda4 is copied is such a way that it overwrites Ubuntu in sda3 then the OP ending up with one Distros in two locations. Therfore spending time to make the Slackware working in the new partition sda3 when it is perfectly healthy in sda4. That to me is hardly worth the effort.

Putting multi distros in a single partition is technically impossible unless by virtual machines. This is because while Ubuntu and Slackware belong to two different families there are distros from the same family that use the "same" or "identical" folders. Just imagine putting Kubuntu inside a Ubuntu, or a CentroOS inside a Fedora and the confusions will be difficult to cope.

Lastly certain server grade distros like the Red Hat and Mandriva systems have embedded Selinux that prevents the change of the partition after installation. Thus one only generate more trouble than convenience by putting them together.

Currently the Linux kernel does not restrict the number of partitions in a hard disk but most partitioning tools will not go beyond 63 partitions for a Msdos disk. The main stumbling block is many installers do not support installation beyond the 15th partition. Therefore is a fair bit of additional work involved if one wants a large number of distros in the same hard disk.

The new gpt disk, which support hard disk larger than 2TB, has been standardised by Linux kernel to have a maximum of 128 partitions which is also supported by MS Windows except only the 64-bit Windows versions can be booted from a gpt disk and it requires additional hardware too. Linux kernel has been factory-ready for the gpt disks long time ago. We can partition any hard disk or flash drive with the gpt scheme (maximum of 128 primaries) just as easy as the traditional Msdos scheme (4 primaries).

Last edited by saikee; 09-13-2010 at 05:52 PM.
 
Old 09-13-2010, 06:14 PM   #9
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Originally Posted by saikee View Post
tredegar,

Thanks for the kind word. I some times do lose patience by going directly to the point rather beating around the bush.
Thanks, but the only reason for my post was to make the introduction to yourself.

Your patience isn't being questioned at all

"Booting multiple distros" just isn't my thing. My job (maybe offer some sensible links) is done, and I'm out of this thread right now

Thanks for your explanatory follow-up to jmc1987, I hope he'll pick up on it.

Best wishes.
 
Old 09-13-2010, 07:20 PM   #10
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
We all learn something by participating ion the forum. Answering the OP question did make me to think back the drawbacks that I am aware of.

If we accept that playing with multiple distros has to involve the installation of everyone then the majority of work is done. The booting of distros can be simplified by telling each installer that its boot loader is not allowed into the MBR and so the only choice is inside the root partition. With this arrangement every distro can be booted by Grub's "chainloader +1" and the boot menu can be constructed even before the distros are installed. That makes every distro instantly bootable immediately installation.

Thus the normal way of multi booting is just as easy to implement.

There is one major disadvantage of having a large number of partitions, especially with the Msdos disks. The reason is a Msdos permits only 4 primary partitions and so if more are needed one of the 4 primaries must be given up to become an extended partition for creating the 5th to say 63 partitions. The basic design of a logical partition is each one carries the hard disk address of the next one further down the chain. Therefore if one boots an operating system at the 63th partition the boot loader has to interrogate the 5th to 62th partitions in order to locate the hard disk address of the 63th partition. That is reading the hard disk at least 57 times repeatedly so the booting time does suffer and you can hear the frantic activities in the hard disk too.

Once booted up the Linux runs marginally slower too but that is because the partition is among the inner most tracks and technically travelling lesser circumferentially due to the smaller track diameter. The platter runs at a constant speed and so the outermost tracks will cover more circumferential distance given the same duration so the read/write operations appear slightly faster.

Since libATA is used to dynamically detecting the block devices there is no limit on the number of partitions in a hard disk. fdisk display only the first 60 partitions but cfdisk can display 63. sfdisk can be used to create 130 partitions maximum. I have done it with a script and from memory the 130 partitions took about 2 minutes to create. Above 130 partitions one has to use Gparted.

For gpt disk only parted support it fully. Again 128 partitions can be created in minutes by a script. Linux kernel and Grub2 support gpt disks but most other partitioning tools like fdisk, cfdisk and sfdisk regard a gpt has one large partition only. 64-bit MS Windows support gpt disks.

I enclose a gpt disk (Disk 1) as seen by a 64-bit MS Windows 7. It tried to assign a drive letter until all alphabets ran out. My other disk 0 is a normal Msdos disk with 60 partitions.
Attached Thumbnails
Click image for larger version

Name:	Win7 sees 128 partitions in gpt.PNG
Views:	7
Size:	158.4 KB
ID:	4588  

Last edited by saikee; 09-13-2010 at 07:42 PM.
 
Old 09-13-2010, 07:49 PM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
I have been recently using chroot distros and the newest nfluxos versions were all made via chroot
I have 4 folders on my slackware current partition
arch
debian
slack
ubuntu

inside each folder is the distro and I use Xnest as my "monitor"
so that I can setup the desktops,etc instead of having to reboot into each
distro,etc


so, say for example I was gonna chroot into my arch setup and run Xnest to have a desktop

Code:
Xnest -ac :2 &
cd /
cp /etc/resolv.conf arch/etc/resolv.conf
mount --bind /dev/ arch/dev
mount -t proc none arch/proc
mount -t sysfs none arch/sys
mount -t devpts none arch/dev/pts
export HOME=/root
export LC_ALL=C
# (if debian/ubuntu) apt-get install --yes dbus
(with arch/slack may have to start it all manually via /etc/rc.d)
chroot arch/ dbus-uuidgen > var/lib/dbus/machine-id
# or cp -r /var/lib/dbus/machine-id /arch/var/lib/dbus/machine-id
chroot arch/
chroot arch/ env DISPLAY=":2" startfluxbox &
and do whtever you want etc
then close Xnest when done and

Code:
exit
umount -l -f arch/proc
umount -l -f arch/sys
umount arch/dev/pts
umount arch/dev

Xnest is the only difference between the reg chroot options,etc

if anyone sees an error with my stuff above or improvement please say so?

theres also arch32-light?
http://xyne.archlinux.ca/projects/arch32-light/

Last edited by linus72; 09-13-2010 at 07:59 PM.
 
Old 09-13-2010, 10:02 PM   #12
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
@ jmc1987

In your title, you said you wanted to test many distros.

I found this video on youtube and this guy installed 5 livecd distros on one partition. In the video he demonstrated on a USB stick, but it can be done on a hard drive partition as well.

http://www.youtube.com/user/metalx10.../9/MH-khdiXqYs

In this video, he demonstrated booting to the 5 distros
http://www.youtube.com/user/metalx10.../8/OmUtMGcxtDs

Last edited by dv502; 09-13-2010 at 10:08 PM.
 
Old 09-13-2010, 11:25 PM   #13
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 874

Original Poster
Rep: Reputation: 113Reputation: 113
Thank you everyone for the replies.

@saikee The reason behind this is because I am trying to get my wife to drop windows. There are several times where she has got a virus or something which always either leads to high cpu or something crashing horridly. She actually has ubuntu installed on her drive but I wanted to open her option up for choice with out having to resize and create more partitions and like you said befor have 60+ extended partitions slows boot time. So if it was possible I would do it that way so she can test out each and everyone good desktop choices and who knows she might just fall in love.

@dv502 Thanks for the video out check it out when it finishes downloading next year dialup ftw
 
Old 09-14-2010, 02:44 PM   #14
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
I found this video on youtube and this guy installed 5 livecd distros on one partition. In the video he demonstrated on a USB stick, but it can be done on a hard drive partition as well.
thats pretty easy as thats how I test any builds I make

I found using a fat32 hdd partition, with syslinux installed, and booting it via Plop bootmanager
and I had many distros booting in liveusb mode
grub2 handles my 10 hdd partitions, and I just have a entry for Plop as this PC doesnt boot off usb, so Plop does that for me

Code:
menuentry "Plop" {
       set root='(hd0,1)'
       search --no-floppy --fs-uuid --set e6adb195-3201-42f0-b6d6-f175abe1912c
       linux16 /boot/plpbt
}
what distros do you wanna boot in this way?
the ubuntu's can boot via iso off hdd using grub2 also
 
Old 09-14-2010, 03:14 PM   #15
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,496

Rep: Reputation: 103Reputation: 103
If you don't want to do virtual machines you might consider plug in hard drives. Something like http://www.directron.com/kf21itb.html Install the rack in the PC and use these trays for multiple hard drives - as cheap as hard drives are today. My old Pentium 4 machine has a rack and 4 hard drives. I am installing Ubuntu 10.04 on one at the moment to do a repartitioning test. On my i7-860 quad core I use VMWare and have half a dozen virtual machine installations available when I want to use one.

Ken
 
  


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
Hardware compatible with one or more linux distros. Will it work on all other distros necromancer44 Linux - Hardware 2 06-07-2010 07:28 PM
Slack and other minimal/lightweight distros, compared to 'bigger' distros. Josh000 Slackware 58 09-28-2009 10:02 AM
Distros, distros, distros...slight rant.. Jamesb427 Linux - Distributions 1 05-31-2007 04:10 PM
What distros do autodect/plug&play? jbrush Linux - Software 2 01-14-2006 01:45 AM
On KDE-centric distros and 686 distros, what you think? mebrelith Linux - Distributions 4 03-23-2005 02:09 PM


All times are GMT -5. The time now is 12:20 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