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

John Goerzen and Ossama Othman
represented by appending a number to the disk name. For example, the names hda1 and hda2 represent the first and second partitions of the first IDE disk drive in your system. Linux represents the primary partitions with the drive name plus the numbers 1 through 4. For example, the first primary partition on the first IDE drive is /dev/hda1. The logical partitions are numbered starting at 5, so the first logical partition on that same drive is /dev/hda5. Remember that the extended partition - that is, the primary partition holding the logical partitions - is not usable by itself. This applies to SCSI drives as well as IDE drives.
Let's assume you have a system with two SCSI disks, one at SCSI address 2 and the other at SCSI address 4. The first disk (at address 2) is then named sda and the second sdb. If the sda drive has three partitions on it, these will be named sda1, sda2, and sda3. The same applies to the sdb disk and its partitions. Note that if you have two SCSI host bus adapters (i.e., controllers), the order of the drives can get confusing. The best solution in this case is to watch the boot messages, assuming you know the drive models.
Recommended Partitioning Scheme
As described above, you should have a separate smaller root partition and a larger /usr partition if you have the space. For most users, the two partitions initially mentioned are sufficient. This is especially appropriate when you have a single small disk, because creating lots of partitions can waste space.
In some cases, you might need a separate /usr/local partition if you plan to install many programs that are not part of the Debian distribution. If your machine will be a mail server, you may need to make /var/spool/mail a separate partition. Putting /tmp on its own 20 to 32MB partition, for instance, is a good idea. If you are setting up a server with lots of user accounts, it's generally good to have a separate, large /home partition to store user home directories. In general, the partitioning situation varies from computer to computer depending on its uses.
For very complex systems, you should see the Multi Disk HOWTO. It contains in-depth information, mostly of interest to people setting up servers.
Swap partition sizes should also be considered. There are many views about swap partition sizes. One rule of thumb that works well is to use as much swap as you have system memory, although there probably isn't much point in going over 64MB of swap for most users. It also shouldn't be smaller than 16MB, in most cases. Of course, there are exceptions to these rules. If you are trying to solve 10,000 simultaneous equations on a machine with 256MB of memory, you may need a gigabyte (or more) of swap space.
As an example, consider a machine that has 32MB of RAM and a 1.7GB IDE drive on /dev/hda. There is a 500MB partition for another operating system on /dev/hda1. A 32MB swap partition is used on /dev/hda3 and the rest, about 1.2GB, on /dev/hda2 is the Linux partition.
Partitioning Prior to Installation
There are two different times that you can partition: prior to or during the installation of Debian. If your computer will be solely dedicated to Debian you should partition during installation as described in section 3.5 on page [*]. If you have a machine with more than one operating system on it, you should generally let the other operating system create its own partitions.
The following sections contain information regarding partitioning in your native operating system prior to Debian installation. Note that you'll have to map between how the other operating system names partitions and how Linux names partitions; see Table 2.1 on page [*].
Partitioning from DOS or Windows
If you are manipulating existing FAT or NTFS partitions, it is recommended that you use either the scheme below or native Windows or DOS tools. Otherwise, it is not really necessary to partition from DOS or Windows; the Linux partitioning tools will generally do a better job.
Lossless Repartitioning
One of the most common installations is onto a system that already contains DOS (including Windows 3.1), Win32 (such as Windows 95, 98, NT), or OS/2 and it is desired to put Debian onto the same disk without destroying the previous system. As explained in section 2.3.1 on page [*], decreasing the size of an existing partition will almost certainly damage the data on that partition unless certain precautions are taken. The method described here, while not guaranteed to protect your data, works extremely well in practice. As a precaution, you should make a backup.
Before going any further, you should have decided how you will divide up the disk. The method in this section will only split a partition into two pieces. One will contain the original
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.