Linux - GeneralThis 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
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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.
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.
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 !
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.
... 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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.