You are not logged in.

#1 2020-11-13 20:26:21

farchirook
Member
Registered: 2020-10-08
Posts: 12

How much space to allocate for the partitions

Hi All,
Assuming I am installing arch Linux on a 1 TB hard drive. How do I know how much space do I need to allocate for the different partitions I will be creating ? I just need to know how do I divide it. An example will help here. Thank you.

Kind regards,
farchirook

Offline

#2 2020-11-13 21:00:39

farchirook
Member
Registered: 2020-10-08
Posts: 12

Re: How much space to allocate for the partitions

I am also assuming it is for UEFI not BIOS. Examples will help assuming it is a 1 TB hard drive.

Offline

#3 2020-11-13 21:18:38

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,993

Re: How much space to allocate for the partitions

You can just put everything in one large / if you want (unless you're using UEFI, in which case you'll need a small 512MB EFI partition at the start as well).


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2020-11-13 21:42:48

farchirook
Member
Registered: 2020-10-08
Posts: 12

Re: How much space to allocate for the partitions

So /dev/boot 512MB /dev/efi 512MB /dev/swap 512MB and the left over of the 1TB for the /dev/root ? Or they should be more than 512 MB ?

Offline

#5 2020-11-13 22:02:30

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,993

Re: How much space to allocate for the partitions

farchirook wrote:

So /dev/boot 512MB /dev/efi 512MB /dev/swap 512MB and the left over of the 1TB for the /dev/root ?

None of what you've just written makes any sense at all.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2020-11-13 22:37:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,627
Website

Re: How much space to allocate for the partitions

To elaborate on the above /dev/ infront of those discriptions is gibberish.  You will want a boot or efi partition, but these are not /dev/boot or /dev/efi - there's no such thing.  You may also want a swap partition, but honestly those aren't so useful anymore since you can use a swap file (if you want to use swap at all) - but this too would not be /dev/swap.  You will need a root partition, but again, not /dev/root.

So putting aside the /dev/ part, you also would not have a boot and efi partition.  You need an efi partition - in most cases, it's best that the efi partition is mounted to /boot, so the efi partition is your boot partition.

You may also want a home partition - this is a bit subjective, but I'd encourage it.

So in short, you need one partition of 512MB or more (512 is plenty if you are not dual booting any other OSs that will share the partition).  You will also need at least one other partition for the root filesystem.  On top of this I'd personally recommend a home partition.  Then you might optionally want to use swap, and if so you might want a swap partition - but here I'd suggest not bothering with the partition.

So either:
1. An efi partition that will be mounted to /boot (512M)
2. A root partition that will be mounted to / (everything else)

Or
1. An efi partition that will be mounted to /boot (512M)
2. A root partition that will be mounted to / (~20G)
3. A home partition that will be mounted to /home (everything else)

If you go with the latter option, the size of the root partition (20G in the example) may be influenced by the total size of the disk and the expected use.  Do you plan to install a lot of very large software (cuda, tensor flow, multiple DEs, tools for 3d rendering, advanced video editing, etc)?  In most cases 20GB for a root partition will be more than enough - but if you have a good sized disk and you know ahead of time that you plan to use several of the listed big software packages, you could bump that up a bit.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2020-11-13 22:39:29

farchirook
Member
Registered: 2020-10-08
Posts: 12

Re: How much space to allocate for the partitions

Why is that ? It said in the installation guide you create three partitions dev efi and root. Did I understand it wrong ?

Offline

#8 2020-11-13 22:41:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,627
Website

Re: How much space to allocate for the partitions

farchirook wrote:

Why is that ? It said in the installation guide you create three partitions dev efi and root. Did I understand it wrong ?

No, the installation guide on our wiki certainly doesn't say that.  What guide are you following, or where did you read that?

EDIT: nevermind - our installation guide DOES say something like that currently.  Sorry ... I have no idea what the author meant with that column of the table.  I gather they meant those to be representative names - but /dev/ should definitely not be there in that case.  The actual device names would be something like /dev/sda1, /dev/sda2, and /dev/sda3 or similar - the precise device names will vary based on hardware, which is why the wiki author likely didn't want to use actual device names, but their use of /dev/stuff is misleading.

Last edited by Trilby (2020-11-13 22:44:45)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2020-11-13 22:54:27

farchirook
Member
Registered: 2020-10-08
Posts: 12

Re: How much space to allocate for the partitions

Thank you Trilby.
Thank you Slithery.

Offline

#10 2020-11-13 23:00:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,627
Website

Re: How much space to allocate for the partitions

Here's a better page in the wiki:
https://wiki.archlinux.org/index.php/Pa … le_layouts

