1
<!-- retain these comments for translator revision tracking -->
2
<!-- original version: 31190 -->
5
<sect1 id="linux-upgrade">
6
<!-- <title>Installing &debian; from a Unix/Linux System</title> -->
7
<title>Installazione di &debian; da un sistema Unix/Linux esistente</title>
11
<!-- This section explains how to install &debian; from an existing
12
Unix or Linux system, without using the menu-driven installer as
13
explained in the rest of the manual. This <quote>cross-install</quote>
14
HOWTO has been requested by users switching to &debian; from
15
Red Hat, Mandrake, and SUSE. In this section some familiarity with
16
entering *nix commands and navigating the file system is assumed. In
17
this section, <prompt>$</prompt> symbolizes a command to be entered in
18
the user's current system, while <prompt>#</prompt> refers to a
19
command entered in the Debian chroot. -->
21
Questa sezione spiega come installare &debian; a partire da un sistema
22
Unix o Linux esistente, senza utilizzare l'installatore a menu
23
come illustrato nel resto del manuale. Questo HOWTO sul
24
<quote>cross-install</quote> è stato richiesto da utenti di altre distribuzioni,
25
Red Hat, Mandrake e SUSE, che vogliono passare a &debian;. Viene data per
26
acquisita una minima familiarità con i comandi *nix e con la navigazione
27
del file system. In questa sezione, <prompt>$</prompt> indica un comando
28
da inserire nel sistema attualmente in uso all'utente, mentre
29
<prompt>#</prompt> si riferisce a un comando da inserire nell'ambiente
34
<!-- Once you've got the new Debian system configured to your preference,
35
you can migrate your existing user data (if any) to it, and keep on
36
rolling. This is therefore a <quote>zero downtime</quote> &debian;
37
install. It's also a clever way for dealing with hardware that
38
otherwise doesn't play friendly with various boot or installation
41
Una volta che il nuovo sistema Debian sia stato configurato a
42
piacimento, si può procedere alla migrazione dei dati esistenti e
43
proseguire normalmente. Si tratta perciò di un'installazione che non
44
blocca nemmeno momentaneamente l'uso del sistema. Si tratta inoltre di
45
un modo ingegnoso per lavorare con hardware che potrebbe creare problemi
46
con i normali dispositivi di avvio o installazione.
50
<!-- <title>Getting Started</title> -->
51
<title>Primi passi</title>
54
<!-- With your current *nix partitioning tools, repartition the hard
55
drive as needed, creating at least one filesystem plus swap. You
56
need at least 150MB of space available for a console only install,
57
or at least 300MB if you plan to install X. -->
59
Si ripartizioni secondo le proprie necessità il disco fisso con i tool
60
di partizionamento *nix disponibili. Come minimo servono un file system
61
e una partizione di swap, 150MB di spazio minimo per un ambiente
62
puramente testuale, 300MB se si intende installare X.
66
<!-- To create file systems on your partitions. For example, to create
67
an ext3 file system on partition <filename>/dev/hda6</filename> (that's
68
our example root partition): -->
70
Un esempio di come creare i file system sulle proprie partizioni. In
71
questo caso si tratta di un file system ext3 sulla partizione
72
<filename>/dev/hda6</filename> (negli esempi successivi si tratta della
75
<informalexample><screen>
77
</screen></informalexample>
79
<!-- To create an ext2 file system instead, omit
80
<userinput>-j</userinput>. -->
82
Per creare un file system ext2, basta omettere
83
<userinput>-j</userinput>.
87
<!-- Initialize and activate swap (substitute the partition number for
88
your intended Debian swap partition): -->
90
Si inizializzi e attivi lo swap (si sostituisca il numero della
91
partizione con quello della partizione destinata allo swap per Debian):
93
<informalexample><screen>
97
</screen></informalexample>
99
<!-- Mount one partition as <filename>/mnt/debinst</filename> (the
100
installation point, to be the root (<filename>/</filename>) filesystem
101
on your new system). The mount point name is strictly arbitrary, it is
102
referenced later below. -->
104
Si monti una partizione come <filename>/mnt/debinst</filename> (il punto
105
di installazione, che sarà il root file system (<filename>/</filename>)
106
del nuovo sistema). Il nome del mount point è arbitrario, quello scelto
107
verrà utilizzato da qui in avanti.
109
<informalexample><screen>
111
# mount /dev/hda6 /mnt/debinst
112
</screen></informalexample>
117
If you want to have parts of the filesystem (e.g. /usr) mounted on
118
separate partitions, you will need to create and mount these directories
119
manually before proceding with the next stage.
122
Nel caso si abbiano delle parti del filesystem (p.e. /usr) montate da
123
delle partizioni separate è necessario creare e montare manualmente queste
124
directory prima di procedere con la prossima fase.
130
<!-- <title>Install <command>debootstrap</command></title> -->
131
<title>Installazione di <command>debootstrap</command></title>
134
<!-- The tool that the Debian installer uses, which is recognized as the
135
official way to install a Debian base system, is
136
<command>debootstrap</command>. It uses <command>wget</command> and
137
<command>ar</command>, but otherwise depends only on
138
<classname>/bin/sh</classname>. Install <command>wget</command> and
139
<command>ar</command> if they aren't already on your current system,
140
then download and install <command>debootstrap</command>. -->
142
Lo strumento che l'installatore Debian usa, considerato il mezzo ufficiale
143
per installare un sistema Debian di base, è <command>debootstrap</command>.
144
Utilizza <command>wget</command> e <command>ar</command>, ma a parte questo
145
dipende solo da <classname>/bin/sh</classname>. Si installi
146
<command>wget</command> e <command>ar</command> in caso non siano già
147
presenti sul sistema in uso, quindi si scarichi e installi
148
<command>debootstrap</command>.
152
<!-- If you have an rpm-based system, you can use alien to convert the
153
.deb into .rpm, or download an rpm-ized version at
155
url="http://people.debian.org/~blade/install/debootstrap"></ulink> -->
157
Su un sistema basato su rpm, si può utilizzare alien per convertire il
158
pacchetto .deb in .rpm, o si può scaricarne una versione rpm presso
160
url="http://people.debian.org/~blade/install/debootstrap"></ulink>
164
<!-- Or, you can use the following procedure to install it
165
manually. Make a work folder for extracting the .deb into: -->
167
Un'ulteriore possibilità è fare come segue per installarlo a mano.
168
Si crei una cartella di lavoro in cui estrarre il .deb:
170
<informalexample><screen>
173
</screen></informalexample>
175
<!-- The <command>debootstrap</command> binary is located in the Debian
176
archive (be sure to select the proper file for your
177
architecture). Download the <command>debootstrap</command> .deb from
178
the <ulink url="http://ftp.debian.org/debian/pool/main/d/debootstrap/">
179
pool</ulink>, copy the package to the work folder, and extract the
180
binary files from it. You will need to have root privileges to install
183
Il binario di <command>debootstrap</command> si trova nell'archivio
184
Debian (si faccia attenzione a scegliere il file secondo la propria
185
architettura). Si scarichi il pacchetto .deb di
186
<command>debootstrap</command> da <ulink
187
url="http://ftp.debian.org/debian/pool/main/d/debootstrap/">pool</ulink>,
188
lo si copi nella cartella di lavoro e si estraggano da esso i file
189
binari. Servono i privilegi di root per installarli.
191
<informalexample><screen>
192
# ar -xf debootstrap_0.X.X_arch.deb
194
# zcat < /full-path-to-work/work/data.tar.gz | tar xv
195
</screen></informalexample>
200
Note that running <command>debootstrap</command> may require you to have
201
a minimal version of <classname>glibc</classname> installed (currently
202
GLIBC_2.3). <command>debootstrap</command> itself is a shell script, but
203
it calls various utilities that require <classname>glibc</classname>.
206
Notare che l'esecuzione di <command>debootstrap</command> potrebbe
207
richiedere l'installazione di una versione minimale della
208
<classname>glibc</classname> (al momento GLIBC_2.3).
209
<command>debootstrap</command> è semplicemente uno script di shell ma
210
richiama diverse utilità che richiedono la <classname>glibc</classname>.
216
<!-- <title>Run <command>debootstrap</command></title> -->
217
<title>Esecuzione di <command>debootstrap</command></title>
220
<!-- <command>debootstrap</command> can download the needed files directly
221
from the archive when you run it. You can substitute any Debian
222
archive mirror for <userinput>http.us.debian.org/debian</userinput> in
223
the command example below, preferably a mirror close to you
224
network-wise. Mirrors are listed at
225
<ulink url="http://www.debian.org/misc/README.mirrors"></ulink>. -->
227
Quando viene lanciato, <command>debootstrap</command> è in grado
228
di scaricare i file necessari direttamente dall'archivio. Si può
229
sostituire a <userinput>http.us.debian.org/debian</userinput>,
230
utilizzato nell'esempio sottostante, un qualsiasi archivio mirror di
231
Debian, meglio se prossimo in rete. Un elenco dei mirror è reperibile
233
url="http://www.debian.org/misc/README.mirrors"></ulink>.
237
<!-- If you have a &releasename; &debian; CD mounted at
238
<filename>/cdrom</filename>, you could substitute a file URL instead
239
of the http URL: <userinput>file:/cdrom/debian/</userinput> -->
241
In caso si abbia un CD &debian; &releasename; montato su
242
<filename>/cdrom</filename>, si può sostituire all'URL http
243
l'URL <userinput>file:/cdrom/debian/</userinput>.
247
<!-- Substitute one of the following for <replaceable>ARCH</replaceable>
248
in the <command>debootstrap</command> command:
250
<userinput>alpha</userinput>,
251
<userinput>arm</userinput>,
252
<userinput>hppa</userinput>,
253
<userinput>i386</userinput>,
254
<userinput>ia64</userinput>,
255
<userinput>m68k</userinput>,
256
<userinput>mips</userinput>,
257
<userinput>mipsel</userinput>,
258
<userinput>powerpc</userinput>,
259
<userinput>s390</userinput>, or
260
<userinput>sparc</userinput>. -->
262
Al posto di <replaceable>ARCH</replaceable>, nel comando
263
<command>debootstrap</command> si sostituisca uno dei seguenti:
265
<userinput>alpha</userinput>,
266
<userinput>arm</userinput>,
267
<userinput>hppa</userinput>,
268
<userinput>i386</userinput>,
269
<userinput>ia64</userinput>,
270
<userinput>m68k</userinput>,
271
<userinput>mips</userinput>,
272
<userinput>mipsel</userinput>,
273
<userinput>powerpc</userinput>,
274
<userinput>s390</userinput> o
275
<userinput>sparc</userinput>.
277
<informalexample><screen>
278
# /usr/sbin/debootstrap --arch ARCH sarge \
279
/mnt/debinst http://http.us.debian.org/debian
280
</screen></informalexample>
286
<!-- <title>Configure The Base System</title> -->
287
<title>Configurazione del sistema di base</title>
290
<!-- Now you've got a real Debian system, though rather lean, on disk.
291
<command>Chroot</command> into it: -->
293
Ora sul disco c'è un vero sistema Debian, seppur minimale. Ci si faccia
294
<command>chroot</command>:
296
<informalexample><screen>
297
# LANG= chroot /mnt/debinst /bin/bash
298
</screen></informalexample>
303
<!--<title>Mount Partitions</title> -->
304
<title>Montare le partizioni</title>
307
<!-- You need to create <filename>/etc/fstab</filename>. -->
309
Bisogna creare <filename>/etc/fstab</filename>.
311
<informalexample><screen>
313
</screen></informalexample>
315
<!-- Here is a sample you can modify to suit: -->
317
Segue un esempio che si può adattare secondo le proprie necessità:
319
<informalexample><screen>
320
# /etc/fstab: static file system information.
322
# file system mount point type options dump pass
323
/dev/XXX / ext3 defaults 0 1
324
/dev/XXX /boot ext3 ro,nosuid,nodev 0 2
326
/dev/XXX none swap sw 0 0
327
proc /proc proc defaults 0 0
329
/dev/fd0 /mnt/floppy auto noauto,rw,sync,user,exec 0 0
330
/dev/cdrom /mnt/cdrom iso9660 noauto,ro,user,exec 0 0
332
/dev/XXX /tmp ext3 rw,nosuid,nodev 0 2
333
/dev/XXX /var ext3 rw,nosuid,nodev 0 2
334
/dev/XXX /usr ext3 rw,nodev 0 2
335
/dev/XXX /home ext3 rw,nosuid,nodev 0 2
336
</screen></informalexample>
338
<!-- Use <userinput>mount -a</userinput> to mount all the file systems you
339
have specified in your <filename>/etc/fstab</filename>, or to mount
340
file systems individually use: -->
342
Per montare tutti i file system specificati nel proprio
343
<filename>/etc/fstab</filename>, si esegua <userinput>mount -a</userinput>,
344
mentre per montarli singolarmente si usi:
346
<informalexample><screen>
347
# mount /path # ad esempio: mount /usr
348
</screen></informalexample>
350
<!-- You can mount the proc file system multiple times and to arbitrary
351
locations, though <filename>/proc</filename> is customary. If you didn't use
352
<userinput>mount -a</userinput>, be sure to mount proc before continuing:
355
È possibile montare il file system proc più volte e in posizioni
356
arbitrarie, ma è consuetudine farlo su <filename>/proc</filename>. In caso
357
non si esegua <userinput>mount -a</userinput>, ci si assicuri di montare
358
proc prima di continuare:
360
<informalexample><screen>
361
# mount -t proc proc /proc
362
</screen></informalexample>
367
The command <userinput>ls /proc</userinput> should now show a non-empty
368
directory. Should this fail, you may be able to mount proc from outside
372
Adesso il comando <userinput>ls /proc</userinput> dovrebbe mostrare una
373
directory con dei file. Se non funziona, si dovrebbe essere in grado di
374
montare proc da fuori della chroot:
376
<informalexample><screen>
377
# mount -t proc proc /mnt/debinst/proc
378
</screen></informalexample>
384
<!-- <title>Configure Keyboard</title> -->
385
<title>Configurazione della tastiera</title>
388
<!-- To configure your keyboard: -->
390
Per configurare la propria tastiera:
392
<informalexample><screen>
393
# dpkg-reconfigure console-data
394
</screen></informalexample>
399
Note that the keyboard cannot be set while in the chroot, but will be
400
configured for the next reboot.
403
Notare che la tastiera non può essere impostata quando si è all'interno
404
della chroot, sarà possibile configurarla al riavvio successivo.
410
<!-- <title>Configure Networking</title> -->
411
<title>Configurazione della rete</title>
414
<!-- To configure networking, edit
415
<filename>/etc/network/interfaces</filename>,
416
<filename>/etc/resolv.conf</filename>, and
417
<filename>/etc/hostname</filename>. -->
419
Per configurare la rete, si editino
420
<filename>/etc/network/interfaces</filename>,
421
<filename>/etc/resolv.conf</filename> e <filename>/etc/hostname</filename>.
423
<informalexample><screen>
424
# editor /etc/network/interfaces
425
</screen></informalexample>
427
<!-- Here are some simple examples from
428
<filename>/usr/share/doc/ifupdown/examples</filename>: -->
430
Alcuni esempi banali da
431
<filename>/usr/share/doc/ifupdown/examples</filename>:
433
<informalexample><screen>
434
######################################################################
435
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
436
# See the interfaces(5) manpage for information on what options are
438
######################################################################
440
# We always want the loopback interface.
443
iface lo inet loopback
448
# iface eth0 inet dhcp
450
# An example static IP setup: (broadcast and gateway are optional)
453
# iface eth0 inet static
454
# address 192.168.0.42
455
# network 192.168.0.0
456
# netmask 255.255.255.0
457
# broadcast 192.168.0.255
458
# gateway 192.168.0.1
459
</screen></informalexample>
461
<!-- Enter your nameserver(s) and search directives in
462
<filename>/etc/resolv.conf</filename>: -->
464
Gli indirizzi dei name server e le direttive search vanno immesse in
465
<filename>/etc/resolv.conf</filename>:
467
<informalexample><screen>
468
# editor /etc/resolv.conf
469
</screen></informalexample>
471
<!-- A simple <filename>/etc/resolv.conf</filename>: -->
473
Un semplice <filename>/etc/resolv.conf</filename>:
475
<informalexample><screen>
476
search hqdom.local\000
478
nameserver 192.168.9.100
479
</screen></informalexample>
481
<!-- Enter your system's host name (2 to 63 characters): -->
483
Si immetta l'hostname del proprio sistema (da 2 a 63 caratteri):
485
<informalexample><screen>
486
# echo DebianHostName > /etc/hostname
487
</screen></informalexample>
489
<!-- If you have multiple network cards, you should arrange the names of
490
driver modules in the <filename>/etc/modules</filename> file into the
491
desired order. Then during boot, each card will be associated with the
492
interface name (eth0, eth1, etc.) that you expect. -->
494
In presenza di più schede di rete, si dovrebbero disporre i nomi dei driver
495
nel file <filename>/etc/modules</filename> nell'ordine desiderato. In tal
496
modo, durante l'avvio ad ogni scheda verrà associato il nome di interfaccia
497
che ci si aspetta (eth0, eth1, etc.).
503
<!-- <title>Configure Timezone, Users, and APT</title> -->
504
<title>Configurazione del fuso orario, degli utenti e di APT</title>
507
<!-- Set your timezone, add a normal user, and choose your
508
<command>apt</command>
509
sources by running -->
511
Ora si può impostare il fuso orario, aggiungere un utente normale e
513
sorgenti <command>apt</command> con il comando
515
<informalexample><screen>
516
# /usr/sbin/base-config new
517
</screen></informalexample>
523
<!-- <title>Configure Locales</title> -->
524
<title>Configurazione di locales</title>
527
<!-- To configure your locale settings to use a language other than
528
English, install the locales support package and configure it: -->
530
Per utilizzare una localizzazione diversa da quella inglese, si installi
531
il pacchetto locales e lo si configuri.
533
<informalexample><screen>
534
# apt-get install locales
535
# dpkg-reconfigure locales
536
</screen></informalexample>
538
<!-- NOTE: Apt must be configured before, ie. during the base-config phase.
539
Before using locales with character sets other than ASCII or latin1,
540
please consult the appropriate localization HOWTO. -->
542
NOTA: Apt dev'essere già stato configurato, ad esempio durante la fase
543
base-config. Prima di utilizzare locales con set di caratteri diversi da
544
ASCII o latin1, si consulti l'HOWTO di localizzazione appropriato.
551
<!-- <title>Install a Kernel</title> -->
552
<title>Installazione di un kernel</title>
555
<!-- If you intend to boot this system, you probably want a Linux kernel
556
and a boot loader. Identify available pre-packaged kernels with -->
558
In caso si intenda fare il boot nel nuovo sistema, servono un kernel
560
un boot loader. I kernel pacchettizzati disponibili si trovano con
562
<informalexample><screen>
563
# apt-cache search kernel-image
564
</screen></informalexample>
566
<!-- Then install your choice using its package name. -->
568
Si può quindi installare quello scelto usando il nome del pacchetto
570
<informalexample><screen>
571
# apt-get install kernel-image-<replaceable>2.X.X-arch-etc</replaceable>
572
</screen></informalexample>
578
<!-- <title>Set up the Boot Loader</title> -->
579
<title>Configurazione del boot loader</title>
582
<!-- To make your &debian; system bootable, set up your boot loader to load
583
the installed kernel with your new root partition. Note that debootstrap
584
does not install a boot loader, though you can use apt-get inside your
585
Debian chroot to do so. -->
587
Per rendere avviabile il sistema &debian;, si configuri il boot loader
588
affinché carichi il kernel installato con la nuova partizione di root. Si
589
noti che debootstrap non installa di suo un boot loader, lo si può fare
590
tramite apt-get dall'interno della chroot Debian.
592
</para><para arch="i386">
594
<!-- Check <userinput>info grub</userinput> or <userinput>man
595
lilo.conf</userinput> for instructions on setting up the
596
bootloader. If you are keeping the system you used to install Debian, just
597
add an entry for the Debian install to your existing grub
598
<filename>menu.lst</filename> or <filename>lilo.conf</filename>. For
599
<filename>lilo.conf</filename>, you could also copy it to the new system and
600
edit it there. After you are done editing, call lilo (remember it will use
601
<filename>lilo.conf</filename> relative to the system you call it from). -->
603
Si provi <userinput>info grub</userinput> o <userinput>man
604
lilo.conf</userinput>
605
per ottenere istruzioni sulla configurazione del boot loader. Nel caso
607
mantenere attivo il sistema da cui si è installato Debian, è sufficiente
609
una voce per Debian al file di grub (<filename>menu.lst</filename>) o di
611
(<filename>lilo.conf</filename>) esistente. Se si tratta di
612
<filename>lilo.conf</filename>, è anche possibile copiarlo sul nuovo
614
modificarlo opportunamente. Dopo averlo fatto, si invochi lilo
616
usa il <filename>lilo.conf</filename> relativo al sistema su cui viene
619
</para><para arch="i386">
621
<!-- Here is a basic <filename>/etc/lilo.conf</filename> as an example: -->
623
Di seguito un <filename>/etc/lilo.conf</filename> di base come esempio:
625
<informalexample><screen>
633
</screen></informalexample>
635
</para><para arch="powerpc">
637
<!-- Check <userinput>man yaboot.conf</userinput> for instructions on
638
setting up the bootloader. If you are keeping the system you used to
639
install Debian, just add an entry for the Debian install to your
640
existing <filename>yaboot.conf</filename>. You could also copy it to
642
edit it there. After you are done editing, call ybin (remember it will
643
use <filename>yaboot.conf</filename> relative to the system you call it
646
Si provi <userinput>man yaboot.conf</userinput> per ottenere istruzioni
647
sulla configurazione del boot loader. Nel caso si intenda mantenere
648
attivo il sistema da cui si è installato Debian, è sufficiente
649
aggiungere una voce per Debian al file <filename>yaboot.conf</filename>
650
esistente. È anche possibile copiarlo sul nuovo sistema e lì
651
modificarlo opportunamente. Dopo averlo fatto, si invochi ybin
652
(ricordandosi che usa il <filename>yaboot.conf</filename> relativo al
653
sistema su cui viene lanciato).
655
</para><para arch="powerpc">
657
<!-- Here is a basic <filename>/etc/yaboot.conf</filename> as an
660
Di seguito un <filename>/etc/yaboot.conf</filename> di base come esempio:
662
<informalexample><screen>
667
magicboot=/usr/lib/yaboot/ofboot
671
</screen></informalexample>
673
<!-- On some machines, you may need to use <userinput>ide0:</userinput>
674
instead of <userinput>hd:</userinput>. -->
676
Su alcune macchine potrebbe essere necessario usare
677
<userinput>ide0:</userinput> al posto di <userinput>hd:</userinput>.