best partitioning schema to dual boot 2-3 linux distros

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Captain Brillo

best partitioning schema to dual boot 2-3 linux distros

Post by Captain Brillo »

The question is:

if I want to boot multiple linux distros on one HDD, how do I set up the partitioning?

Do I start with an Extended partition? I know we're allowed 4 primary partitions, but gParted on the Mint LiveUSB is only letting me create Primaries. How do I create logicals?

If I want 2 or 3 distros on 1 disk (2 TB), what is a step-by-step how to do this on a bare-naked un-partitioned disk?
:( :(
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: best partitioning schema to dual boot 2-3 linux distros

Post by WharfRat »

You create logical partitions within the extended partition so define an extended partition first.

If you have 4 primaries, you will not be able to create an extended partition.

As for linux, keep it simple and create root partitions for how many installations you intend to have and make one swap partition as the same swap can be use for each linux distro :wink:
User avatar
greerd
Level 6
Level 6
Posts: 1060
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: best partitioning schema to dual boot 2-3 linux distros

Post by greerd »

What I would do is to use a gpt partition table which enables multiple partitions. (over 100) no extended partition needed.

You may have to create a small uefi (msdos) My system is old enough that I don't need this partition, MBR only.

Then create 3 x 30 Gig partitions for the 3 OS's formatted ext4 '/' directories (system directory for each OS)

Then 1 /home partition of 100 Gig, making sure that I use a different user name for each distro so there's no conflicting config problems (ext4)

Then a swap partition 2Gigs, depending on how much memory you have (swap)

Then create a /data partition which I would label 'data' using the rest of the drive (ext4), this can be used to link any common files between users like .thunderbird, .mozilla, etc. You can link these files/folders to all of you 3 installs so they all have common setups for firefox, thunderbird, etc.
Captain Brillo

Re: best partitioning schema to dual boot 2-3 linux distros

Post by Captain Brillo »

What I would do is to use a gpt partition table which enables multiple partitions. (over 100) no extended partition needed.
I have a 2 TB disk; I want to partition it for 2 distros, with /home (or 2 /homes as it doesn't need to be shared because I've read that might cause issues?) and a shared data partition. The box is an i7-2600 or something with 16 GB RAM

Would it be too much to ask for "prescriptions" for this?

I've had a lot of trouble with this box - on other posts elsewhere it is referred to as "Cyberspace-haunting" - so I need to get the partitioning right.

It started as a Windows 10 box, and is gradually moving to all linux, but it's has been a struggle :D

You wouldn't believe me anyway....
it all started when I was a kid and found I couldn't wear electric watches...tin school it was known for "my" assigned computer workstation to just shut down, for no apparent reason... remember the theme from "The Twilight Zone?" I hear that in the background all the time... :D :D :D
And don't get me started on Touch screens :evil: :evil: :evil:
Captain Brillo

Re: best partitioning schema to dual boot 2-3 linux distros

Post by Captain Brillo »

Some stuff I've read suggests that multiple distros could share /boot
This is not clear to me in the installation procedure.
Given this partition table, how would this work? Do I need a separate /boot partition first?
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A19A875D-A0DD-4C68-8D8F-F7C90A8F37BF

Device Start End Sectors Size Type
/dev/sdb1 2048 209716891 209714844 100G Linux filesystem
/dev/sdb2 209717248 419432447 209715200 100G Linux filesystem
/dev/sdb3 419432448 629147647 209715200 100G Linux filesystem
/dev/sdb4 629147648 671090687 41943040 20G Linux swap
/dev/sdb5 671090688 2289059839 1617969152 771.5G Linux filesystem
/dev/sdb6 2289059840 3907028991 1617969152 771.5G Linux filesystem
Where would I put a mutual /boot?

(To paraphrase a popular website, I am not so smart :(
User avatar
Pierre
Level 21
Level 21
Posts: 13214
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: best partitioning schema to dual boot 2-3 linux distros

Post by Pierre »

the Biggie is - - what do you want to control the whole machine?.
- as in the last Installed Operating System, or some specialised method ?.
this is for the Mutual Boot - - in SDa usually & for the Last Installed Operating System.

in my case - - I'll use Gparted on some Live Environment,
to pre-partition that HDD into some order that suits both my requirements AND the Size of that HDD.

and I've also got a lean towards having a separate /home partition, as well.
8)
so, all of this, can lead to a complex looking set of Partitions on that HDD . . .

Eg: like this Laptop is set up:
- - Triple Boot:
- each with it's own / root partition in a Primary Partition
- each with it's own /home in a Logical Partition
and with a common /swap partition, for all three systems.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: best partitioning schema to dual boot 2-3 linux distros

Post by mr_raider »

If you are using an EFI boot system, you can use btrfs filesystems, which will allow you to install multiple OSes to the same partition using sub volumes. If you are interested in going that route, we can give you some pointers. It does require some basic reading for background first.
Image
lmintnewb2

Re: best partitioning schema to dual boot 2-3 linux distros

Post by lmintnewb2 »

Can't remember the top limitation but it's quite a few if your system is uefi/gpt, heckuva lot more than 4. If it's an old mbr setup, then yeah, 3 primaries and an extended partition can't exactly remember but believe it can support 18-20 logical partitions easily and work arounds to get it to allow more.

It's hard to advise someone which scheme is best, not knowing their preferences and usage habits. I tend to keep it simple, everything for 1 distro, including /home on one partition. Usually 25-30gbs for it ( you may desire more, esp with 2TB's of diskspace) I try to keep my Os's lean and mean, don't install 2,439 packages and the kitchen sink to them and then set up a shared data partition to share files between the installs, mounting it in /etc/fstab after creating a mount point in /mnt for it. Size depends on amount of space available and you have PLENTY. Also tend to setup a testing partition, in case I want to play with xyz-distro and some unallocated space on the drive in case I want to play with something else a more exotic filesystem like brtfs or whatever else catches my interest at the time or several distro's. My old box doesn't support vm's. :( Of course always setup a swap partition too. Slightly larger than the amount of RAM on the pc.

Many people symlink to such a shared partition to use as a shared /home partition among many operating systems, it leaves all the hidden directories and config files where they should be so it doesn't mess up the operating system(s) but all else goes out to the shared partition. Just 2 cents, gnu/Linux is fairly dang easy to get along with and seems infinitely adaptable. So guessing you'll have to research and try some layouts with it. To figure out which you like the best.
lmintnewb2

Re: best partitioning schema to dual boot 2-3 linux distros

Post by lmintnewb2 »

Just pointless elaboration, with 2TB's of disk space sheesh you could literally and easily have dozens of gnu/Linux installs on that box. Though having 75 boot entries in the grub menu ( or whichever bootloader) would have to be a tad tedious and keeping them all upgraded quickly lead to burn out. :D

Personally have had a long standing rule of thumb. Only 3 distro's installed at any one time, due to the above. It just gets tedious upgrading them all, even if someone went to the extreme and setup up automatic updates with a crontab or script etc. Rarely even get up to the three anymore, 2 atm and only use the main install majority of time.

Oops, thought of something else that may help you out when using multiboot w several distro's. Keep in mind that when/if the swap partition gets formatted during an install. That it's UUID will change, thus something like systemd will throw a fit due to the UUID in the /etc/fstab file no longer being correct in xyz-install and will run a 90sec startjob at boot. Until it's fixed.

Solution is to edit the /etc/fstab file and correct the UUID for the swap partition in the effected install(s). If the installer gives you the option of not formatting the swap, that can work too. Though someone would still need to edit fstab and add an entry for swap, if they want to use it and having it mounted automatically at boot-up.
User avatar
greerd
Level 6
Level 6
Posts: 1060
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: best partitioning schema to dual boot 2-3 linux distros

Post by greerd »

lmintnewb2 wrote:Personally have had a long standing rule of thumb. Only 3 distro's installed at any one time, due to the above. It just gets tedious upgrading them all, even if someone went to the extreme and setup up automatic updates with a crontab or script etc. Rarely even get up to the three lately, 2 atm and only use the main install majority of time.
I have to agree on this, I have 3 OS's one one drive but only use 1 of them, plus mine are set up with chain-linked grubs so updating a kernel on a distro that uses a chain-linked grub means running update-grub on the main install too. I think making room for 2 is good, so when you fresh install Mint 19, you still have Mint 18, just in-case. If I want to check out another distro, a VM is the easiest way to go.
lmintnewb2

Re: best partitioning schema to dual boot 2-3 linux distros

Post by lmintnewb2 »

^ Agree with all points made, the updating grub in the correct distro, that being the one that is controlling the boot with it's bootloader in the ESP =efi partition or the mbr can also aggravate someone. Same with setting a particular kernel you want to boot w xyz-install. If you set it in /etc/default/grub or default timeout or whatever else. Will get another system which supports vm's but for now for me it's not an option. :( That would effectively somewhat address both the grub headache you described and the updatitus I was babbling about. Not having to boot-reboot-boot-reboot into each and every one of them keeping them up to date. :)
More nonsense, depending on the particular distro choosen, updates can come fast and furious too. Even a bunch of them more than once a day ! Arghhhhh, such as tracking Debian unstable or a distro like Arch. Such was also my main reason for switching over to stable branch. Got really tedious dealing with the updates for me. Plus I like and prefer what I do, so tend to setup all my gnu/Linux installs to be almost clones of each other anyway, set up Arch to be pretty much exactly the same as the Debian install(s). Also got really annoying updating 4-5 fairly well clone OS's. Why would I possibly need pretty much 5 of the same OS onboard and go through all of that ? Though may be differences here and there between them. It got old.
Locked

Return to “Beginner Questions”