Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Installing Linux: Partitioning and File System Considerations


Published on

Looking at some key questions to consider when installing Linux for the first time

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Installing Linux: Partitioning and File System Considerations

  1. 1. Installing Linux: Partitioning and File System Considerations Kevin O'Brien Washtenaw Linux Users Group
  2. 2. Where Will You Install? ● Single Linux system ● Dual boot with Windows ● Dual boot with other OS 2
  3. 3. Single Linux System ● Simplest install with least worry ● Hardware is cheap ● Linux works well with older hardware, can give new life to an older system 3
  4. 4. Dual Boot With Windows ● Backup your data first!!!! ● Safest approach is to add a second hard drive ● Can also re-partition existing drive (probably required for laptops) ● Must have Windows already installed before installing Linux 4
  5. 5. Dual Boot With Other OS ● Can install Linux with other OS, including other Linux distros ● With multiple Linux installs, you can install in any order, I believe. ● Can share data between installs if you like. ● I still prefer separate hard drives for each OS install 5
  6. 6. If you want to re-partition ● Backup your data first!!!! ● Most Linux distros include re-partitioning software in the installation CD ● Partition Magic <> ● GNU Parted < html> 6
  7. 7. Good Open-Source Solution ● GParted Live CD ● Can also be installed on a USB drive: 7
  8. 8. Linux File System Structure ● Typical directories: – / – /bin – /boot – /dev – /etc – /home/initrd – /lib – /lost+found 8
  9. 9. Linux File System Structure (cont) – /misc – /media – /opt – /proc – /root – /sbin – /tmp – /usr – /var 9
  10. 10. How to allocate in partitions ● Every Linux install must have at least two partitions ● One must be a swap partition. This is generally set at 2x the amount of physical memory, but may be more for servers. ● Everything else can go into one data partition, but this is not the best solution in most cases 10
  11. 11. Partitioning choice ● Putting all directories into one partition can cause problems – For servers, it is advisable to put /var into its own partition. This directory holds the log files, and servers can generate a lot of data in log files. If these fill up, it can crash your server if everything is in one partition. – It is a good idea to separate user data from the OS. I recommend putting the /home directory on its own partition. 11
  12. 12. File System Choice ● Options include ext2, ext3, Reiser, fat32, jfs for data partitions. Swap is swap. ● Which one you choose depends on your needs, to some degree. For most people, it will come down to ext2, ext3, Reiser, or fat32. ● ext2 is the older standard for Linux. It is stable, but does not have journaling. 12
  13. 13. File System Choice (cont) ● ext3 is the update to ext2 that adds journaling. Journaling is important for data integrity. A sudden crash (power outage?) can leave unwritten changes to data, but a journaling system will recover those changes. Backwards compatible with ext2 ● Reiser is stable, and very fast. Whether it has a future is slightly unclear at this point. But if speed is your most important need, this is the one to use. 13
  14. 14. File System Choice (cont) ● fat32 is not a native Linux file system, it is a Windows file system, introduced with Windows 95 OSR2. It is not the normal file system for Windows XP or Windows 2000, which would be NTFS. But is has one virtue, which is that is you are planning to dual boot Linux and Windows, and want to have full read-write access to the same data, fat32 is the answer. But only create a data partition for that data you want to share. 14
  15. 15. Bottom line ● I cannot see why anyone would choose ext2 at this point. ext3 does everything ext2 does, and adds journaling. ● Reiser is a possibility if you have the need for speed, but will it survive his legal troubles? ● For most Linux installs, ext3 is a fine choice, and should be your default. 15
  16. 16. Example: Linux single install ● Assume a hypothetical 200GB hard drive – Allow 2-3GB for the swap partition. Your install routine will probably make a default choice based on your system configuration. Accept this. People who write install routines frequently know what they are doing. – Set a second partition for / and everything not otherwise accounted for. Allow 50GB for this. Make it ext3 16
  17. 17. Example: Linux Single Install (cont) – If this is going to be a server, set a third partition for /var. Allow 30GB for this. Make it ext3. – Allocate the rest of the drive to /home. This should be approximately 117GB in our example (or 147GB if there is no separate /var partition). All of your MP3 files, movies, documents, and so on go here. Make this one ext3 as well. 17
  18. 18. Dual Boot with Windows ● Assume a system that already has Windows installed. ● Assume adding a 200GB second hard drive. – Allow 2-3GB for the swap partition. – Set a fat32 partition for shared data. Note that fat32 has some limitations, such as large cluster sizes, and maximum 4GB file size. For movies, that can be an issue. The size of this partition will be determined by what you want to share. In this example, 50GB 18
  19. 19. Dual Boot with Windows (cont) – Set a third partition for / and everything not otherwise accounted for. Allow 50GB for this. Make it ext3. – Allocate the rest of the drive to /home. This should be approximately 97GB in our example. 19
  20. 20. Dual Boot with Windows (cont) – However, sizing the fat32 and the /home partition depends on how much of your data you intend to be Linux-only, and how much you want to share with Windows. If you want to share everything, do not create a separate partition for /home. Instead, let the install routine create a /home directory in the root partition along with everything else, and create a large fat32 directory with the rest of the space. Or perhaps create a couple of them. 20
  21. 21. Multiple Linux Install ● Assume you have Linux already installed on a single hard drive. ● Assume you are adding a second hard drive of 200GB – You may need to have a second swap partition for the second install. I have not yet found a definitive answer for this. It should not be a big deal. My own example of this uses separate swap partitions for each install 21
  22. 22. Multiple Linux Install (cont) – Configure the rest of the install as if it were a single Linux install. – Sharing data: I am not sure what the best way is to handle this. You might be able to create a single /home directory to do this, though I have not done it. Any ideas? 22