Currently Browsing: FAQ

[FAQ] Partitions and Filesystems

Why do we have to have so many different partitions and filesystems on a Linux system? A hard disk is divided into partitions – separate sections that each act as though they were a disk. Each partition then uses a filesystem to store data on that partition. Why does Linux use more than one? Windows doesn’t! Keeping different types of data separate can improve performance and security. Keeping swap data on a dedicated filesystem is more efficient than keeping it inside a file inside a directory on the filesystem of your root partition. A rogue process can mess up swap, but it won’t touch anything else. So swap and a root partition, like Ubuntu uses, is sufficient? Sufficient, yes, but not optimal. At the very least, a desktop system (and that includes laptops) should use a separate partition for the home directory. That keeps your personal settings and data separate from the operating system files. Why would I want to do that? At some time, you will want to try a different distro, or install a later version of your existing distro. If everything is in the root partition, it will all be wiped by the installation and you would have to back up all your settings and files to an external drive before you could install. With a separate home partition, a well-behaved¬†installer will leave your data intact. After the installation, you can boot the machine and start using it just as you did with the old setup. Are there any other partitions I should have? For a server, a separate filesystem for /var is definitely a good idea. It is also useful for desktops as a runway process filling up the system logfiles, kept in /var/log, won’t use up all the disk space used by the operating system files. There are so many types of filesystem –...