Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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.
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.
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.
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).
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.
@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
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
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.