LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-11-2022, 09:04 PM   #1
joboy
Member
 
Registered: Jul 2009
Distribution: Debian, Ubuntu, Puppy, Mint
Posts: 672

Rep: Reputation: 7
How to do Linux partition ?


I've been playing with Linux for quite some time, first I use system default to install everything on one partition plus a swap, then later I decided to create a separate partition for /home, so that I can keep my personal files safe even the system crashed, but I found most of the distro by default still put everything on one partition I wonder why. I am not sure the best way to create Linux partition, and when to use primary and extended partition, what is the "best practice" for that ?
 
Old 11-11-2022, 09:17 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,148

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Having a separate /home is an excellent idea.

During install, you should get to a partitioning stage, that will have a "something else" or maybe "expert" option that will take you to a separate screen to do different partitioning. The major distros do it differently, but shouldn't be too hard to find a how-to for Debian based.
Many theories about how partitioning should be done, I feel it depends on your work profile. I use a fairly minimal setup. As for primary vs logical (in the extended) for MBR disk, it matters not at all for Linux.

Edit: here is the Mint install guide with a screenshot of "Something else" but doesn't really explain how to add partitions, or why.

If you are asking how to do partitioning after the install, a gparted liveUSB is the best/safest option IMHO.

Last edited by syg00; 11-11-2022 at 09:21 PM.
 
Old 11-11-2022, 09:26 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,375
Blog Entries: 28

Rep: Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162
To build in what syg00, I have found 25-30 GB to be more than ample for an install. That is, that is enough space for the root and other directories (/bin, /var, /sbin, etc.) when you are going to put /home on a separate partition.

A web search for "[distro name] separate home" should turn up some useful HOWTOs.
 
Old 11-11-2022, 10:06 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,344

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by joboy View Post
when to use primary and extended partition, what is the "best practice" for that ?
The partition table was originally designed to accommodate four partitions. As hard drives got bigger then a way was jury rigged to have more than four partitions. One of the primary partition slots is converted to a pointer to an extended partition table. This converted slot is called an extended partition. You can have any number of logical partitions described in the extended partition.

So, to answer your question you can create up to four primary partitions in the original partition table. If you want more than four partitions then you create three primary partitions and an extended partition. Then you can set up logical partitions as partitions four through infinity.
 
Old 11-11-2022, 11:37 PM   #5
joboy
Member
 
Registered: Jul 2009
Distribution: Debian, Ubuntu, Puppy, Mint
Posts: 672

Original Poster
Rep: Reputation: 7
Thank guys for the reply, my favorite Linux distro is Mint, in particular I like the Debian edition, and I am writing this with it. I did exactly assigned 30G for the root partition, 8G same as system RAM as SWAP, the rest is for /home. One thing I am not sure is, where are the user apps resided, is it /home ? that's why I used 30G for /root just to be safe. I am experimenting with different distro, some times I am too lazy that I simply install a new release over the old one without reformatting the drive, so that I need not to re-config the system, I know this may crash things ! even crazy I install directly to USB SSD, most of the distro even GhostBSD recognized the drive and allowed me to do so, so that hopefully I can boot it on different PC with every tools I needed without bringing a notebook ha ! I know that wasn't the "best practice" to do things !
 
Old 11-12-2022, 12:21 AM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,867
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by joboy View Post
when to use primary and extended partition, what is the "best practice" for that ?
Best practice some would say is neither. Those two terms apply to a legacy partitioning system that doesn't officially support disks of more than 2TB. The newer GPT disk partition system supports disks too large to imagine. There are only partitions on GPT, no primaries and no logicals. Installers will automatically use GPT for disks requiring it, but may or may not obviously present a choice between the types for smaller disks.

If your computer is new enough, roughly 10 years old or newer, then there is another choice to be made: whether to use the legacy BIOS booting system, or the more sophisticated newer UEFI system, which is designed to take better advantage of booting using GPT partitioning. Some of the newest computers no longer support legacy booting. On computers that offer UEFI booting, it and GPT are what I usually use. If you never used computers enough to get used to and knowledgeable about the BIOS booting and legacy partitioning systems, I suggest you learn and stick with UEFI and GPT if your computer offers UEFI, and don't bother spending time on the old ways.
 
1 members found this post helpful.
Old 11-12-2022, 01:29 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,148

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Quote:
Originally Posted by mrmazda View Post
... legacy partitioning system that doesn't officially support disks of more than 2TB.
Not entirely true. Legacy partitions can't be bigger than 2T, but you can use MBR to successfully use up to just under 4T of space. Nothing "unofficial" required, merely care in allocation.
 
Old 11-12-2022, 01:48 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,867
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by syg00 View Post
Not entirely true. Legacy partitions can't be bigger than 2T, but you can use MBR to successfully use up to just under 4T of space. Nothing "unofficial" required, merely care in allocation.
Is entirely true, because (only) unofficially is a qualifier, meaning up to 4T can be used by one who knows the special machinations required to make it happen and be usable. I doubt you'll find a mainstream distro installer a newbie would choose that would allow MBR partitioning on a 3T disk at all, and even if it did, it wouldn't allow more than 2T to be allocated to its installation. None of this is anything any newbie asking for partitioning suggestions needs to be exposed to, IOW, OT.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to re-size root partition without loosing any data if the root partition is immediately followed by swap partition thebiggiantmouse Linux - Hardware 16 09-25-2019 12:06 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
Copying from Linux partition to Linux partition Commando464 Linux - Newbie 7 08-25-2004 07:34 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
How to add new partition before Linux partition in an existing Linux box? ashutosh Linux - Software 3 04-23-2002 03:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:05 AM.

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
Open Source Consulting | Domain Registration