That does recommend a swap partition "at least 512MB", but swap partitions - when used - are generally a multiple of the RAM available on the machine.  Specific multiple recommendations have varied over time from having swap 1, to 1.5, or 2 times the size of the RAM space if you intend to use hibernation.  I've not kept up with the recommendations as I'm not fond of swap partitions at all now that the kernel can use swap files for everything the partitions used to be used for.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2020-11-13 23:04:37

farchirook
Member
Registered: 2020-10-08
Posts: 12

Re: How much space to allocate for the partitions

That is awesome. I was going to keep it simple and go with what you both initially recommended. All I want to do is use it for a lot of development of few programming languages and use the browser and that is it.

Offline

#12 2020-11-17 06:18:10

mrazster
Member
From: 127.0.0.1
Registered: 2019-05-24
Posts: 25
Website

Re: How much space to allocate for the partitions

You wanted an example..so here´s how I partition my install:

EFI = 512MB
Root = 40GB
Home = 200GB

And then I have a couple of other partitions and discs for other purposes that doesn´t effect the install procedure.

Last edited by mrazster (2020-11-17 06:20:15)


Arch...the way it was meant to be !!

Offline

#13 2020-11-17 14:07:41

RoundCube
Member
Registered: 2016-05-14
Posts: 40

Re: How much space to allocate for the partitions

I have 50GB on my / partition and run always at the edge of free space. Making it 25 GB bigger wouldn't hurt if you have 1TB. (I have 1/4th), The pacman cache will be stored there, it's nice if one doesn't have to be greedy with it. When I was using android-studio it was also by default wanting to store plenty of images in /opt, quickly making up 15 GB (which was a much as all the rest of / together at that time)

Having a swap-partiton or a swap file is needed for hibernation – when hibernating the content of your RAM is written to this place on disk.

Also, to clarify in advance, / is the root partition, not /root.

Offline

#14 2020-11-17 14:13:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,627
Website

Re: How much space to allocate for the partitions

RoundCube, something is wrong with your system.  You could install 90% of all packages in the repos (which might not even be possible due to some of them conflicting) without going over 75GB.  Unless you're deliberatey installing every single one of the largest packages in the repos, it'd be hard to use that much space on the root partition unless you are 1) NEVER clearing you cache, or 2) you have logs growing out of control because your computer is screaming at you about a problem you are ignoring.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2020-11-17 14:31:45

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 510

Re: How much space to allocate for the partitions

^: pacman-contrib has now a systemd timer for paccache, to avoid having a giant cache, and if not systemd, you can use cron. smile
EDIT: Well, it's not that bad, just a "tiny" /

...

OP: There are many ways of structuring your system, but as always It depends on your setup and personal preferences.

Mine:

$ lsblk
NAME       MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda          8:0    0 931.5G  0 disk  
├─sda1       8:1    0  1007K  0 part # BIOS Boot partition, yep, I can survive an UEFI derp, and run memtest86+
├─sda2       8:2    0   256M  0 part  /media/ESP # The good o'l ESP, I'm currently doing an "experiment", that's why the different mountpoint, size of 256MiB is enough for what I trow in there (<64MiB used)
├─sda3       8:3    0    32G  0 part # This is a SWAP inside LUKS
│ └─swap   254:1    0    32G  0 crypt [SWAP] # ^
└─sda4       8:4    0 899.3G  0 part # This is BTRFS inside LUKS
  └─asgard 254:0    0 899.2G  0 crypt /var/cache/pacman/aur # ^, BTRFS has subvol mount, lsblk prints the last in the list of mountpoints, being the bind for my local aur repo

For booting, I like hybrid boot and the .efi in the fallback location /EFI/BOOT/BOOTX64.EFI, that way an UEFI derp will not kill me, and I can later add the entry with the edk2_shell so it looks pretty saying GRUB.

As for the large SWAP, I have some dd paranoia ok!? tongue
Now really, I have plans for a SWAP partition, and making swapfiles inside a multi device BTRFS is not doable, (according to the wiki) (since I have a plan of making my first RAID ever, when I have the chance)

Yet, again, that's up to what you want, nothing stops you from doing any sort of wacky setup that makes you have fun! smile (as long as it works!)

Last edited by GaKu999 (2020-11-17 14:36:13)


My reposSome snippets

Heisenberg might have been here.

Offline

#16 2020-11-17 14:33:28

RoundCube
Member
Registered: 2016-05-14
Posts: 40

Re: How much space to allocate for the partitions

No, I'm not at 75, currently 43. From that goes …
27  to /usr
4,4 to /opt
4,1 to /var/log - should indeed check why it's that much, journalctl would take max 2
3,2 to /var/cache
4,6 to /var/lib/anbox - typical case of one application wanting lot's of space (some android image lives there)

If I'd have more than 50 available, I could take the luxury and leaving 10 to pacmans cache, installing the cuda toolkit which might be the largest package in the repos, or just having space so coredumpctl does store more than the last 1-3 coredumps.

Offline

Board footer

Powered by FluxBB