Để sử dụng Debian, bạn cần cài đặt nó vào máy tính; việc này được chương trình debian-installer xử lý. Một lượt cài đặt đúng cách bao gồm nhiều hoạt động. Chương này xem xét chúng theo thứ tự thời gian.
Installation requires 256 MB of RAM (Random Access Memory) and at least 2 GB of hard drive space. All Falcot computers meet these criteria. Note, however, that these figures apply to the installation of a very limited system without a graphical desktop. A minimum of 2 GB of RAM and 10 GB of hard drive space are really recommended for a basic office desktop workstation.
4.1. Các phương pháp cài đặt
A Debian system can be installed from several types of media, as long as the BIOS/UEFI (see
GHI CHÚUEFI, một sự thay thế hiện đại cho BIOS) of the machine allows it. You can for instance boot with a CD-ROM, a USB key, or even through a network.
4.1.1. Cài đặt từ đĩa CD-ROM/DVD-ROM
The most widely used installation method is from a CD-ROM (or DVD-ROM, which behaves exactly the same way): the computer is booted from this media, and the installation program takes over.
Various CD-ROM families have different purposes: netinst (network installation) contains the installer and the base Debian system; all other programs are then downloaded. Its “image”, that is the ISO-9660 filesystem that contains the exact contents of the disk, only takes up about 150 to 280 MB (depending on the architecture). On the other hand, the complete set offers all packages and allows for installation on a computer that has no Internet access; it requires around 19 DVD-ROMs (or 4 Blu-ray disks). There is no more official CD-ROMs set as they were really huge, rarely used and now most of the computers use DVD-ROMs as well as CD-ROMs. But the programs are divided among the disks according to their popularity and importance; the first disk will be sufficient for most installations, since it contains the most used software.
There is a last type of image, known as mini.iso
, which is only available as a by-product of the installer. The image only contains the minimum required to configure the network and everything else is downloaded (including parts of the installer itself, which is why those images tend to break when a new version of the installer is released). Those images can be found on the normal Debian mirrors under the dists/release/main/installer-arch/current/images/netboot/
directory.
To acquire Debian CD-ROM images, you may, of course, download them and burn them to disk. You may also purchase them, and, thus, provide the project with a little financial support. Check the website to see the list of DVD-ROM image vendors and download sites.
4.1.2. Khởi động từ một cái USB
Since most computers are able to boot from USB devices, you can also install Debian from a USB key (this is nothing more than a small flash-memory disk).
The installation manual explains how to create a USB key that contains the debian-installer
. The procedure is very simple because ISO images for i386 and amd64 are hybrid images that can boot from a CD-ROM as well as from a USB key.
You must first identify the device name of the USB key (ex: /dev/sdb
); the simplest means to do this is to check the messages issued by the kernel using the dmesg
command. Then you must copy the previously downloaded ISO image (for example, debian-11.0.0-amd64-netinst.iso) with the command cat debian-11.0.0-amd64-netinst.iso >/dev/sdb; sync
. This command requires administrator rights, since it accesses the USB key directly and blindly erases its content.
A more detailed explanation is available in the installation manual. Among other things, it describes an alternative method of preparing a USB key that is more complex, but that allows you to customize the installer's default options (those set in the kernel command line).
4.1.3. Installing through Network Booting
Many BIOSes allow booting directly from the network by downloading a kernel and a minimal filesystem image. This method (which has several names, such as
PXE or
TFTP boot) can be a life-saver if the computer does not have a CD-ROM reader, or if the BIOS can't boot from such media.
This installation method works in two steps. First, while booting the computer, the BIOS (or the network card) issues a BOOTP/DHCP request to automatically acquire an IP address. When a BOOTP or DHCP server returns a response, it includes a filename, as well as network settings. After having configured the network, the client computer then issues a TFTP (Trivial File Transfer Protocol) request for a file whose name was previously indicated. Once this file is acquired, it is executed as though it were a bootloader. This then launches the Debian installation program, which is executed as though it were running from the hard drive, a CD-ROM, or a USB key.
All the details of this method are available in the installation guide (“Preparing files for TFTP Net Booting” section).
4.1.4. Các phương pháp cài đặt khác
When we have to deploy customized installations for a large number of computers, we generally choose an automated rather than a manual installation method. Depending on the situation and the complexity of the installations to be made, we can use FAI (Fully Automatic Installer, described in
Phần 12.3.1, “Fully Automatic Installer (FAI)”), or even a customized installation DVD with preseeding (see
Phần 12.3.2, “Preseeding Debian-Installer”).
It should also be noted that the installer can load and run an SSH server and thus provides the ability to install Debian remotely via an SSH session. The release notes also describe how to run the installer from an existing system using grub to replace it completely.