Linux News
The world is talking about GNU/Linux and Free/Open Source Software
How to Defensively Partition Your Hard Drive in Linux
Hardly a day goes by that I don't see a post in Yahoo Answers about how someone installed Linux, messed up the installation beyond repair, and now is facing the possibility of losing all their personal files. This doesn't need to be an issue in Linux, however. In this article I'm going to tell you how you can defensively partition your hard drive in Linux.
|
|
Hardly a day goes by that I don't see a post in Yahoo Answers about how someone installed Linux, messed up the installation beyond repair, and now is facing the possibility of losing all their personal files. This doesn't need to be an issue in Linux, however. In this article I'm going to tell you how you can defensively partition your hard drive in Linux.
This is the custom partition layout you want to have:
- One EXT4 formatted 10-20 GB partition with the mount point /
- One swap formatted partition that is the same size as your RAM or larger
- One EXT4 formatted partition that takes up the rest of space left with the mount point /home
Why do I need this?
You need this so that if you have to reinstall the operating system you won't have to reinstall on top of your personal files. By moving your personal files to a separate partition, we are isolating them so when it comes time to reinstall the operating system you can just format the / and swap partitions and install to them.
What does this mean?
The / partition is kind of like the C:Windows and the C:Program Files folders in Windows. It contains all your operating system and program files. 10 GB should be plenty of space for most users needs, but if you plan on installing a large amount of software you may want to bump that up to 20 GB.
The swap partition is kind of like the "pagefile" in Windows. It is used as space for memory when your available RAM is getting low or when your computer goes in to hibernation. Since it's a substitute for your RAM, it needs to be the same size or larger.
The /home partition is kind of like C:Documents and Settings in Windows. It contains all your personal files and program settings. Since this will take up the majority of space on your hard drive you want to make it as large as possible.
How do I Reinstall The Operating System?
All you have to do is set up the mount points again and format the / and swap partitions. Because of this you need to pay careful attention to the size and order of your partitions. Additionally make sure that you use the same username in the new install as you used in the old install.
Conclusion
If you set up your partitions correctly you should never have to lose your personal files due to a reinstallation of Linux. Once you have your partitions set up correctly after a reinstall of Linux your files will be exactly where you left them, your program settings will remain the same, and even your desktop wallpaper will be the same as when you left it. |
You cannot post until you login.