LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-06-2015, 04:14 PM   #1
herakles_14
Member
 
Registered: Sep 2010
Location: I currently reside in Glendale, AZ
Distribution: Manjaro, LinuxMint 17.2 & Mageia 5
Posts: 360

Rep: Reputation: 0
Question how to partition a computer to accommodate three or more distros?


Hey,

My PC has 298 GB of which approximately 179 GB is unallocated. The remaining estimated 119 GB is being used by two distro's: PCLinuxOS and Manjaro 0.8.12

When I have tried to add a new distro, having plenty of free space, I usually get a message telling me I can not proceed further due to my having four primary partitions.

I have a Swap partition of sufficient size to handle multiple distros almost 10 GB.

I installed PCLOS first and then Manjaro. I gave each approximately 12 GB for their 'Root' (/) Their Home (/home) partition was roughly 40 GB each.

{/dev/sda1 swap /dev/sda2 Extended (/dev/sda5, dev/sda6) "PCLinuxOS" /dev/sda3. /dev/sda4 "Manjaro 0.8.12"

For /dev/sda 5 & 6 I used 'Reiserfs' file system. For /dev/sda 3 & 4, I used Ext4.}

The way I look at it my root and home partitions are 'primary' thus taking up the four primary allowed. I seem ti either recall or seen somewhere, that beside 'Primary there was something called 'Logical'

Starting with PCLinux as a base could I make a new installation of Manjaro where (/) would be Primary and (/home) would be Logical?

Or would I need to start totally over with fresh installs of both Manjaro ant PCLinux?? Then make (/) primary and (/home) logical?

Would such a move allow me to install additional distros?

A thought could I make the changes in Gparted while keeping the distros as they are, just making the changes [primary & logical?]

TIA

herakles_14
 
Old 04-06-2015, 05:00 PM   #2
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,790

Rep: Reputation: 211Reputation: 211Reputation: 211
Extended...

The way around the four primary partition limit is to use one of the four to make an extended partition in which you can have many logical partitions.

You can begin from the beginning and format the whole HDD as an extended partition with many logical partitions and probably as many linux distributions installed as you like.

There are many guides on how to do this, but if you have already used all of your four primary partitions, you will at least have to change one of your linux installations to free up one partition to use for your extended partition.

http://www.tldp.org/LDP/sag/html/partitions.html

Last edited by thorkelljarl; 04-06-2015 at 05:18 PM.
 
1 members found this post helpful.
Old 04-06-2015, 05:06 PM   #3
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, Fedora & Arch mostly.
Posts: 2,224

Rep: Reputation: 605Reputation: 605Reputation: 605Reputation: 605Reputation: 605Reputation: 605
Yup, I'd do a primary partition as swap (as it will be shared between all distro), then do an extended partition with logical partitions for / of each distro you want to run. You can, if you like, also do a single partition for /home so that all your settings carry over from 1 distro to the next, although no idea if that's something you want to do or not.
 
1 members found this post helpful.
Old 04-06-2015, 06:19 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,045

Rep: Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311
You might be able to do it but it depends upon where the "free space" is. If the information in your initial post is accurate, you have a primary partition as swap, the second primary is the extended and the other two primary partitions are the manjaro partition. sda5 and sda6 are logical partitions inside the Extended partition, sda2 so if you have space inside sda, you could create logical partitions there.

Primary partitions in Linux are numbered 1-4 and logical begin with 5. Run the command below as root to get the needed info.

Code:
parted /dev/sda print all
 
Old 04-06-2015, 07:56 PM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,596
Blog Entries: 1

Rep: Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510
I tend to boot linux from USB. For $30 you can get 3x SDHC cards and put a distro on each. Alternatively you can choose a main distro and chroot to the others in directories, not partitions. Or go the VM route. Lots of options.
 
Old 04-06-2015, 09:54 PM   #6
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
To expand slightly on the above, the limitation of 4 primary partitions is due to MBR limitations. If you use GPT partitioning, you can have as many primary partitions as you like. It's possible to change MBR to GPT, but it's not entirely straightforward. MBR is on its last legs, and probably won't last much longer. UEFI and GPT are taking over the computer world, for valid reasons. Your choices are to either use logical partitions or to switch to GPT.
 
