Recommended size in percentage for each partition - Ubuntu 18.04 [closed]
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
1
down vote
favorite
Let's make it clean and simple. I've 4GB
of RAM
and 500GB
of HD
. What's the recommended size for swap
,root
,/boot
,/var
,/opt
,/home
,/usr
and other mount points.
NOTE: Size in percentage would be helpful to others with different configuration.
16.04 partitioning system-installation 18.04 swap
closed as primarily opinion-based by Byte Commander, Rinzwind, user535733, David Foerster, muru May 18 at 2:04
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
1
down vote
favorite
Let's make it clean and simple. I've 4GB
of RAM
and 500GB
of HD
. What's the recommended size for swap
,root
,/boot
,/var
,/opt
,/home
,/usr
and other mount points.
NOTE: Size in percentage would be helpful to others with different configuration.
16.04 partitioning system-installation 18.04 swap
closed as primarily opinion-based by Byte Commander, Rinzwind, user535733, David Foerster, muru May 18 at 2:04
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
2
Why would you like to split these all into separate partitions anyway? For home systems, one generally either allocates all as/
and uses a swap file on it these days, or allocates a smallswap
(e.g. 4GB, like RAM size) and the rest/
, or maybe separate/home
(remaining space) from/
(maybe 50 GB?). All these are just personal recommendations though, which might not be optimal for some use cases.
â Byte Commander
May 15 at 10:08
2
What is the use case for this machine? /var, /opt, /usr? Are you intending to use this as a server? If so: do not make any partitions and leave it with just "/". Partitions are only a hindrance on a server. If a home desktop: "/" and no "/home". Make a data partition and use that for personal data.
â Rinzwind
May 15 at 10:37
"recommended size" that does not exist since any partition needs the amount of space based on what YOU do with the system. I can live with 10Gb on / since my mysql and apache data are on a /discworld partition as my personal data from /home/dirs/ is.
â Rinzwind
May 15 at 10:43
bCommander and Rinzwind : I was just curious about the usage of the options specified in the installation wizard. I had lot of questions in my mind and most of them are answered by your response. Thank you so much. Peace.
â theapache64
May 15 at 19:52
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Let's make it clean and simple. I've 4GB
of RAM
and 500GB
of HD
. What's the recommended size for swap
,root
,/boot
,/var
,/opt
,/home
,/usr
and other mount points.
NOTE: Size in percentage would be helpful to others with different configuration.
16.04 partitioning system-installation 18.04 swap
Let's make it clean and simple. I've 4GB
of RAM
and 500GB
of HD
. What's the recommended size for swap
,root
,/boot
,/var
,/opt
,/home
,/usr
and other mount points.
NOTE: Size in percentage would be helpful to others with different configuration.
16.04 partitioning system-installation 18.04 swap
asked May 15 at 10:00
![](https://i.stack.imgur.com/tjPvY.png?s=32&g=1)
![](https://i.stack.imgur.com/tjPvY.png?s=32&g=1)
theapache64
2691413
2691413
closed as primarily opinion-based by Byte Commander, Rinzwind, user535733, David Foerster, muru May 18 at 2:04
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as primarily opinion-based by Byte Commander, Rinzwind, user535733, David Foerster, muru May 18 at 2:04
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
2
Why would you like to split these all into separate partitions anyway? For home systems, one generally either allocates all as/
and uses a swap file on it these days, or allocates a smallswap
(e.g. 4GB, like RAM size) and the rest/
, or maybe separate/home
(remaining space) from/
(maybe 50 GB?). All these are just personal recommendations though, which might not be optimal for some use cases.
â Byte Commander
May 15 at 10:08
2
What is the use case for this machine? /var, /opt, /usr? Are you intending to use this as a server? If so: do not make any partitions and leave it with just "/". Partitions are only a hindrance on a server. If a home desktop: "/" and no "/home". Make a data partition and use that for personal data.
â Rinzwind
May 15 at 10:37
"recommended size" that does not exist since any partition needs the amount of space based on what YOU do with the system. I can live with 10Gb on / since my mysql and apache data are on a /discworld partition as my personal data from /home/dirs/ is.
â Rinzwind
May 15 at 10:43
bCommander and Rinzwind : I was just curious about the usage of the options specified in the installation wizard. I had lot of questions in my mind and most of them are answered by your response. Thank you so much. Peace.
â theapache64
May 15 at 19:52
add a comment |Â
2
Why would you like to split these all into separate partitions anyway? For home systems, one generally either allocates all as/
and uses a swap file on it these days, or allocates a smallswap
(e.g. 4GB, like RAM size) and the rest/
, or maybe separate/home
(remaining space) from/
(maybe 50 GB?). All these are just personal recommendations though, which might not be optimal for some use cases.
â Byte Commander
May 15 at 10:08
2
What is the use case for this machine? /var, /opt, /usr? Are you intending to use this as a server? If so: do not make any partitions and leave it with just "/". Partitions are only a hindrance on a server. If a home desktop: "/" and no "/home". Make a data partition and use that for personal data.
â Rinzwind
May 15 at 10:37
"recommended size" that does not exist since any partition needs the amount of space based on what YOU do with the system. I can live with 10Gb on / since my mysql and apache data are on a /discworld partition as my personal data from /home/dirs/ is.
â Rinzwind
May 15 at 10:43
bCommander and Rinzwind : I was just curious about the usage of the options specified in the installation wizard. I had lot of questions in my mind and most of them are answered by your response. Thank you so much. Peace.
â theapache64
May 15 at 19:52
2
2
Why would you like to split these all into separate partitions anyway? For home systems, one generally either allocates all as
/
and uses a swap file on it these days, or allocates a small swap
(e.g. 4GB, like RAM size) and the rest /
, or maybe separate /home
(remaining space) from /
(maybe 50 GB?). All these are just personal recommendations though, which might not be optimal for some use cases.â Byte Commander
May 15 at 10:08
Why would you like to split these all into separate partitions anyway? For home systems, one generally either allocates all as
/
and uses a swap file on it these days, or allocates a small swap
(e.g. 4GB, like RAM size) and the rest /
, or maybe separate /home
(remaining space) from /
(maybe 50 GB?). All these are just personal recommendations though, which might not be optimal for some use cases.â Byte Commander
May 15 at 10:08
2
2
What is the use case for this machine? /var, /opt, /usr? Are you intending to use this as a server? If so: do not make any partitions and leave it with just "/". Partitions are only a hindrance on a server. If a home desktop: "/" and no "/home". Make a data partition and use that for personal data.
â Rinzwind
May 15 at 10:37
What is the use case for this machine? /var, /opt, /usr? Are you intending to use this as a server? If so: do not make any partitions and leave it with just "/". Partitions are only a hindrance on a server. If a home desktop: "/" and no "/home". Make a data partition and use that for personal data.
â Rinzwind
May 15 at 10:37
"recommended size" that does not exist since any partition needs the amount of space based on what YOU do with the system. I can live with 10Gb on / since my mysql and apache data are on a /discworld partition as my personal data from /home/dirs/ is.
â Rinzwind
May 15 at 10:43
"recommended size" that does not exist since any partition needs the amount of space based on what YOU do with the system. I can live with 10Gb on / since my mysql and apache data are on a /discworld partition as my personal data from /home/dirs/ is.
â Rinzwind
May 15 at 10:43
bCommander and Rinzwind : I was just curious about the usage of the options specified in the installation wizard. I had lot of questions in my mind and most of them are answered by your response. Thank you so much. Peace.
â theapache64
May 15 at 19:52
bCommander and Rinzwind : I was just curious about the usage of the options specified in the installation wizard. I had lot of questions in my mind and most of them are answered by your response. Thank you so much. Peace.
â theapache64
May 15 at 19:52
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
There's no hard and fast rule for this, just rules of thumb. Like a lot of others have said, it is truly based on what you will do with this system. There are also a lot of filesystem options. For the most part, stick with ext4.
Here's some of the other options:
ZFS - Originally developed for Solaris, later ported to BSD and
Linux. This is typically used in servers with RAID setups, like
FreeNAS (FreeBSD-based). Has advanced file system features,
de-duplication (very RAM heavy) and copy-on-write (CoW). There were
some licensing issues that were recently ironed out. Not currently
recommended (2018).JFS - Originally developed for IBM's AIX, and later ported to Linux.
It was a journaling file system before ext4 entered wide use.
According to RedHat, it has not seen active development for a decade,
and they plan to remove the modules for it at some point in the very
near future.XFS - Originally developed for SGI's IRIX, later ported to Linux.
At one time, Fedora installs recommended it. While better for
large media files, it has some downsides in that it cannot shrink,
nor does it gracefully handle power outages.ReiserFS - A series of file system by Hans Reiser. It is now abandoned. Don't use, although it did handle small files efficiently.
vFat or FAT32 - 2GB file limitation, 2TB partition limit (limited to 32GB in Windows), although larger partition sizes will suffer from wasted slack space when used with many small files.
NTFS or ntfs-3g - Windows NTFS. Good for cross-platform file transfer. Some overhead is incurred by writing to NTFS volumes.
FFS - BSD Fast File System (ReadOnly). Hopefully you will not run across one of these. Available purely for compatibility purposes. If you do run into this, it can be in 'dangerously dedicated mode', i.e. no disklabel. FFS handles partitioning (slices) internally. [note: that dangerously dedicated mode has been discouraged since at least 1999]. I believe most *BSD systems have transitioned over to ZFS, and can boot from it now (as of FBSD 8). FFS/UFS support is deprecated has been removed from modern kernels.
swap
In the really early Linux days, it was recommended that swap be 2x system memory. But in those days, the system memory was 4 to 8MB. Now, you can easily set it to 50% to 175% of system memory. You'll want more than system memory if you hibernate. Some users - especially those with single SSD drives forgo swap entirely to lengthen the life of the SSD.
boot
For historical reasons, a separate boot partition was created to get around the first BIOS limitations - first a 128MiB limit, then a 512MiB limit, then a 2048MiB (2GiB) limit, and so on. If you are setting up Linux on obsolete hardware, you'll want to keep this in mind. Also, obsolete Linux will typically require ext3 instead of ext4.
Additionally, if your OS drive will be encrypted, then you'll require a separate boot partition. Otherwise, no.
opt or app
The home of externally installed software. Only use this if a vendor requires it. FWIW, Lately, I've been seeing a lot of vendors symlink opt to app (and vice-versa)
var
In the old days, for performance reasons, you'd want this mounted with a ReiserFS filesystem (small text file efficient) with noatime set so that logging functions would not have to bother with updating the access time after every single log file write. I recommend sticking with ext4 over ReiserFS now, and the noatime speed boost is negligible compared to the additional complexity of maintaining yet another filesystem. If you absolutely insist - 5GiB to 10GiB. You'll need enough to download the debs/rpms/ypkg that you'll need to upgrade the system. Contents of /var are very important, as you'll usually have the package database here. Lose that, and you will spend a great deal of time recovering from it. Also your logs and your print spool is here, and possibly database information and website, so bump the above number accordingly.
tmp
I would not split this out anymore. 512MiB to 2GiB tops.
usr
Personally I find no benefit to splitting this out anymore. If you really want to, and your OS takes up about about 10 to 15GiB, you'll probably want at least 30 to 35GiB of space in case you need to do a system upgrade.
root
I would go no smaller than 10GiB if you split everything else out. If you don't, just add those other sizes back into the previously mentioned 10GiB minimum.
home
Just give it all that is left.
disklabel
One last thing to mention is the disklabel. If the disk is in a machine with BIOS, you must use the MS-DOS disklabel, complete with the 4 partition limit (extended partitions help with this), and one of the requirements is that /boot or / exist as a primary partition has been marked as bootable. You can also use a MSDOS disklabel if you have EFI with CSM modules enabled.
Otherwise, you should use GPT with an EFI enabled bootloader.
I'm not so knowledgeable on bootloaders and disklabels, so feel free to correct me.
TL;DR
Not giving percentages because the sizes of OS requirements don't typically change that much from generation to generation.
swap - 0% to 200% of system memory.
/boot - if needed, 2.5GiB or less.
/opt - only if explicitly needed. Size as req'd
/app - same as opt
/var - only if needed, 5 to 10GiB
/tmp - put it on root, otherwise 512MiB to 2.5GiB
/usr - put it on root, otherwise 35 to 40GiB
/ - (root) 10GiB min (if other parts used), otherwise 65GiB
/home - Whatever is left
add a comment |Â
up vote
4
down vote
seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your /
partition,swap
area and /home
partition and if there's requirement then the /boot
. and this is totally fine. no need to have so many separate partitions.
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
There's no hard and fast rule for this, just rules of thumb. Like a lot of others have said, it is truly based on what you will do with this system. There are also a lot of filesystem options. For the most part, stick with ext4.
Here's some of the other options:
ZFS - Originally developed for Solaris, later ported to BSD and
Linux. This is typically used in servers with RAID setups, like
FreeNAS (FreeBSD-based). Has advanced file system features,
de-duplication (very RAM heavy) and copy-on-write (CoW). There were
some licensing issues that were recently ironed out. Not currently
recommended (2018).JFS - Originally developed for IBM's AIX, and later ported to Linux.
It was a journaling file system before ext4 entered wide use.
According to RedHat, it has not seen active development for a decade,
and they plan to remove the modules for it at some point in the very
near future.XFS - Originally developed for SGI's IRIX, later ported to Linux.
At one time, Fedora installs recommended it. While better for
large media files, it has some downsides in that it cannot shrink,
nor does it gracefully handle power outages.ReiserFS - A series of file system by Hans Reiser. It is now abandoned. Don't use, although it did handle small files efficiently.
vFat or FAT32 - 2GB file limitation, 2TB partition limit (limited to 32GB in Windows), although larger partition sizes will suffer from wasted slack space when used with many small files.
NTFS or ntfs-3g - Windows NTFS. Good for cross-platform file transfer. Some overhead is incurred by writing to NTFS volumes.
FFS - BSD Fast File System (ReadOnly). Hopefully you will not run across one of these. Available purely for compatibility purposes. If you do run into this, it can be in 'dangerously dedicated mode', i.e. no disklabel. FFS handles partitioning (slices) internally. [note: that dangerously dedicated mode has been discouraged since at least 1999]. I believe most *BSD systems have transitioned over to ZFS, and can boot from it now (as of FBSD 8). FFS/UFS support is deprecated has been removed from modern kernels.
swap
In the really early Linux days, it was recommended that swap be 2x system memory. But in those days, the system memory was 4 to 8MB. Now, you can easily set it to 50% to 175% of system memory. You'll want more than system memory if you hibernate. Some users - especially those with single SSD drives forgo swap entirely to lengthen the life of the SSD.
boot
For historical reasons, a separate boot partition was created to get around the first BIOS limitations - first a 128MiB limit, then a 512MiB limit, then a 2048MiB (2GiB) limit, and so on. If you are setting up Linux on obsolete hardware, you'll want to keep this in mind. Also, obsolete Linux will typically require ext3 instead of ext4.
Additionally, if your OS drive will be encrypted, then you'll require a separate boot partition. Otherwise, no.
opt or app
The home of externally installed software. Only use this if a vendor requires it. FWIW, Lately, I've been seeing a lot of vendors symlink opt to app (and vice-versa)
var
In the old days, for performance reasons, you'd want this mounted with a ReiserFS filesystem (small text file efficient) with noatime set so that logging functions would not have to bother with updating the access time after every single log file write. I recommend sticking with ext4 over ReiserFS now, and the noatime speed boost is negligible compared to the additional complexity of maintaining yet another filesystem. If you absolutely insist - 5GiB to 10GiB. You'll need enough to download the debs/rpms/ypkg that you'll need to upgrade the system. Contents of /var are very important, as you'll usually have the package database here. Lose that, and you will spend a great deal of time recovering from it. Also your logs and your print spool is here, and possibly database information and website, so bump the above number accordingly.
tmp
I would not split this out anymore. 512MiB to 2GiB tops.
usr
Personally I find no benefit to splitting this out anymore. If you really want to, and your OS takes up about about 10 to 15GiB, you'll probably want at least 30 to 35GiB of space in case you need to do a system upgrade.
root
I would go no smaller than 10GiB if you split everything else out. If you don't, just add those other sizes back into the previously mentioned 10GiB minimum.
home
Just give it all that is left.
disklabel
One last thing to mention is the disklabel. If the disk is in a machine with BIOS, you must use the MS-DOS disklabel, complete with the 4 partition limit (extended partitions help with this), and one of the requirements is that /boot or / exist as a primary partition has been marked as bootable. You can also use a MSDOS disklabel if you have EFI with CSM modules enabled.
Otherwise, you should use GPT with an EFI enabled bootloader.
I'm not so knowledgeable on bootloaders and disklabels, so feel free to correct me.
TL;DR
Not giving percentages because the sizes of OS requirements don't typically change that much from generation to generation.
swap - 0% to 200% of system memory.
/boot - if needed, 2.5GiB or less.
/opt - only if explicitly needed. Size as req'd
/app - same as opt
/var - only if needed, 5 to 10GiB
/tmp - put it on root, otherwise 512MiB to 2.5GiB
/usr - put it on root, otherwise 35 to 40GiB
/ - (root) 10GiB min (if other parts used), otherwise 65GiB
/home - Whatever is left
add a comment |Â
up vote
1
down vote
accepted
There's no hard and fast rule for this, just rules of thumb. Like a lot of others have said, it is truly based on what you will do with this system. There are also a lot of filesystem options. For the most part, stick with ext4.
Here's some of the other options:
ZFS - Originally developed for Solaris, later ported to BSD and
Linux. This is typically used in servers with RAID setups, like
FreeNAS (FreeBSD-based). Has advanced file system features,
de-duplication (very RAM heavy) and copy-on-write (CoW). There were
some licensing issues that were recently ironed out. Not currently
recommended (2018).JFS - Originally developed for IBM's AIX, and later ported to Linux.
It was a journaling file system before ext4 entered wide use.
According to RedHat, it has not seen active development for a decade,
and they plan to remove the modules for it at some point in the very
near future.XFS - Originally developed for SGI's IRIX, later ported to Linux.
At one time, Fedora installs recommended it. While better for
large media files, it has some downsides in that it cannot shrink,
nor does it gracefully handle power outages.ReiserFS - A series of file system by Hans Reiser. It is now abandoned. Don't use, although it did handle small files efficiently.
vFat or FAT32 - 2GB file limitation, 2TB partition limit (limited to 32GB in Windows), although larger partition sizes will suffer from wasted slack space when used with many small files.
NTFS or ntfs-3g - Windows NTFS. Good for cross-platform file transfer. Some overhead is incurred by writing to NTFS volumes.
FFS - BSD Fast File System (ReadOnly). Hopefully you will not run across one of these. Available purely for compatibility purposes. If you do run into this, it can be in 'dangerously dedicated mode', i.e. no disklabel. FFS handles partitioning (slices) internally. [note: that dangerously dedicated mode has been discouraged since at least 1999]. I believe most *BSD systems have transitioned over to ZFS, and can boot from it now (as of FBSD 8). FFS/UFS support is deprecated has been removed from modern kernels.
swap
In the really early Linux days, it was recommended that swap be 2x system memory. But in those days, the system memory was 4 to 8MB. Now, you can easily set it to 50% to 175% of system memory. You'll want more than system memory if you hibernate. Some users - especially those with single SSD drives forgo swap entirely to lengthen the life of the SSD.
boot
For historical reasons, a separate boot partition was created to get around the first BIOS limitations - first a 128MiB limit, then a 512MiB limit, then a 2048MiB (2GiB) limit, and so on. If you are setting up Linux on obsolete hardware, you'll want to keep this in mind. Also, obsolete Linux will typically require ext3 instead of ext4.
Additionally, if your OS drive will be encrypted, then you'll require a separate boot partition. Otherwise, no.
opt or app
The home of externally installed software. Only use this if a vendor requires it. FWIW, Lately, I've been seeing a lot of vendors symlink opt to app (and vice-versa)
var
In the old days, for performance reasons, you'd want this mounted with a ReiserFS filesystem (small text file efficient) with noatime set so that logging functions would not have to bother with updating the access time after every single log file write. I recommend sticking with ext4 over ReiserFS now, and the noatime speed boost is negligible compared to the additional complexity of maintaining yet another filesystem. If you absolutely insist - 5GiB to 10GiB. You'll need enough to download the debs/rpms/ypkg that you'll need to upgrade the system. Contents of /var are very important, as you'll usually have the package database here. Lose that, and you will spend a great deal of time recovering from it. Also your logs and your print spool is here, and possibly database information and website, so bump the above number accordingly.
tmp
I would not split this out anymore. 512MiB to 2GiB tops.
usr
Personally I find no benefit to splitting this out anymore. If you really want to, and your OS takes up about about 10 to 15GiB, you'll probably want at least 30 to 35GiB of space in case you need to do a system upgrade.
root
I would go no smaller than 10GiB if you split everything else out. If you don't, just add those other sizes back into the previously mentioned 10GiB minimum.
home
Just give it all that is left.
disklabel
One last thing to mention is the disklabel. If the disk is in a machine with BIOS, you must use the MS-DOS disklabel, complete with the 4 partition limit (extended partitions help with this), and one of the requirements is that /boot or / exist as a primary partition has been marked as bootable. You can also use a MSDOS disklabel if you have EFI with CSM modules enabled.
Otherwise, you should use GPT with an EFI enabled bootloader.
I'm not so knowledgeable on bootloaders and disklabels, so feel free to correct me.
TL;DR
Not giving percentages because the sizes of OS requirements don't typically change that much from generation to generation.
swap - 0% to 200% of system memory.
/boot - if needed, 2.5GiB or less.
/opt - only if explicitly needed. Size as req'd
/app - same as opt
/var - only if needed, 5 to 10GiB
/tmp - put it on root, otherwise 512MiB to 2.5GiB
/usr - put it on root, otherwise 35 to 40GiB
/ - (root) 10GiB min (if other parts used), otherwise 65GiB
/home - Whatever is left
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
There's no hard and fast rule for this, just rules of thumb. Like a lot of others have said, it is truly based on what you will do with this system. There are also a lot of filesystem options. For the most part, stick with ext4.
Here's some of the other options:
ZFS - Originally developed for Solaris, later ported to BSD and
Linux. This is typically used in servers with RAID setups, like
FreeNAS (FreeBSD-based). Has advanced file system features,
de-duplication (very RAM heavy) and copy-on-write (CoW). There were
some licensing issues that were recently ironed out. Not currently
recommended (2018).JFS - Originally developed for IBM's AIX, and later ported to Linux.
It was a journaling file system before ext4 entered wide use.
According to RedHat, it has not seen active development for a decade,
and they plan to remove the modules for it at some point in the very
near future.XFS - Originally developed for SGI's IRIX, later ported to Linux.
At one time, Fedora installs recommended it. While better for
large media files, it has some downsides in that it cannot shrink,
nor does it gracefully handle power outages.ReiserFS - A series of file system by Hans Reiser. It is now abandoned. Don't use, although it did handle small files efficiently.
vFat or FAT32 - 2GB file limitation, 2TB partition limit (limited to 32GB in Windows), although larger partition sizes will suffer from wasted slack space when used with many small files.
NTFS or ntfs-3g - Windows NTFS. Good for cross-platform file transfer. Some overhead is incurred by writing to NTFS volumes.
FFS - BSD Fast File System (ReadOnly). Hopefully you will not run across one of these. Available purely for compatibility purposes. If you do run into this, it can be in 'dangerously dedicated mode', i.e. no disklabel. FFS handles partitioning (slices) internally. [note: that dangerously dedicated mode has been discouraged since at least 1999]. I believe most *BSD systems have transitioned over to ZFS, and can boot from it now (as of FBSD 8). FFS/UFS support is deprecated has been removed from modern kernels.
swap
In the really early Linux days, it was recommended that swap be 2x system memory. But in those days, the system memory was 4 to 8MB. Now, you can easily set it to 50% to 175% of system memory. You'll want more than system memory if you hibernate. Some users - especially those with single SSD drives forgo swap entirely to lengthen the life of the SSD.
boot
For historical reasons, a separate boot partition was created to get around the first BIOS limitations - first a 128MiB limit, then a 512MiB limit, then a 2048MiB (2GiB) limit, and so on. If you are setting up Linux on obsolete hardware, you'll want to keep this in mind. Also, obsolete Linux will typically require ext3 instead of ext4.
Additionally, if your OS drive will be encrypted, then you'll require a separate boot partition. Otherwise, no.
opt or app
The home of externally installed software. Only use this if a vendor requires it. FWIW, Lately, I've been seeing a lot of vendors symlink opt to app (and vice-versa)
var
In the old days, for performance reasons, you'd want this mounted with a ReiserFS filesystem (small text file efficient) with noatime set so that logging functions would not have to bother with updating the access time after every single log file write. I recommend sticking with ext4 over ReiserFS now, and the noatime speed boost is negligible compared to the additional complexity of maintaining yet another filesystem. If you absolutely insist - 5GiB to 10GiB. You'll need enough to download the debs/rpms/ypkg that you'll need to upgrade the system. Contents of /var are very important, as you'll usually have the package database here. Lose that, and you will spend a great deal of time recovering from it. Also your logs and your print spool is here, and possibly database information and website, so bump the above number accordingly.
tmp
I would not split this out anymore. 512MiB to 2GiB tops.
usr
Personally I find no benefit to splitting this out anymore. If you really want to, and your OS takes up about about 10 to 15GiB, you'll probably want at least 30 to 35GiB of space in case you need to do a system upgrade.
root
I would go no smaller than 10GiB if you split everything else out. If you don't, just add those other sizes back into the previously mentioned 10GiB minimum.
home
Just give it all that is left.
disklabel
One last thing to mention is the disklabel. If the disk is in a machine with BIOS, you must use the MS-DOS disklabel, complete with the 4 partition limit (extended partitions help with this), and one of the requirements is that /boot or / exist as a primary partition has been marked as bootable. You can also use a MSDOS disklabel if you have EFI with CSM modules enabled.
Otherwise, you should use GPT with an EFI enabled bootloader.
I'm not so knowledgeable on bootloaders and disklabels, so feel free to correct me.
TL;DR
Not giving percentages because the sizes of OS requirements don't typically change that much from generation to generation.
swap - 0% to 200% of system memory.
/boot - if needed, 2.5GiB or less.
/opt - only if explicitly needed. Size as req'd
/app - same as opt
/var - only if needed, 5 to 10GiB
/tmp - put it on root, otherwise 512MiB to 2.5GiB
/usr - put it on root, otherwise 35 to 40GiB
/ - (root) 10GiB min (if other parts used), otherwise 65GiB
/home - Whatever is left
There's no hard and fast rule for this, just rules of thumb. Like a lot of others have said, it is truly based on what you will do with this system. There are also a lot of filesystem options. For the most part, stick with ext4.
Here's some of the other options:
ZFS - Originally developed for Solaris, later ported to BSD and
Linux. This is typically used in servers with RAID setups, like
FreeNAS (FreeBSD-based). Has advanced file system features,
de-duplication (very RAM heavy) and copy-on-write (CoW). There were
some licensing issues that were recently ironed out. Not currently
recommended (2018).JFS - Originally developed for IBM's AIX, and later ported to Linux.
It was a journaling file system before ext4 entered wide use.
According to RedHat, it has not seen active development for a decade,
and they plan to remove the modules for it at some point in the very
near future.XFS - Originally developed for SGI's IRIX, later ported to Linux.
At one time, Fedora installs recommended it. While better for
large media files, it has some downsides in that it cannot shrink,
nor does it gracefully handle power outages.ReiserFS - A series of file system by Hans Reiser. It is now abandoned. Don't use, although it did handle small files efficiently.
vFat or FAT32 - 2GB file limitation, 2TB partition limit (limited to 32GB in Windows), although larger partition sizes will suffer from wasted slack space when used with many small files.
NTFS or ntfs-3g - Windows NTFS. Good for cross-platform file transfer. Some overhead is incurred by writing to NTFS volumes.
FFS - BSD Fast File System (ReadOnly). Hopefully you will not run across one of these. Available purely for compatibility purposes. If you do run into this, it can be in 'dangerously dedicated mode', i.e. no disklabel. FFS handles partitioning (slices) internally. [note: that dangerously dedicated mode has been discouraged since at least 1999]. I believe most *BSD systems have transitioned over to ZFS, and can boot from it now (as of FBSD 8). FFS/UFS support is deprecated has been removed from modern kernels.
swap
In the really early Linux days, it was recommended that swap be 2x system memory. But in those days, the system memory was 4 to 8MB. Now, you can easily set it to 50% to 175% of system memory. You'll want more than system memory if you hibernate. Some users - especially those with single SSD drives forgo swap entirely to lengthen the life of the SSD.
boot
For historical reasons, a separate boot partition was created to get around the first BIOS limitations - first a 128MiB limit, then a 512MiB limit, then a 2048MiB (2GiB) limit, and so on. If you are setting up Linux on obsolete hardware, you'll want to keep this in mind. Also, obsolete Linux will typically require ext3 instead of ext4.
Additionally, if your OS drive will be encrypted, then you'll require a separate boot partition. Otherwise, no.
opt or app
The home of externally installed software. Only use this if a vendor requires it. FWIW, Lately, I've been seeing a lot of vendors symlink opt to app (and vice-versa)
var
In the old days, for performance reasons, you'd want this mounted with a ReiserFS filesystem (small text file efficient) with noatime set so that logging functions would not have to bother with updating the access time after every single log file write. I recommend sticking with ext4 over ReiserFS now, and the noatime speed boost is negligible compared to the additional complexity of maintaining yet another filesystem. If you absolutely insist - 5GiB to 10GiB. You'll need enough to download the debs/rpms/ypkg that you'll need to upgrade the system. Contents of /var are very important, as you'll usually have the package database here. Lose that, and you will spend a great deal of time recovering from it. Also your logs and your print spool is here, and possibly database information and website, so bump the above number accordingly.
tmp
I would not split this out anymore. 512MiB to 2GiB tops.
usr
Personally I find no benefit to splitting this out anymore. If you really want to, and your OS takes up about about 10 to 15GiB, you'll probably want at least 30 to 35GiB of space in case you need to do a system upgrade.
root
I would go no smaller than 10GiB if you split everything else out. If you don't, just add those other sizes back into the previously mentioned 10GiB minimum.
home
Just give it all that is left.
disklabel
One last thing to mention is the disklabel. If the disk is in a machine with BIOS, you must use the MS-DOS disklabel, complete with the 4 partition limit (extended partitions help with this), and one of the requirements is that /boot or / exist as a primary partition has been marked as bootable. You can also use a MSDOS disklabel if you have EFI with CSM modules enabled.
Otherwise, you should use GPT with an EFI enabled bootloader.
I'm not so knowledgeable on bootloaders and disklabels, so feel free to correct me.
TL;DR
Not giving percentages because the sizes of OS requirements don't typically change that much from generation to generation.
swap - 0% to 200% of system memory.
/boot - if needed, 2.5GiB or less.
/opt - only if explicitly needed. Size as req'd
/app - same as opt
/var - only if needed, 5 to 10GiB
/tmp - put it on root, otherwise 512MiB to 2.5GiB
/usr - put it on root, otherwise 35 to 40GiB
/ - (root) 10GiB min (if other parts used), otherwise 65GiB
/home - Whatever is left
edited May 16 at 14:04
answered May 15 at 19:26
The Dude
35417
35417
add a comment |Â
add a comment |Â
up vote
4
down vote
seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your /
partition,swap
area and /home
partition and if there's requirement then the /boot
. and this is totally fine. no need to have so many separate partitions.
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
add a comment |Â
up vote
4
down vote
seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your /
partition,swap
area and /home
partition and if there's requirement then the /boot
. and this is totally fine. no need to have so many separate partitions.
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
add a comment |Â
up vote
4
down vote
up vote
4
down vote
seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your /
partition,swap
area and /home
partition and if there's requirement then the /boot
. and this is totally fine. no need to have so many separate partitions.
seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your /
partition,swap
area and /home
partition and if there's requirement then the /boot
. and this is totally fine. no need to have so many separate partitions.
answered May 15 at 18:28
![](https://i.stack.imgur.com/y2mRx.jpg?s=32&g=1)
![](https://i.stack.imgur.com/y2mRx.jpg?s=32&g=1)
Mahesh
413
413
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
add a comment |Â
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
I personally use this scheme myself as it makes it easier to do a fresh install or OS switch - no backing up home required. Only catch is your user folder may have to be moved (or a different username used) or you might not be able to log into your desktop. Causes of this can vary from the obvious (encryption of the home directory, user id mismatch), to the obscure (changes in the .gnome/.kde/.local files prevent login from completely succeeding, desktop crashes, etc...)
â The Dude
May 16 at 13:49
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
good to hear that. and surely, the user folder freaks me out too!
â Mahesh
May 16 at 17:39
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
When I have trouble logging into my desktop (no window manager, no window chrome, crash to lightdm/gdm3), it almost always stems from trying to use a different distro's user folder. Except with this last upgrade from 17.10 to 18.04 I had the same problem. I resolved it for myself by switching from lightdm to gdm3. I guess gnome has so many hard systemd dependencies, just using lightdm to log in doesn't do enough systemd-logind-whateverd setup for Gnome. (This version of Ubuntu hasn't had a fresh install since 'precise' or 12.10)
â The Dude
May 17 at 19:10
add a comment |Â
2
Why would you like to split these all into separate partitions anyway? For home systems, one generally either allocates all as
/
and uses a swap file on it these days, or allocates a smallswap
(e.g. 4GB, like RAM size) and the rest/
, or maybe separate/home
(remaining space) from/
(maybe 50 GB?). All these are just personal recommendations though, which might not be optimal for some use cases.â Byte Commander
May 15 at 10:08
2
What is the use case for this machine? /var, /opt, /usr? Are you intending to use this as a server? If so: do not make any partitions and leave it with just "/". Partitions are only a hindrance on a server. If a home desktop: "/" and no "/home". Make a data partition and use that for personal data.
â Rinzwind
May 15 at 10:37
"recommended size" that does not exist since any partition needs the amount of space based on what YOU do with the system. I can live with 10Gb on / since my mysql and apache data are on a /discworld partition as my personal data from /home/dirs/ is.
â Rinzwind
May 15 at 10:43
bCommander and Rinzwind : I was just curious about the usage of the options specified in the installation wizard. I had lot of questions in my mind and most of them are answered by your response. Thank you so much. Peace.
â theapache64
May 15 at 19:52