Debian GNU/Linux: Guide to Installation and Usage | Page 6

John Goerzen and Ossama Othman
generally a good idea to plan how the contents of your hard drive will be arranged. One part of this process involves partitioning your hard drive.
Background
Partitioning your disk simply refers to the act of breaking up your disk into sections. Each section is then independent of the others. It's roughly equivalent to putting up walls in a house; after that, adding furniture to one room doesn't affect any other room.
If you already have an operating system on your system (Windows 95, Windows NT, DOS, etc.) and you want to install Debian GNU/Linux on the same disk, you will probably need to repartition the disk. In general, changing a partition that already has a filesystem on it will destroy any information in that filesystem. Therefore, you should always make backups before doing any repartitioning. Using the analogy of the house, you would probably want to move all the furniture out of the way before moving a wall or you risk destroying your furniture. Luckily, there is an alternative for some users; see section 2.3.6 on page [*] for more information.
At a bare minimum, GNU/Linux needs one partition for itself. You can have a single partition containing the entire operating system, applications, and your personal files. Most people choose to give GNU/Linux more than the minimum number of partitions, however. There are two reasons you might want to break up the filesystem into a number of smaller partitions. The first is for safety. If something happens to corrupt the filesystem, generally only one partition is affected. Thus, you only have to replace (from the backups you've been carefully keeping) a portion of your system. At the very least, you should consider creating what is commonly called a ``root partition.'' This contains the most essential components of the system. If any other partitions get corrupted, you can still boot into GNU/Linux to fix the system. This can save you the trouble of having to reinstall the system from scratch.
The second reason is generally more important in a business setting, but it really depends on your use of the machine. Suppose something runs out of control and starts eating disk space. If the process causing the problem happens to have root privileges (the system keeps a percentage of the disk away from users), you could suddenly find yourself out of disk space. This is not good since the operating system needs to use real files (besides swap space) for many things. It may not even be a problem of local origin. For example, unsolicited e-mail (``spam'') can easily fill a partition. By using more partitions, you protect the system from many of these problems. Using e-mail as an example again, by putting the directory /var/spool/mail on its own partition, the bulk of the system will work even if unsolicited e-mail fills that partition.
Another reason applies only if you have a large IDE disk drive and are using neither LBA addressing nor overlay drivers2.2. In this case, you will have to put the root partition into the first 1,024 cylinders of your hard drive, usually around 524 megabytes. See section 2.3.3 on page [*] for more information on this issue.
Most people feel that a swap partition is also a necessity, although this isn't strictly true. ``Swap'' is scratch space for an operating system, which allows the system to use disk storage as ``virtual memory'' in addition to physical memory. Putting swap on a separate partition allows Linux to make much more efficient use of it. It is possible to force Linux to use a regular file as swap, but this is not recommended.
The only real drawback to using more partitions is that it is often difficult to know in advance what your needs will be. If you make a partition too small, either you will have to reinstall the system, or you will be constantly moving things around to make room in the undersized partition. On the other hand, if you make the partition too big, you may be wasting space that could be used elsewhere.
Planning Use of the System
Disk space requirements and your partitioning scheme are influenced by the type of installation you decide to create.
For your convenience, Debian offers a number of default ``profiles'' some of which are listed later in this section. Profiles are simply preselected sets of packages designed to provide certain desired capabilities on your system. Installation is easier since packages that fit your desired profile are automatically marked for installation. Each given profile lists the size of the resulting system after installation is complete. Even if you don't use these profiles, this discussion is important for planning, since it will give you a sense of how large your partition or partitions need to be. The following are some of the available profiles and their sizes:
Server_std. This is a small
Continue reading on your phone by scaning this QR Code

 / 64
Tip: The current page has been bookmarked automatically. If you wish to continue reading later, just open the Dertz Homepage, and click on the 'continue reading' link at the bottom of the page.