Read Ebook: Debian GNU/Linux : Guide to Installation and Usage by Goerzen John Othman Ossama
Font size:
Background color:
Text color:
Add to tbrJar First Page Next Page Prev Page
Ebook has 1303 lines and 117465 words, and 27 pages
Tip: If you ever mistakenly type a command or don't know how to exit a program, press CTRL-c . This will often stop the program.
Conventions
Before going on, it's important to be familiar with the typographical conventions used in this book.
When you should simultaneously hold down multiple keys, a notation like CTRL-a will be used. This means ``press the Ctrl key and press lowercase letter a.'' Some keyboards have both Alt and Meta; most home computers have only Alt, but the Alt key behaves like a Meta key. So if you have no Meta key, try the Alt key instead.
Keys like Alt and Meta are called modifier keys because they change the meaning of standard keys like the letter A. Sometimes you need to hold down more than one modifier; for example, Meta-Ctrl-a means to simultaneously press Meta, Ctrl, and lowercase a.
Some keys have a special notation - for example, Ret , Del , Esc . These should be fairly self-explanatory.
Spaces used instead of hyphens mean to press the keys in sequential order. For example, CTRL-a x RET means to simultaneously type Ctrl and lowercase a, followed by the letter x, followed by pressing Return.
In sample sessions, bold face text denotes characters typed by the user, italicized text denotes comments about a given part of the sample session, and all other text is output from entering a command. For shorter commands, you'll sometimes find that the command can be found within other text, highlighed with a monospace font.
Getting Started
``A journey of a thousand miles must begin with a single step.'' - Lao-Tsu
Now that you've read about the ideas and philosophy behind Linux and Debian, it's time to start putting it on your computer! We start by talking about how to prepare for a Debian install, then about partitioning your disk, and finally, how to start up the installation system.
Supported Hardware
Debian does not impose hardware requirements beyond the requirements of the Linux kernel and the GNU tools.
Rather than attempting to describe all the different hardware configurations that are supported for the PC platform, this section contains general information and pointers to where additional information can be found.
There are two excellent places to check for detailed information: the Debian System Requirements list and the Linux Documentation Project Hardware Compatibility HOWTO. For information on video card support, you may also want to look at the XFree86 Project web site.
Memory and Disk Space Requirements
You must have at least 4MB of memory and 35MB of available hard disk space. If you want to install a reasonable amount of software, including the X Window system, and some development programs and libraries, you'll need at least 300MB. For an essentially full installation, you'll need around 800MB. To install everything available in Debian, you'll probably need around 2GB. Actually, installing everything doesn't make sense because some packages provide the same services.
Before You Start
Before you start, make sure to back up every file that is now on your system. The installation procedure can wipe out all of the data on a hard disk! The programs used in installation are quite reliable and most have seen years of use; still, a false move can cost you. Even after backing up, be careful and think about your answers and actions. Two minutes of thinking can save hours of unnecessary work.
Debian makes it possible to have both Debian GNU/Linux and another operating system installed on the same system. If you plan to use this option, make sure that you have on hand the original CD-ROM or floppies of the other installed operating systems. If you repartition your boot drive, you may find that you have to reinstall your existing operating system's boot loader2.1 or the entire operating system itself.
Information You Will Need
If your computer is connected to a network 24 hours a day , you should ask your network's system administrator for the following information:
Partitioning Your Hard Drive
Before you install Debian on your computer, it is 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 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 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.
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:
Dialup. This profile would be good for a standard desktop box, including the X Window system, graphics applications, sound, editors, etc. The size of the packages will be around 500MB.
Remember that these sizes don't include all the other materials that are normally found, such as user files, mail, and data. It is always best to be generous when considering the space for your own files and data. Notably, the Debian /var directory contains a lot of state information. The installed package management files can easily consume 20MB of disk space. In general, you should allocate at least 50MB for the /var directory because system log files are also stored there.
PC Disk Limitations
A PC BIOS generally adds additional constraints for disk partitioning. There is a limit to how many ``primary'' and ``logical'' partitions a drive can contain. Additionally, there are limits to where on the drive the BIOS looks for boot information. More information can be found in the Linux Partition mini-HOWTO. This section will include a brief overview to help you plan most situations.
Linux limits the number of partitions per drive to 15 partitions for SCSI drives , and 63 partitions for IDE drives .
The last issue you need to know about a PC BIOS is that your boot partition - that is, the partition containing your kernel image - needs to be contained within the first 1,024 cylinders of the drive. Because the root partition is usually your boot partition, you need to make sure your root partition fits into the first 1,024 cylinders.
If you have a large disk, you may have to use cylinder translation techniques, which you can set in your BIOS, such as LBA translation mode. If you are using a cylinder translation scheme, your boot partition must fit within the translated representation of cylinder 1,024.
Device Names in Linux
Linux disks and partition names may be different from those in other operating systems. You should know the names that Linux uses when you create and mount partitions. The basic scheme can be found in Table 2.1 on page .
The partitions on each disk are 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 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 , 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 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.
Add to tbrJar First Page Next Page Prev Page