Per poter utilizzare Debian, è necessario installarla in un computer. Questa operazione viene gestita dal programma debian-installer. Una corretta installazione coinvolge molte operazioni. In questo capitolo verranno esaminate in ordine cronologico.
Per l'installazione sono richiesti 80 MB di RAM (Random Access Memory) e almeno 700 MB di spazio su disco. Tutti i computer della Falcot rispondono a questi criteri. È da notare, tuttavia, che tali valori valgono per l'installazione di un sistema molto limitato senza interfaccia grafica. Per una workstation desktop base da ufficio è consigliabile un minimo di 512 MB di RAM e 5 GB di spazio su disco.
4.1. Modalità di installazione
Un sistema Debian può essere installato da diversi tipi di supporti, a patto che il BIOS della macchina lo permetta. È possibile, ad esempio, l'avvio con un CD-ROM, una chiavetta USB o anche attraverso la rete.
4.1.1. Installazione da un CD-ROM/DVD-ROM
Il supporto di installazione più utilizzato è il CD-ROM (o DVD-ROM, che si comporta esattamente allo stesso modo): il computer viene avviato da questo supporto e viene eseguito il programma di installazione.
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 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 84 CD-ROMs (or 12 DVD-ROMs, or two Blu-ray disks). But the programs are divided among the disks according to their popularity and importance; the first three disks will be sufficient for most installations, since they contain 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.
Le immagini dei CD-ROM di Debian, possono essere naturalmente scaricate e masterizzate su disco. È anche possibile acquistarle, contribuendo così al progetto con un piccolo supporto finanziario. Controllare il sito per vedere l'elenco dei distributori dei CD-ROM con Debian e dei siti per scaricare le immagini.
4.1.2. Avviare da una chiavetta 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-8.0.0-amd64-i386-netinst.iso) with the command cat debian-8.0.0-amd64-i386-netinst.iso >/dev/sdb; sync
. This command requires administrator rights, since it accesses the USB key directly and blindly erases its content.
Una spiegazione più dettagliata è disponibile nel manuale di installazione. Tra le altre cose, descrive un metodo alternativo di preparare una chiavetta USB, più complesso, ma che permette di personalizzare le opzioni predefinite d'installazione (quelle specificate nella riga di comando del kernel).
4.1.3. Installazione tramite l'avvio da rete
Molti BIOS permettono l'avvio direttamente dalla rete, scaricando un kernel e un'immagine minimale del file system. Questo metodo (che ha diversi nomi, come
PXE o
TFTP boot) può essere un salvavita se il computer non dispone di un lettore CD-ROM, o se il BIOS non prevede l'avvio da tali supporti.
Questo metodo di installazione funziona in due fasi. In primo luogo, durante l'avvio del computer, il BIOS (o la scheda di rete) manda una richiesta BOOTP/DHCP per acquisire automaticamente un indirizzo IP. Quando un server BOOTP o DHCP restituisce una risposta, include il nome di file e le impostazioni di rete. Dopo aver configurato la rete, il computer client invia la richiesta TFTP (Trivial File Transfer Protocol) per il file il cui nome è stato indicato in precedenza. Una volta che questo file viene acquisito, viene eseguito come se si trattasse di un bootloader. Questo lancia il programma di installazione di Debian, che viene eseguito come se fosse stato lanciato dal disco rigido, da un CD-ROM o da una chiavetta USB.
All the details of this method are available in the installation guide (“Preparing files for TFTP Net Booting” section).
4.1.4. Altri metodi d'installazione
Quando si devono mettere in atto installazioni personalizzate per un gran numero di computer, in genere si sceglie un sistema automatico piuttosto che un metodo di installazione manuale. A seconda della situazione e della complessità delle installazioni da realizzare, si può usare FAI (Fully Automatic Installer, descritto nella
Sezione 12.3.1, «Fully Automatic Installer (FAI)»), o un CD d'installazione personalizzato con la preconfigurazione (vedere la
Sezione 12.3.2, «Preimpostare Debian-Installer»).