Linux - SoftwareThis 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
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.
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
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.
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.
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.
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.
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?
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.
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)."
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.