Partitioning a system drive when installing a Linux desktop distribution
Linux is the most “generous” desktop OS in terms of selecting file systems and their use. It is foolish not to use such a resource, because with a skillful approach, we can make our system faster and safer.
So, as an unworthy try-unixoid, we dismiss the sentence "saw the disk in one piece", which clearly grows from the win-world. We have our own ideas here, what to build and where to dig.
However, first you need to determine how this PC will be used after installing the system on it. The markup tactics for the workstation are markedly different from the markup tactics for the server. Next, I will indicate the preferred settings for my home semi-headless server - a kind of intermediate option, and in the note - more optimal parameters for a (possible) highly specialized solution.
The final list of sections and their sizes are approximately as follows-
Let's see if this is optimal enough?
I believe that more than. First of all - the sections are not "too much" - they are just right. Let's go through them in more detail: A completely obvious step for those who are not going to day and night to compile new variants of the kernel of the system and experiment with bootloaders. Pay attention to the TYPE - ext2 - using the "old" format will avoid any possible problems with any bootloader. It makes sense to place on an independent primary section.
SWAP aka swap area is usually recommended to set the size of twice the size of RAM, but with a sufficient number of 1.5 multiplier would be more appropriate. In extreme cases, we can always select another swap area on any drive and connect it to the system. The total effect of 2 areas on the
And here is another frequently encountered advice - “refuse the swap file” I can’t call reasonable. In the event of an unforeseen situation, “saving” a gigabyte of hard drive can be very expensive.
Once again, I pay attention to the TYPE - swap and the absence of a mount point - the swap section does not need it.
We place it on the extended partition along with the other partitions. This, as can be seen from the mount point, is the root (or root) of our file system. All directories necessary for the system that have not received our own partitions from us will be placed here. Including directories with installed programs and updates. And again to the file system type - ext3
Is a journaling version of ext2 that provides faster verification in the event of a previous PC crash. Believe me, when I write “faster” - I mean “VERY fast compared to ext2”. Choose this type of file system if you do not know what to take.
PS. “Journaled” is not a synonym for “redundant”. The file system journal is used by it for its own needs (if you are interested - for the consistency of referential integrity), the system wanted to sneeze at your data. Hence the completely logical rule - if you want to do well - do it yourself! Make backups yourself.
No, this is not a typo. There really is (so far) nothing. Actually, you may not have to create this section, but in this case you will not be able to assess the silkiness and relevance of the laid straw :). The location of our NS is also very remarkable - after root and before home - if one of the sections starts to grow rapidly - you can double it without any problems.
Most likely this is enough for you.
PS. Although I would recommend spending NZ gradually, it’s not as fun to expand the partition with capturing empty space as redistributing the space between two adjacent adjacent ones. I'm not talking about the potential insecurity of moving the walls that someone is sitting at :).
Oh, we have already reached our "hamster"! The home section, as the name implies, gives shelter to all personal user directories, with their, users, pictures, documents and other simple belongings. In addition, the user's personal "folder" contains a variety of settings and other and other. Hence, quite logical arithmetic - for each user it is worth allotting 8-10G places. If you are going to actively use the system in collaboration with someone else - lay down more places than my 10G.
PS. Not that it’s not obvious, but just in case, I remind you that when you create an ftp server on your PC, the FTP “user” will also settle in the same section, he, just like you, will need a place for the upload, download directories and that You will come up with it there. It makes sense to ponder this question in advance. Or "expand" the directory by mounting any separate hard disk in the place / home / ftp / upload if you are hard-pressed to exchange something.
PPS I hope for your prudence, but still I can not help but draw your attention to the obvious fact that ... the / home directory is the most valuable partYour hard drive. Make backups. Entirely or selectively, all files or only certain documents, but backups are needed. Recovering “dead” tracks is nothing compared to trying again to type two or three hundred pages on some not very interesting topic.
PPPS It is obvious that the phrase “make backups” means:
So we got to the last (in my humble opinion) mandatory section of our system. A rather strange directory is actually quite ordinary - there are all kinds of logs / log, the / tmp directory, the / www directory containing documents and scripts of your possible server and the / lib directory in which, for example, your MySQL database files are located. If you definitely do not plan to make a public server with an active load - you can halve the 10G I have proposed - most likely there will be no problems.
By adhering to such a plan in disk layout during the installation of Linux, you can significantly save time on subsequent system maintenance and, moreover, on its recovery if an accident visits your home.
"-And what about the rest xxxxG on my huge drive?" - you ask. Make another section and place your favorite movies, music or anything else on it.
Prepared using pod2html .
UP. To everyone whom the thought of breaking into “horror” of 4-5 sections is so jarring:
1) It is only necessary to make the division into sections once, when installing the system. You do not need to mount directories each time you boot. I don’t understand what is bothering you.
2) So far I have not heard of the tax on “extra sections”. I see no reason to make partitions smaller than I would like.
So, as an unworthy try-unixoid, we dismiss the sentence "saw the disk in one piece", which clearly grows from the win-world. We have our own ideas here, what to build and where to dig.
However, first you need to determine how this PC will be used after installing the system on it. The markup tactics for the workstation are markedly different from the markup tactics for the server. Next, I will indicate the preferred settings for my home semi-headless server - a kind of intermediate option, and in the note - more optimal parameters for a (possible) highly specialized solution.
The final list of sections and their sizes are approximately as follows-
File system Size Type mounted on / dev / hda1 100M ext2 / boot / dev / hda2 980M swap {none} / dev / hda3 10G ext3 / / dev / hda4 10G {none} {none} / dev / hda5 10G ext3 / home / dev / hda6 10G ext3 / var
Let's see if this is optimal enough?
I believe that more than. First of all - the sections are not "too much" - they are just right. Let's go through them in more detail: A completely obvious step for those who are not going to day and night to compile new variants of the kernel of the system and experiment with bootloaders. Pay attention to the TYPE - ext2 - using the "old" format will avoid any possible problems with any bootloader. It makes sense to place on an independent primary section.
/dev/hda1 100M ext2 /boot
/dev/hda2 980M swap {none}
SWAP aka swap area is usually recommended to set the size of twice the size of RAM, but with a sufficient number of 1.5 multiplier would be more appropriate. In extreme cases, we can always select another swap area on any drive and connect it to the system. The total effect of 2 areas on the
разных
disks will be greater than one large area on one disk, especially the system one. By the way, if you plan to run something actively using memory, the most correct strategy is to immediately place the swap area on a different drive than the system one. This advice is often found and it is quite reasonable.And here is another frequently encountered advice - “refuse the swap file” I can’t call reasonable. In the event of an unforeseen situation, “saving” a gigabyte of hard drive can be very expensive.
Once again, I pay attention to the TYPE - swap and the absence of a mount point - the swap section does not need it.
We place it on the extended partition along with the other partitions. This, as can be seen from the mount point, is the root (or root) of our file system. All directories necessary for the system that have not received our own partitions from us will be placed here. Including directories with installed programs and updates. And again to the file system type - ext3
/dev/hda3 10G ext3 /
Is a journaling version of ext2 that provides faster verification in the event of a previous PC crash. Believe me, when I write “faster” - I mean “VERY fast compared to ext2”. Choose this type of file system if you do not know what to take.
PS. “Journaled” is not a synonym for “redundant”. The file system journal is used by it for its own needs (if you are interested - for the consistency of referential integrity), the system wanted to sneeze at your data. Hence the completely logical rule - if you want to do well - do it yourself! Make backups yourself.
/dev/hda4 10G {none} {none}
No, this is not a typo. There really is (so far) nothing. Actually, you may not have to create this section, but in this case you will not be able to assess the silkiness and relevance of the laid straw :). The location of our NS is also very remarkable - after root and before home - if one of the sections starts to grow rapidly - you can double it without any problems.
Most likely this is enough for you.
PS. Although I would recommend spending NZ gradually, it’s not as fun to expand the partition with capturing empty space as redistributing the space between two adjacent adjacent ones. I'm not talking about the potential insecurity of moving the walls that someone is sitting at :).
/dev/hda5 10G ext3 /home
Oh, we have already reached our "hamster"! The home section, as the name implies, gives shelter to all personal user directories, with their, users, pictures, documents and other simple belongings. In addition, the user's personal "folder" contains a variety of settings and other and other. Hence, quite logical arithmetic - for each user it is worth allotting 8-10G places. If you are going to actively use the system in collaboration with someone else - lay down more places than my 10G.
PS. Not that it’s not obvious, but just in case, I remind you that when you create an ftp server on your PC, the FTP “user” will also settle in the same section, he, just like you, will need a place for the upload, download directories and that You will come up with it there. It makes sense to ponder this question in advance. Or "expand" the directory by mounting any separate hard disk in the place / home / ftp / upload if you are hard-pressed to exchange something.
PPS I hope for your prudence, but still I can not help but draw your attention to the obvious fact that ... the / home directory is the most valuable partYour hard drive. Make backups. Entirely or selectively, all files or only certain documents, but backups are needed. Recovering “dead” tracks is nothing compared to trying again to type two or three hundred pages on some not very interesting topic.
PPPS It is obvious that the phrase “make backups” means:
- regularity of their creation on schedule.
Computers, unlike people, almost do not suffer from laziness. Just admit that he is more disciplined than you and instruct him to keep track of your schedule once given. - the multiplicity of their creation.
Good tactics are at least 2 additional storage places for your essay or whatever you have there. - distribution of their location.
Putting an archive with a file in the same directory is a bad idea. Thunders who settled overnight on your hard drive are equally good hamsters and text documents, and binary archives. Put the backup on a physically different drive. On a flash drive. On cd. Learn to use Dropbox. Can you? Well, then teach me how to use it :)
The measures listed are the minimum level of security for the safety of your information! Minimal means "nowhere below." Be aware of this before your doctorate in English retreats to the digital forefathers.
/dev/hda6 10G ext3 /var
So we got to the last (in my humble opinion) mandatory section of our system. A rather strange directory is actually quite ordinary - there are all kinds of logs / log, the / tmp directory, the / www directory containing documents and scripts of your possible server and the / lib directory in which, for example, your MySQL database files are located. If you definitely do not plan to make a public server with an active load - you can halve the 10G I have proposed - most likely there will be no problems.
By adhering to such a plan in disk layout during the installation of Linux, you can significantly save time on subsequent system maintenance and, moreover, on its recovery if an accident visits your home.
"-And what about the rest xxxxG on my huge drive?" - you ask. Make another section and place your favorite movies, music or anything else on it.
Prepared using pod2html .
UP. To everyone whom the thought of breaking into “horror” of 4-5 sections is so jarring:
1) It is only necessary to make the division into sections once, when installing the system. You do not need to mount directories each time you boot. I don’t understand what is bothering you.
2) So far I have not heard of the tax on “extra sections”. I see no reason to make partitions smaller than I would like.