Old 04-07-2015, 05:59 PM   #7
herakles_14
Member
 
Registered: Sep 2010
Location: I currently reside in Glendale, AZ
Distribution: Manjaro, LinuxMint 17.2 & Mageia 5
Posts: 360

Original Poster
Rep: Reputation: 0
Thanks to all who have taken the time to help me with this issue.

sqosnell;

If I were inclined to switch from the MBR set up to GPT, how would I do it? You said the change was not straight forward, is that another way of telling me it is somewhat convoluted in changing from MBR over to GPT?

Shadow 7;

Is this SDHC card you mention another name for a 'flash drive or flash stick"? If so I have not had the best of luck trying to put a distro on such a device. I have a 16GB 'flash drive on which could be placed a distro. Providing I can figure out how to do it? I know of 'unetbootin' I have PCLinuxOS and I do not believe it plays nice with it, unetbootin.

Yancek;

Here is what I came up with "parted /dev/sda print all"

"[root@mithradates menelaos]# parted /dev/sda print all
Model: ATA WDC WD3201ABYS-0 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 32.3kB 10.7GB 10.7GB primary linux-swap(v1)
2 10.7GB 69.6GB 58.9GB extended
5 10.7GB 25.8GB 15.1GB logical reiserfs
6 25.8GB 69.6GB 43.8GB logical reiserfs
3 69.6GB 82.4GB 12.8GB primary ext4 boot
4 82.4GB 128GB 46.0GB primary ext4


thorkelljarl;

When you speak of removing one of my distros, do you mean the complete removal of said distro then the installation of that distro as a 'logical' extended?
 
Old 04-07-2015, 10:08 PM   #8
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
http://www.rodsbooks.com/gdisk/index.html

http://www.rodsbooks.com/gdisk/mbr2gpt.html

Note especially the recommendation about backing up the mbr, and the instructions on how to do that.

Since you already have logical and extended partitions on the disk, you can just use gparted to make more logical partitions.

Last edited by sgosnell; 04-07-2015 at 10:15 PM.
 
Old 04-08-2015, 02:26 AM   #9
herakles_14
Member
 
Registered: Sep 2010
Location: I currently reside in Glendale, AZ
Distribution: Manjaro, LinuxMint 17.2 & Mageia 5
Posts: 360

Original Poster
Rep: Reputation: 0
Thanks for the links. I'll go over them carefully.
 
Old 04-08-2015, 07:31 AM   #10
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
If you don't want to reinstall, you can move partitions in order to make the unpartitioned space usable for new partitions.

You currently have sda1, sda3 and sda4 as primary partitions, with sda2 as an extended partition containing logical partitions sda5 and sda6. I don't think you made the location of the unallocated space clear, but I assume it is physically after sda4.

In order to create new partitions, the unallocated space must be inside your extended partition (sda2).

First (running in a mode in which sda4 is not mounted) you must move sda4 to the physical end of the drive.
Second (running in a mode in which sda3 is not mounted) you must move sda3 to right before sda4.
Third (running in a mode in which neither sda5 nor sda6 is mounted) you must expand sda2 to include the unallocated space.

Then you will be able to create new partitions.

Each of those steps is easy in any GUI partitioning tool. The only trick is not having those partitions mounted while doing it. If you boot from a USB, CD or DVD "live" Linux, then it is easy to do all those steps in quick sequence with all those partitions unmounted. If you instead boot from your installed linux systems on sda, I think you can dance around the conflicts by rebooting a few times and running different copies of the GUI partitioning tool for each step. But that is at least harder and maybe I misunderstood some detail making it impossible.

Quote:
The way I look at it my root and home partitions are 'primary' thus taking up the four primary allowed. I seem ti either recall or seen somewhere, that beside 'Primary there was something called 'Logical'

