[solved] Multi-Boot Multiple Linux Distro's

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

[solved] Multi-Boot Multiple Linux Distro's

Postby gr1zzly » Thu Aug 09, 2012 12:00 pm

Hey LXFF,

I'm new to multi-boot systems and I need some help and advice on 'how to...' and on deciding the best way to configure my system(s).

Please bear with me as I have quite a few questions...

Re: HDD partitions >>

1. Should '/boot' be on the first primary partition (e.g. sda1 = 100MB ext4 /boot)?
-- is this different to the MBR?

2. Do all the distro's I install share the /boot partition?
-- If so how do I set it up so it doesn't get overwritten by each one in turn because otherwise it ends up that I can only boot the last distro I install?

3. Can all the distro's safely share the same swap space partition? (I'm aware of the risk when hibernating one dist then booting another)

My thoughts/proposed partition config is as follows:

Code: Select all
Drive    |    Mount    |    Format    |    Size (MB)   
----------------------------------------------------------
sda1           /boot         ext4           100

sda2
   | --        swap        linux swap     4096 (4GiB)
   |
   | --        /home         ext4         51,200 (50GiB)
   |
   | --        /var          ext4         10,240 (10GiB)

sda3
   | --        /Mint13       ext4         20,480 (20GiB)
   |
   | --        /Fedora17      ''              ''
   |
   | --        /Mageia2       ''              ''
   |
   | --        /SuSE12        ''              ''
   |
   | --        ...etc...




4. Is this a viable structure?

5. How much space should I give to /var?

6. How much space should I give to each distro?

My thought was have my swap, /home and /var closest to the spindle (I'm using a mechanical HDD not SSD!) then have my distro's each with their own root partition.

One final question I'd like to know is...

7. is it possible to have a virtual machine (i.e. using VirtualBox) run a 'real' installed distro from a HDD partition as a VM inside one of the other distro's?

I realise that I could just install one 'base' distro then install all of the others as purely virtual machines. But I'd want to be able to keep their VHD's on a separate partition so as not to fill my /home drive with huge files. Also my reason for NOT using VM's from the off is performance. My CPU does not support native virtualisation technologies so I'm worried that if I ran all of my secondary distro's as VM's then they wouldn't perform as well.

Thanks so much for sticking with me and for any help/advice anyone is able to offer.


Kindest regards,

Chris
Last edited by gr1zzly on Thu Aug 09, 2012 6:37 pm, edited 1 time in total.
What would Gordon Freeman do?
gr1zzly
 
Posts: 11
Joined: Mon Apr 09, 2012 12:27 pm
Location: United Kingdom

Postby nelz » Thu Aug 09, 2012 1:08 pm

You can share a /boot but it is not advisable, you need to be carefgul about kernel naming. Sharing swap is fine. Sharing /var is a definite no-no.

I'd go for a shared swap, a root partition for each distro and a shared home partition, but with separate home directories in that partition. None of these need to be on a primary partition, GRUB is quite happy to boot from a logical partition.

You can run a VM from a real partition, but sharing that with a native install is tricky, because the two environments have different "hardware".
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8550
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby gr1zzly » Thu Aug 09, 2012 2:15 pm

@nelz Thanks that clears up some of my confusion, but allow me to follow up if I may...

The separate /var partition was intended to be for my 'base' distro, so that it was closer to the disk spindle (but not shared). Each other distro would then have it's own /var under it's root partition. **

** In hind sight this may be best to do for all distros, including my 'base'.

When sharing a /home I understand that issues can arise when having different configuration settings for the same applications (or different versions of an application) on different distro's.

Having these in separate sub-folders as you suggest would circumvent this problem, but how do I go about configuring them as you suggest?

Do I just need to specify a different username for each distro so they create a different folder in /home?
-- e.g. /home/mintuser || /home/fedorauser etc.

Lastly, regarding the /boot partitions...

- (just to clarify) Do the /boot partitions have to be outside of the distro's root folder(s)?

- If each distro has it's own boot partition how do I then set up a single boot loader menu with options for all of the distros?


Many thanks.

Chris
What would Gordon Freeman do?
gr1zzly
 
Posts: 11
Joined: Mon Apr 09, 2012 12:27 pm
Location: United Kingdom

Postby nelz » Thu Aug 09, 2012 4:15 pm

You can't use a separate /var for each distro, you'd run out of partitions (the limit is 16). Distance from spindle is not relevant these days, but if anything the outer part of the disk is faster. Large caches make this meaningless, especially for /var which is mainly small files.

Yes to the home directories. You can either use different user names or use the same username but a different folder for each distro (to home directory does not have to be /home/user. I use the same username then make the home directory /home/user-distro.

As far as /boot is concerned, the simplest approach is to not use a separate /boot, leave it in the root filesystem, so each distro needs only one partitions, plus the shared swap and /home.

The only time you need a separate /boot is if / is on something special like an LVM volume or encrypted, otherwise leave /boot in /. With Fedora, this means selecting the install option to not use LVM, as it defaults to LVM.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8550
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby gr1zzly » Thu Aug 09, 2012 5:18 pm

Thanks @nelz that's great.

Sounds as thought the simplest solution is to pretty much just install each distro entirely in it's own partition (barring shared swap and home).

Now I just need to back up my data and re-partition.
Wish me luck....

:D
What would Gordon Freeman do?
gr1zzly
 
Posts: 11
Joined: Mon Apr 09, 2012 12:27 pm
Location: United Kingdom

Postby ajgreeny » Thu Aug 09, 2012 7:31 pm

I already do something similar to what you are wanting, with 5 OSs on my desktop machine.

My main and default OS is still Ubuntu 10.04 on /dev/sda and with a separate home partition, plus, of course a swap partition which is used by all 5 OSs. On /dev/sdb I have four other OSs, the 12.04 versions of Xubuntu, Lubuntu and Ubuntu, plus Bodhi. All these have /home in the root partition and then I simply link the data folders of my main Ubuntu OS to those in the homes of the other four OSs. I also link the hidden .mozilla and .thunderbird folders from the main OS to the others which gives me the same bookmarks, history, emails etc etc on all OSs.

I could theoretically have separate /home partitions for those 4 as well, but I don't think it is worth it in my situation as I am just testing the 4 at the moment, not using them full time. I could also use a separate /data partition mounted at boot in all OSs, but what I use suits me well, so I see no reason to change what works.

The grub bootloader is currently supplied by Ubuntu 10.04 and I boot with sda as the first device in BIOS. As I install all other OSs I put their grub on sdb, and as all of them use grub 2, I now have the two disks which I can boot from and then choose whichever of the OSs I want from the grub menu.
Xubuntu 12.04 user, and loving it!
ajgreeny
LXF regular
 
Posts: 461
Joined: Wed May 10, 2006 8:18 pm
Location: Oxfordshire.

Postby Mayhem » Sat Aug 25, 2012 11:07 pm

Simplest answer is to install each distro to a seperate partition with a shared swap.

You cant be using all your distros that much that perfomance is an issue, only your most used should be a concern. And as Nelz said, on todays disks, unless you have some really high performance requirements, its not really a big issue as to what is situated where.

I would then leave each distro to install everything under "/" on its own partition, possibly with a "/shared" dir common to them all for swapping stuff between them (a usb drive is good for this in terms of ease) and for backups (although if its critical backups, off the machine is obviously better)
Mayhem
 
Posts: 11
Joined: Tue Apr 10, 2012 9:12 pm


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest