LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-18-2019, 09:20 AM   #1
Warren Sinden
LQ Newbie
 
Registered: Dec 2013
Location: South Africa
Distribution: Ubuntu 19.04
Posts: 15

Rep: Reputation: Disabled
Correct sequence for partitioning a hard drive


Is there a correct sequence for partitioning a hard drive?
If you search the internet every second person seems to have a different sequence
some have root, home swap & others say swap root home

I am thinking of partitioning my hard drive like this

Code:
sda
sda1  UEFI    exfat   512mb
sda2  Boot     ext 2    1G
sda3    swap               8G  (same as ram)

(logical partitions)
sda4      /      ext4       60G
sda5   USR   ext4       10G
sda6  VAR   ext4        10G
sda7   Home   ext4  rest of hard drive
Snapper consumes too much space therefore I’m rather using ext4 & will do back ups with clone zilla.
Is this sequence correct?

Last edited by Warren Sinden; 05-18-2019 at 11:17 AM. Reason: Correction
 
Old 05-18-2019, 10:05 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you forgot your closing / on your end code block to close it off.

yeah you can do it like that, as long as you know you will never play with your swap partition in resizing it whatsoever, else you could do your first 2 primary then go into extended then finish off like that putting everything else on it.

(I do not even bother with a swap anymore, that to me is just wasting space that can be used for something else. I use to put it on a SD Card I always keep plugged into my laptop, and still not one distro of Linux I've ran on it ever touched swap, so.. got rid of swap. I do not hibernate my laptop. I got 8GB RAM on this one I am typing this on. )

swap root home. Old type platter hdd's read from inside to outer rim, putting swap at the front means the arm reads the inner most part of the platter first, which spins the fastest. Therefore, read writes are faster, Hench putting swap first. Quicker access to it. Putting root first means loading OS faster for the same reason.

sdd's it no matter where you put it for speed, but for resizing between home and root then on either end is advisable. and not putting swap in the middle. root swap home. swap gets in the way of moving data between home and root if one ever needs to resize the partitions.

Last edited by BW-userx; 05-18-2019 at 10:22 AM.
 
Old 05-18-2019, 11:45 AM   #3
Warren Sinden
LQ Newbie
 
Registered: Dec 2013
Location: South Africa
Distribution: Ubuntu 19.04
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
you forgot your closing / on your end code block to close it off.
Thanks for the heads up.
I don’t know how I missed it.

Quote:
sdd's it no matter where you put it for speed, but for resizing between home and root then on either end is advisable. and not putting swap in the middle. root swap home. swap gets in the way of moving data between home and root if one ever needs to resize the partitions.
I have run into swap a few times when I only had 1G ram & done video editing but sine I’ve added ram I have never had that problem again.
I have head that if you don't have a swap partition & you do run out of ram you can crash your system.
Luckily that has never happened to me.
 
Old 05-18-2019, 12:02 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
keep an eye on it, then create a swap file that you can delete afterwards. is an option.
 
1 members found this post helpful.
Old 05-18-2019, 12:08 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Most efi systems disk are gpt. If it is gpt disk you don't use logical paritions.
 
2 members found this post helpful.
Old 05-18-2019, 01:03 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
good catch, machete don't do UEFI.

Last edited by BW-userx; 05-18-2019 at 08:10 PM.
 
Old 05-18-2019, 06:08 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
There is no "correct" sequence - whatever works, works.
I make sure swap is out of the way - beginning or end of the disk, doesn't matter. Put the free space next to what is going to grow - or make the entire discussion moot by using LVM.
 
Old 05-18-2019, 08:30 PM   #8
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,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
syg00 is quite correct.

I normally follow this in setting up my primary disk drive: I create / and start it at the beginning of the drive, then I create /swap and set it at the end of the drive. Whatever's left over becomes /home. I do not normally create a boot partition.
 
1 members found this post helpful.
Old 05-18-2019, 08:37 PM   #9
Warren Sinden
LQ Newbie
 
Registered: Dec 2013
Location: South Africa
Distribution: Ubuntu 19.04
Posts: 15

Original Poster
Rep: Reputation: Disabled
I still have a disk drive.
I had a 2T external that got knocked off my table while I was formatting it so that is history (can only access 4g on it).
I am looking for another external at the moment,
In the interim I'm using an old 650g external for backups which seems to be doing fine.
I don't like interfering with a partition in a running system so there is no need for me to use lvm
For safety sake I think I might make root 50G & usr 20G
Has anyone ever needed more than 20G for unix system resources?
 
Old 05-18-2019, 09:30 PM   #10
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,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
20GB should be adequate, but I believe in giving / plenty of breathing space.

I commonly format / to 25GB or 30GB and generally use about half of that. I do not create partitions other than /, /home, and /swap.

Just my two cents.
 
Old 05-18-2019, 09:48 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
With a 50G root, why do you feel the need for a separate (large) /usr - and /var ?.
I would also be surprised if [U]EFI standards accommodate exfat as a bootable partition.

Instead of overly complicating things, why not let the installer handle it - they have a lot of installed systems to base their assumptions on.
 
Old 05-18-2019, 09:53 PM   #12
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,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
I just checked the one box I have that has an EFI partition formatted by the Ubuntu MATE install routine. Per fdisk -l, it's formatted "(FAT-12/16/32)."
 
Old 05-18-2019, 10:06 PM   #13
Warren Sinden
LQ Newbie
 
Registered: Dec 2013
Location: South Africa
Distribution: Ubuntu 19.04
Posts: 15

Original Poster
Rep: Reputation: Disabled
Var has very little activity going on in it where as with usr has quite a bit of activity going on in it resulting in more activity going on it in.
I think it was in it was in "a practical guide to Ubuntu linux" that suggested making usr & var separate partitions.

Quote:
I just checked the one box I have that has an EFI partition formatted
You are right EFI is not formatted.

Last edited by Warren Sinden; 05-18-2019 at 10:09 PM.
 
Old 05-18-2019, 10:53 PM   #14
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,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
Back in the olden days, when I was young 'un and had never used a computing box, hard drives were very small. Accordingly, various directories were often put on different partitions to ensure that, if those directories filled up, they would not affect other directories on other partitions. /var was often put on a separate partition on a separate physical drive, because log files can grow to significant size.

In these days of ginormous hard drives, many of those early practices are not irrelevant.

Today, the primary reason for having a separate /home is that, if you have to reinstall, your personal files and settings would not be lost.

There is really no compelling reason to put other directories aside from / and /swap on separate partitions other than the above.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the correct full file path from a remote linux machine correct superwavelet Linux - Newbie 7 05-19-2018 06:28 PM
[SOLVED] Need nmcli commands in the correct sequence nix84 Fedora 2 08-19-2015 11:20 PM
Rows in lists on my Debian are correct/black/correct/black... eikhorsholm Linux - Desktop 1 10-01-2009 05:24 PM
I want to copy my hard drive to a larger hard drive and boot from the new drive. lpmorgan1 Ubuntu 8 09-07-2009 11:26 PM
Hard Drive Partitioning for Large Hard Drives Matir Linux - General 2 12-26-2006 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:22 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
Open Source Consulting | Domain Registration