Starting with PCLinux as a base could I make a new installation of Manjaro where (/) would be Primary and (/home) would be Logical?
You were confused about what "primary" and "logical" mean when you wrote that. You also seemed to be confused about the significance of primary and logical in Linux. Linux does not care about whether any of its partitions are primary.

You just need to satisfy the rules of the partitioning scheme (or start over with GPT, but I see no point to that):
sda1 through sda4 can each be anywhere on your hard drive. But all partitions sda5 and higher, must be inside the extended partition.

The ones inside the extended partition are called "logical" partitions.

Depending on which document's terminology you choose, the "primary" partitions are either all of sda1 through sda4 or all of those except the extended partition. That is only a terminology question (is the "extended" partition also called a "primary" partition). Regardless of terminology, the extended partition must be one of sda1 through sda4 and each primary partition must be one of sda1 through sda4 and every other partition must be inside the extended partition.

So your problem (as I described earlier) is that your unallocated space is outside the extended partition, but you need to create sda7 etc. inside the extended partition.

The error message expresses the problem from the less practical viewpoint: Your unallocated space is outside the extended partition, so it could be used only to create one of sda1 through sda4. But all those already exist, so your unallocated space cant be used.

Last edited by johnsfine; 04-08-2015 at 07:48 AM.
 
Old 04-08-2015, 08:44 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,045

Rep: Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311Reputation: 1311
Viewing the information you posted from the Parted command, the suggestions by johnsfine above should work. The major problem I see is the fact that for some reason, you have a separate boot partition near the end of the disk and the boot partition is one which will need to be moved. GParted is pretty easy to use and gives a good visual representation of what will be happening so is usually a bit easier to use. From the GParted manual, the following quote

Quote:
f the partition is an operating system boot partition, then the operating system might not boot after the move operation is applied.
The link below is to the section of the GParted Manual on moving partitions:

http://gparted.org/display-doc.php?n...move-partition

If you were booting from Grub on PCLinux, you would not have this problem since there would be no need to move either of its partitions.
 
Old 04-08-2015, 09:14 AM   #12
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by yancek View Post
the boot partition is one which will need to be moved.
I'm not sure about each version of grub, whether it simply survives that kind of move or whether it needs to be reconfigured after the move.

If the next step after moving partitions were to install a third distro and if you let that third distro installer default to installing its own copy of grub and doing os scanning to find and include previous linuxes in its menu, then the question of whether the partition moving broke the previous grub doesn't even matter.

But if you want to keep the previous copy of grub active (and add the third distro to the menus of the previous grub, which is trickier) then you ought to know the commands for reconfiguring the grub you are now using and you might need to give the appropriate command after moving the partition, before the hard drive can be booted again.

Before either moving partitions or installing a third OS, it is generally wise to review online instructions for repairing whatever version of grub you are using (assuming, like me, you don't have those commands memorized already).
 
Old 04-09-2015, 07:45 AM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,596
Blog Entries: 1

Rep: Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510
Quote:
Originally Posted by herakles_14 View Post
Shadow 7;

Is this SDHC card you mention another name for a 'flash drive or flash stick"? If so I have not had the best of luck trying to put a distro on such a device. I have a 16GB 'flash drive on which could be placed a distro. Providing I can figure out how to do it? I know of 'unetbootin' I have PCLinuxOS and I do not believe it plays nice with it, unetbootin.
The SDHC card is what you put in camcorders and such, what the earlier models of the raspberry pi use and such. You will need a card reader that is bootable (not all are). You may have a card reader built into your machine already. I use these cards over "sticks" because most sticks are sooooo slow in the I/O that you will not have a good experience. You basically treat the cards like you would a USB HDD. You can even put grub in the MBR of said cards, although you might need to -f (force) it to get it there.

If you already have linux and are familiar with it, then it's kind a neat route to take. These cards do have limited writes so it's not all roses, but it can get you up and running and help rescue a system or two on the cheap. They also tend to use less power and put off less heat than an HDD, so there's perks there as well. The "sticks" use even less power, but the I/O is so slow on those that you'll buffer on disk writes trying to watch a 360p youtube video. Which will likely consume 50% or more of the experience and even cause your browser to crash. A class 6 or higher SDHC card is decent enough on the speed to be in the realmn of acceptability.
 
Old 04-09-2015, 09:48 AM   #14
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
IME there is no real difference in speed between USB flash drives and SD cards, because they both use the USB interface. Under the hood, SD card readers are USB devices. There is a difference between individual cards or flash drives, of course, and you want to get a faster device if possible. The cheaper the drive or card is, the slower it usually is. Performance does have a cost.

The partitioning scheme the OP has is rather unusual, and I'm not entirely sure how that came about, but I expect it just grew like Topsy, and was never planned at all. It's possible to make exact copies of each partition using dd, wipe the drive entirely, and use a better partitioning scheme, then restore everything using dd again. The swap partition doesn't need to be backed up at all, of course. The time and effort to do this might be more than one is willing to expend, though. That's something no one else can decide.
 
Old 04-13-2015, 02:59 AM   #15
herakles_14
Member
 
Registered: Sep 2010
Location: I currently reside in Glendale, AZ
Distribution: Manjaro, LinuxMint 17.2 & Mageia 5
Posts: 360

Original Poster
Rep: Reputation: 0
Hey,

i am sorry it has taken me so long to get back with all of you, after the time you took out of your own schedules to help me.

The partition set up was planned, sgosnell, it just did not come out that way.

Okay, johnsfine, You said,

"First (running in a mode in which sda4 is not mounted) you must move sda4 to the physical end of the drive.
Second (running in a mode in which sda3 is not mounted) you must move sda3 to right before sda4.
Third (running in a mode in which neither sda5 nor sda6 is mounted) you must expand sda2 to include the unallocated space.

Then you will be able to create new partitions."

As far as I can recall at no time during the partitioning of either my PCLOS or my Manjaro did I click on or check a box to mount anything. I went over he instructions for moving partitions, provided by, 'yancek', I was hesitant to try to move 'sda4' in the manner you suggested.

I took a screenshot of my gparted set up and had intended to post it here, but when I tried the image came out exceedingly small and difficult to make out pertinent factors. So here is the 'Set up': sda1 is Swap, sda2 is Extended and under its umbrella are sda5 and sda6, which are the Root and Home partitions for PClinuxOS. sda3 is the Root partition for Manjaro, and sda4 is the Home partition for Manajo. The unallocated space is without an 'sda' indication. For an unknown reason at the end of sda4 is 'boot'.

You tell me to move sda4 to the physical end of the drive. Do you mean to the end of the 'unallocated space'? Then follow stuit with sda3, to have it close to sda4. In both cases they should be unmounted.

Running in a Mode where sda5 & sda6 are mounted, I am to expand sda2 to encompass the unallocated space.

I believe to do what you ask, I would need to do part of it while using 'gparted' on PCLOS and the other art while I am using 'gparted' on Manjaro. A least that is my solution, or whatever.

On moving sda3 & sda4, could I right click and while holding the 'right button down 'drag' the partition to the end of the 'unallocated space'. Then do the same for sda3?

I am still unclear on how to expand sda2 to include all of the unallocated space.Would it be a similar 'drag & drop' move I suggested for sda3 & sda4 moves?

sgosnell, for the time being i think i will leave the MBR as it is until I better understand how to change to 'GPT'.
 
  


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
how do I set up wire to accommodate turbo tax and i tunes jhestrin Linux - Newbie 2 03-23-2011 01:07 AM
Write permissions on shared partition (two or more linux distros on one computer) fc6_user Linux - General 22 11-19-2008 03:20 PM
LXer: Python Conference Changes Venue to Accommodate Growth LXer Syndicated Linux News 0 10-20-2008 11:03 PM
How do I know which partition my distros are on? (Multi distros) glenn69 Linux - Newbie 3 06-18-2005 02:43 AM
Editing Fstab to accommodate Supermount YellowDogMACMAN Linux - Newbie 3 05-08-2004 06:20 PM


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