You are on page 1of 164

Debian

GNU/Linux

Debian GNU/Linux
Copyright 2004 2010 Debian
Debian GNU/Linux 6.0 (squeeze)
32-bit PC (i386). ,
Debian.
: , i386
,
squeeze.
debian-installer (http://www.debian.org/devel/debian-installer/).
.

; /
GNU.
: . F.


Debian GNU/Linux 6.0 i386 .................................................................................. x
1. Debian ................................................................................................... 1
1.1. Debian? ............................................................................................................. 1
1.2. GNU/Linux? ..................................................................................................... 2
1.3. Debian GNU/Linux? ......................................................................................... 3
1.4. Debian GNU/kFreeBSD?.................................................................................. 4
1.5. Debian ............................................................................................................. 4
1.6. ........................................................... 4
1.7. ........................................................................................... 5
1.8. ..................................................... 5
2. ........................................................................................................... 7
2.1. ..................................................................................... 7
2.1.1. ........................................................................ 7
2.1.2. , ............ 8
2.1.2.1. ........................................................................ 8
2.1.2.2. - (I/O)....................................................................... 9
2.1.3. ............................................................................................................... 9
2.1.4. ....................................................................................... 9
2.1.5. ........................................................................................ 9
2.1.6. ............................................................ 10
2.1.6.1. .......................................................... 10
2.1.7. ................................................................................................. 10
2.1.8. ........................................................................... 10
2.1.9. ................................................................ 11
2.2. , ................................................ 11
2.3. GNU/Linux ........................... 11
2.3.1. 12
2.3.2. , Windows .......................... 12
2.4. ................................................................................................ 13
2.4.1. CD-ROM/DVD-ROM ........................................................................................... 13
2.4.2. ..................................................................................................... 13
2.4.3. USB............................................................................................. 13
2.4.4. ...................................................................................................................... 14
2.4.5. Un*x GNU..................................................................................... 14
2.4.6. ............................................................. 14
2.5. .................................................... 14
3. Debian GNU/Linux ................................................................................ 16
3.1. ............................................................................................ 16
3.2. !............................................................. 17
3.3. , ........................................................................... 18
3.3.1. .................................................................................................... 18
3.3.1.1. ................................................................... 18
3.3.1.2. ................................................................ 18
3.3.2. .............................................. 18
3.3.3. ..................................................... 19
3.3.4. ................................................................................................... 20
3.4. ........................................ 20
3.5. - ....................................................... 21

iii

3.5.1. DOS Windows........................................................... 23


3.5.1.1. DOS, Win-32 OS/2.. 23
3.5.1.2. DOS................................................................................. 24
3.6.
24
3.6.1. BIOS ........................................................................... 24
3.6.2. ..................................................................... 25
3.6.2.1. IDE ..................... 26
3.6.2.2. SCSI ................. 26
3.6.3. BIOS.................................................................................... 26
3.6.3.1. CD-ROM.............................................................................. 26
3.6.3.2. .......................................... 27
3.6.3.3. ................................................................................ 27
3.6.3.4. Shadow RAM............................................................................................ 27
3.6.3.5. Memory Hole ............................................................................................ 27
3.6.3.6. (Advanced Power Management)
27
3.6.4. , ............................... 27
4. .......................................................................... 29
4.1. - Debian GNU/Linux....................................... 29
4.2. - Debian.......................................................... 29
4.2.1. ................................................................... 29
4.3. USB ......................................... 30
4.3.1. Preparing a USB stick using a hybrid CD or DVD image .................................... 30
4.3.2. Manually copying files to the USB stick ............................................................... 31
4.3.3. Manually copying files to the USB stick the flexible way ............................... 31
4.3.3.1. USB .............................................................. 31
4.3.3.2. ....................................... 32
4.4. ............................................... 32
4.4.1. LILO GRUB
33
4.4.2. loadlin.... 33
4.5. TFTP................................................................ 33
4.5.1. DHCP ................................................................................. 34
4.5.1.1. PXE DHCP ......................... 34
4.5.2. BOOTP ............................................................................... 35
4.5.3. TFTP ................................................................................. 36
4.5.4. TFTP TFTP .................................. 36
4.6. .......................................................................................... 36
4.6.1. Debian ... 37
5. ............................................................................................. 38
5.1. 32-bit PC ................................................................ 38
5.1.1. CD-ROM ........................................................................................... 38
5.1.2. Windows ......................................................................................... 38
5.1.3. DOS................................................................................................. 39
5.1.4. Linux LILO GRUB ........................................... 39
5.1.5. USB ........................................................................ 40
5.1.6. TFTP ............................................................................................... 40
5.1.6.1. PXE .......... 40
5.1.6.2. BootROM .................................................... 40
5.1.6.3. Etherboot................................................................................................... 40

iv

5.1.7. .................................................................................................... 40
5.2. ..................................................................................................... 42
5.2.1. USB- ......................................................................................... 42
5.2.2. , ................. 42
5.2.3. ........................................................................... 43
5.2.4. ................................................................................ 43
5.2.5. .................................................................... 43
5.3. ...................................................................................................... 43
5.3.1. Debian .................................................... 44
5.3.2. ................. 47
5.3.3. ............................................................. 48
5.3.4. ...................................................... 49
5.4. ............................................................... 49
5.4.1. CD-ROM........................................................................................ 49
5.4.1.1. ..................................................................................... 50
5.4.1.2. ................................. 50
5.4.2. .......................................................................................... 52
5.4.3. 32-bit PC................................. 52
5.4.3.1. PCMCIA ........................... 53
5.4.3.2. USB ..................... 53
5.4.4. ............................................. 53
5.4.5. ......................................................... 53
5.4.6. ..................................................... 54
6. Debian............................................................. 56
6.1. ........................................................................... 56
6.2. ...................................................................................................... 57
6.3. ............................................................................. 59
6.3.1. Debian ........................ 60
6.3.1.1. /
60
6.3.1.2. ........................................................ 61
6.3.1.3. ................................................................................ 62
6.3.1.4. ISO Debian ............................. 62
6.3.1.5. ...................................................................................... 63
6.3.1.6. ................................................ 63
6.3.2. ............................................................ 64
6.3.2.1. (root).................................... 64
6.3.2.2. ......................... 64
6.3.3. ....................................... 65
6.3.3.1. ............................................. 65
6.3.3.2. ..................................................................... 66
6.3.3.3. ................................................................................ 68
6.3.3.4. Multidisk ( RAID).................... 69
6.3.3.5. (LVM)............................. 72
6.3.3.6. ........................................................ 73
6.3.4. ............................................................................. 77
6.3.5. .......................... 77
6.3.5.1. apt ......................................................................................... 78
6.3.5.1.1. CD DVD ..................... 78
6.3.5.1.2. - ............. 79
6.3.5.2. .............................. 80

6.3.6. .......................................... 81
6.3.6.1. ................................................. 81
6.3.6.2. Grub ........... 82
6.3.6.3. LILO ........... 82
6.3.6.4. ........................................ 83
6.3.7. ...................................................................................... 83
6.3.7.1. .......................................................... 83
6.3.7.2. .......................................................................... 83
6.3.8. Troubleshooting..................................................................................................... 83
6.3.8.1. ...................................................... 84
6.3.8.2.
84
6.3.9. .............................................................................................. 84
6.4. ................................................................ 86
6.4.1. ........................................................................................ 87
6.4.2. ................................................. 87
7. Debian ............................................... 89
7.1. ............................................................................................................... 89
7.2. .......................................................................... 89
7.2.1. dm-crypt ................................................................................................................ 89
7.2.2. loop-AES ............................................................................................................... 90
7.2.3. ...................................................................................... 90
7.3. ................................................................................................................ 91
8. ......................................................................... 93
8.1. .................................................................................................... 93
8.2. Unix ................................................................................................. 93
8.3. Debian............................................................... 93
8.3.1. Debian ........................................................... 93
8.3.2. ................................................................ 94
8.3.3. cron............................................................................. 94
8.4. ................................................................................................................... 94
8.5. ............................................................................................................ 95
8.5.1. ....................................................... 95
8.5.2. ............................................................................ 96
8.5.3. Exim4 .................................................. 96
8.6. ........................................................................................................ 97
8.6.1. .............................................................................. 98
8.7. ................................................................... 99
A. ............................................................................... 101
A.1. ....................................................................................... 101
A.2. ............................................................................... 101
A.2.1. CDROM ......................................................................................... 101
A.2.2. USB ..................................................................... 101
A.2.3. .............................................................................................. 102
A.2.4. ............................................................................ 102
A.3. ...................................................................................................................... 102
A.4. .......................................................................... 103
A.5. . . . ........................................................................................................... 104

vi

B. ...................................... 105
B.1. ........................................................................................................................ 105
B.1.1. ....................................................... 105
B.1.2. .................................................................................................... 106
B.2. ............................................................ 106
B.2.1. ................................................................................. 106
B.2.2. ...................... 107
B.2.3. ................................................................................. 108
B.2.4. .................................................... 109
B.2.5. DHCP
110
B.3. ............................................................................................. 110
B.4. ( squeeze)............................................................... 111
B.4.1. .................................................................................................... 112
B.4.2. ................................................................................................ 113
B.4.3. .............................................................................................. 114
B.4.4. -........................................................................... 114
B.4.5. ............................................................................ 115
B.4.6. .......................................................... 116
B.4.7. .............................................................................................. 116
B.4.7.1. ................................................................................ 117
B.4.7.2. RAID ................................................... 118
B.4.7.3. ............................................ 119
B.4.8. .......................................................................... 120
B.4.9. Apt.................................................................................................. 120
B.4.10. ............................................................................................... 121
B.4.11. .................................................................................. 122
B.4.12. ................................................................................. 122
B.4.13. ................................................................. 123
B.5. ..................................................................................... 123
B.5.1. ........................... 123
B.5.2.
124
B.5.3. ....................... 124
C. Debian .................................................................................................. 126
C.1. Debian ................................................................. 126
C.2. .................................................................................................. 126
C.3. .............................................................................. 128
C.4. Linux............................................................................................. 129
C.5. Debian .................................................................................. 129
C.5.1. 32-bit PC ................................................................................... 130
D. ....................................................................................................................................... 132
D.1. Linux ......................................................................................................... 132
D.1.1. ............................................................................................. 133
D.2. , .................................................. 134
D.3. Debian GNU/Linux Unix/Linux ............................................ 135
D.3.1. .......................................................................................................... 135
D.3.2. debootstrap.................................................................................... 136
D.3.3. debootstrap .......................................................................................... 137
D.3.4. .......................................................................... 137
D.3.4.1. ............................................................. 137

vii

D.3.4.2. .................................................................... 138


D.3.4.3. ................................................................ 139
D.3.4.4. ................................................................................... 139
D.3.4.5. Apt ..................................................................................... 140
D.3.4.6. .............................. 141
D.3.5. ............................................................................................... 141
D.3.6. .............................................................. 141
D.3.7. ................................................................................... 142
D.4. Debian GNU/Linux Parallel Line IP (PLIP) .................................... 143
D.4.1. ....................................................................................................... 143
D.4.2. ..................................................................................... 143
D.4.3. .................................................................................... 144
D.5. Debian GNU/Linux PPP Ethernet (PPPoE) .... 144
D.6. ............................................ 145
D.6.1. ... 146
E. .................................................................................................................... 147
E.1. ....................................................................................................... 147
E.2. ............................................................. 147
E.3. , ............... 147
E.4. ........................................................................................................... 148
F. GNU General Public License .................................................................................................... 149
F.1. Preamble........................................................................................................................... 149
F.2. GNU GENERAL PUBLIC LICENSE............................................................................. 149
F.3. How to Apply These Terms to Your New Programs........................................................ 153

viii


3-1. , .......................... 18
3-2. ...................................................... 21

ix

Debian GNU/Linux 6.0 i386


, Debian. ,
Debian GNU/Linux . Debian GNU/Linux
, .
, , ,
.
, Debian, ,
Debian .
, "
", ,

. . A .
, ,
, ,
.

1. Debian
Debian Debian GNU/Linux.
Debian Debian GNU/Linux,
.

1.1. Debian?
Debian , ,

(Free Software). Debian
1993 , (Ian Murdock)
,
Linux. ,
GNU (http://www.gnu.org/gnu/the-gnu-project.html),

(http://www.fsf.org/), ,
886 Debian.
Debian ,
Web (http://www.debian.org/) FTP (ftp://ftp.debian.org/) , ,
, , ,
.
,
Debian, Debian ,
, Debian:

Debian (http://www.debian.org/social_contract)
Debian .
, Debian
(http://www.debian.org/doc/maint-guide/).
Debian ,
,
.

Debian
(DFSG) (http://www.debian.org/social_contract#guidelines)
Debian . DFSG



(http://opensource.org/docs/definition_plain.html).

Debian (http://www.debian.org/doc/debian-policy/)
Debian.

Debian ,
Debian,
Linux. :

1. Debian

Linux Standard Base (http://www.linuxbase.org/) (LSB, Linux)


GNU/Linux,

Linux ,
GNU/Linux.

(http://www.pathname.com/fhs/) (FHS)
Linux. FHS

,
GNU/Linux.

Debian (http://www.debian.org/devel/debian-jr/),
, Debian .

(http://www.debian.org/doc/FAQ/).

Debian,

Debian

FAQ

1.2. GNU/Linux?
Linux : ,
.
() ,
, ;
, ;
; . .
GNU/Linux Linux.
, GNU GNU.
Linux ,
GNU/Linux ,
Linux.
Linux Unix. Linux
, .
, Linux
. , Linux , .
, Linux .
.
, GNU/Linux, 1984 ,
(http://www.fsf.org/)
Unix- , GNU.
GNU (http://www.gnu.org/)
Unix Unix-
, Linux.
, ( )
(
).

Linux,
. ,

1. Debian
(
-). , ,
Linux .
Linux (http://www.kernel.org/) 1991 , (Linus Torvalds)
Minix comp.os.minix. Linux
Internationals Linux (http://www.cs.cmu.edu/~awb/linux.history.html).

.
(http://www.kernel.org/) Linux.
linux-kernel FAQ linux-kernel (http://www.tux.org/lkml/).
Linux .
, Linux
.
, ,
.
Linux ,
,
. , Linux
. , Linux
.

1.3. Debian GNU/Linux?


Debian, GNU, Linux
, Debian
GNU/Linux. .
, , ,
,
,
(bug reports) .

, .
Debian ,
.
: (firewall),
, .
Debian -
Linux. Debian
Linux, .
, Debian Linux,
.
Linux, .
Debian Linux.
, (Open
Source) ,
.

1. Debian
Debian Linux
. Debian
, ,
. ,
.
, , .
,
Debian ,
Debian. , Debian
.
, .
Debian
.
Debian GNU/Linux
Debian Debian
( 245).
Debian
(http://www.debian.org/MailingLists/subscribe) .

1.4. Debian GNU/kFreeBSD?


Debian GNU/kFreeBSD Debian GNU kFreeBSD.
Debian i386 amd64,
.
, Debian GNU/kFreeBSD Linux,
Linux .

(http://www.debian.org/ports/kfreebsd/)
<debian-bsd@lists.debian.org>.

Debian
GNU/kFreeBSD

1.5. Debian
, Debian GNU/Linux
- Debian,

(http://www.debian.org/distrib/).

-
Debian
(http://www.debian.org/distrib/ftplist)
Debian, .
Debian .
,
, .

1.6.

Debian
6.0
(http://www.debian.org/releases/squeeze/)

1. Debian
6.0 Debian GNU/Linux.

(http://www.debian.org/releases/squeeze/i386/).

1.7.
Debian.
. , ,
, (hardware) .

, , ,
Debian .
.
,
. Debian GNU/Linux
:
1. ,
(. 2).
2. ,
Debian (. 3).
- , , ,
Debian.
3. , (. 4).
4. . 5 .
.
5. . 6. ,
,
Debian (
-), ,
, . (
Debian . C.)
6. . 7.

. 8. ,
Unix Debian, .
, ,
. E.

1.8.
, ,
,
.

1. Debian
. Debian GNU/Linux
.
!
.
- , Debian
.
, ,
, , -,
, . ,
, ,
.
, ,
, .
: , Debian, ,
, . ,
,
contrib non-free - Debian -;

FTP- Debian Debian FAQ (http://www.debian.org/doc/FAQ/).


GNU , GPL. GPL
,
; ,
. , Debian
1 .
Debian
. ,
/usr/share/doc/- /copyright .
, Debian ,
, (main)
, Debian
(http://www.debian.org/social_contract#guidelines).

. , , .

- . , ,

, ,
.

1. , Debian, Debian FAQ (http://www.debian.org/doc/FAQ/),


Debian.

2.
,
Debian. , ,
GNU Linux.

2.1.
Debian , Linux
kFreeBSD GNU. , ,
Linux kFreeBSD, libc, gcc ..
Debian, Debian.
http://www.debian.org/ports/i386/, 32-bit PC
Debian GNU/Linux.
, ,
32-bit PC, ,
.

2.1.1.
Debian GNU/Linux 6.0
, (flavors).


Debian

Intel
x86

i386

AMD64 & Intel


EM64T

amd64

ARM

armel

HP PA-RISC

hppa

Intel IA-64

ia64

MIPS (
)

mips

Intel IOP32x

iop32x

Intel IXP4xx
Marvell Kirkwood
Marvell Orion

ixp4xx
kirkwood
orion5x

Versatile

versatile

PA-RISC 1.1

32

PA-RISC 2.0

64

SGI IP22 (Indy/Indigo


2)
SGI IP32 (O2)
MIPS Malta
(32-)

r4k-ip22

MIPS Malta
(64-)

5kc-malta

r5k-ip32
4kc-malta

2.


Debian

MIPS (
)

mipsel

Cobalt

cobalt

MIPS Malta
(32-)
MIPS Malta
(64-)

4kc-malta

PowerMac

pmac

PReP

prep

sun4u

sparc64

IBM/Motorola
PowerPC

Sun SPARC

powerpc

sparc

5kc-malta

sun4v
IBM S/390

s390

IPL VM-reader
DASD
IPL

generic
tape

Debian GNU/kFreeBSD 6.0 .

Debian

Intel x86

kfreebsd-i386

AMD64 & Intel EM64T

kfreebsd-amd64

32-bit PC.
, Debian,
Debian (http://www.debian.org/ports/).

2.1.2. ,


Linux Hardware Compatibility HOWTO (http://www.tldp.org/HOWTO/Hardware-HOWTO.html).
.

2.1.2.1.
x86- (IA-32) ,
, Intel "Pentium". 32-
AMD VIA ( Cyrix), Athlon XP Intel P4 Xeon.
, Debian GNU/Linux squeeze 386 .
, "i386", Debian Sarge (r3.1)
80386 ( )1. ( Linux
1. , -
, C++ ABI, GCC. Debian GNU/Linux

2.
286 .) i486
2.
: 64- AMD64 Intel EM64T, , , amd64
(32-) i386.

2.1.2.2. - (I/O)
,
, , .
ISA, EISA, PCI, PCIe, PCI-X VESA Local Bus (VLB,
VL ). , ,
, .

2.1.3.

,
. Linux (http://www.linux-laptop.net/)
, GNU/Linux .

2.1.4.

(symmetric multi-processing) SMP.
Debian 6.0 SMP-alternatives. ,
( )
SMP .
486 Debian 32-bit PC SMP.

2.1.5.
VGA- - .
VGA. ,
CGA, MDA HGA , X11.
, X11 , ,
.
80386,
, .
2. ,
Debian . i486,
1989 , (bswap, cmpxchg xadd), i386,
1986 . , Debian;
.

2.
Debian
X.Org X11. AGP, PCI, PCI PCI-X
X.Org. , ,
http://xorg.freedesktop.org/. Debian6.0 X.Org 7.5.

2.1.6.
(NIC), Linux,
;
. PCI PCMCIA.
ISA.
ISDN , .

2.1.6.1.
, , ,
Linux,
. ,
. . 6.4 ,
.
, Linux, ,
Debian GNU/Linux, .

WEP. ,
.
,
, Debian
GNU/Linux CD-ROM DVD.
CD/DVD.
( ) ,
, .
, Debian.
.
. Linux ,
ndiswrapper, Windows.

2.1.7.
brltty.
, ,
USB bluetooth. brltty
(http://www.mielke.cc/brltty/). Debian GNU/Linux 6.0 brltty 4.2.

10

2.

2.1.8.
speakup. speakup
,
(USB serial-to-USB ).
speakup (http://www.linux-speakup.org/).
Debian GNU/Linux 6.0 speakup 3.1.5.

2.1.9.
Linux , , , , PCMCIA USB . ,
.
USB ,
USB-, (
. 3.6.4).
, Linux Linux Hardware Compatibility HOWTO (http://www.tldp.org/HOWTO/Hardware-HOWTO.html).

2.2. ,

, ,
.
( ),
USB .
,
, Debian GNU/Linux,
.
Debian GNU/Linux
, , ,
non-free.
, ,
. Debian GNU/Linux 5.0, debian-installer

, USB-. ,
. . 6.4.

2.3.
GNU/Linux

(http://www.debian.org/distrib/pre-installed) Debian
GNU/Linux. , ,

11

2.
, ,
GNU/Linux.
Windows, ,
Windows; ,
. windows refund
.
Linux ,
, , ,
Linux. ,
, . ( ),
Linux. Linux .

2.3.1.


.
,
Linux.

Linux. ,
. , ,
.

2.3.2. ,
Windows
Windows- .

Microsoft Windows WinModem
Windows.
, Windows,
. , , ,

, .
Windows . :
, Linux .
, ,
, .
,
. :
,
,
, ,
.
Windows Linux,
, Windows ,
.

12

2.
, Windows 2000 XP,
,
, .
,
,
,
Linux Hardware Compatibility HOWTO (http://www.tldp.org/HOWTO/Hardware-HOWTO.html).

2.4.
,
Debian. , ,
Debian. ,
(. 4),
. ,
.

2.4.1. CD-ROM/DVD-ROM
: CD-ROM ,
CD-ROM, DVD-ROM,
, (
SCSI IDE/ATAPI) CD-ROM.

CD-ROM . ,
CD-ROM,
. CD-ROM,
CD-ROM
; . 5.
SCSI, SATA IDE/ATAPI CD-ROM-. Linux CD-ROM HOWTO
(http://www.tldp.org/HOWTO/CDROM-HOWTO.html)
CD-ROM Linux.
CD-ROM, USB, FireWire,
ohci1394 sbp2.

2.4.2.
,
. -
.

13

2.

2.4.3. USB
Debian / -
. ,

USB ( ) .
, .

2.4.4.
.

, .
( PPPoE, ISDN
PPP), HTTP FTP. ISDN PPP
.
.

NFS.

2.4.5. Un*x GNU


Unix ,
Debian GNU/Linux debian-installer,
. -
, .
, . D.3.

2.4.6.
Debian ,
, . ,
-
, , , (
. 8.6, ).
,
, Debian .
Debian , IDE (
PATA), IDE, IDE, ,
/ SATA SCSI, USB FireWire.
FAT, Win-32 FAT (VFAT) NTFS.
,
AT, MFM, RLL, IDE PATA.
SATA SCSI . . Linux
Hardware Compatibility HOWTO (http://www.tldp.org/HOWTO/Hardware-HOWTO.html).

14

2.

2.5.

56MB
650MB . , ,
. . 3.4.
3
, .

3. , , ,
,
56MB .
, .

15

3. Debian
GNU/Linux
,
Debian: ,
.

3.1.
-, . ,
Debian ;
.

.
, ,
.
Debian GNU/Linux ,
. ""
; .
.
,
Debian
. ,
, .

.
, .
1. ,
.
2.
.
3. Debian .
4. /
( - Debian ).
5. //USB-
( - Debian
-).
6. .
7. .
8. , , ethernet.
9. , Debian.
10.
.

//

16

3. Debian GNU/Linux
11. , Debian GNU/Linux
/ .
12. .
32-bit PC .
, . D.6.
, ,
.
"":
, debian-installer ,
.
, dhcp-client ,
debootstrap tasksel ,
.
, debian-installer
.
tasksel,

, , .

, X
.
, ,
.
, , -
, Debian GNU/Linux ,
.
X
debian-installer, , .

X
.

3.2. !
, , .
,
, Debian
GNU/Linux. , ,
. ,
, ; ;
,
.
.
.
- , ,
, .
, ,

17

3. Debian GNU/Linux
, ,
.

3.3. ,
3.3.1.
3.3.1.1.
, ,
Debian squeeze
(http://www.debian.org/releases/squeeze//installmanual).

3.3.1.2.

.

Linux

(http://www.tldp.org/HOWTO/Hardware-HOWTO.html)

HOWTO

3.3.2.

.
.
:

, .

BIOS. ,
.
. Delete.

"" Windows.

,
.
.

.
.

3-1. ,

18

3. Debian GNU/Linux

.
.
IDE (. PATA), SATA SCSI.
.
.
,
.

.
.
.
.
(
).
.

: , PS/2
USB.
.
.
.

.
.

.
.

.
.

(
).

3.3.3.
Linux.
, Linux . ,
Linux
.
, Linux ,
Windows.

19

3. Debian GNU/Linux
"--Windows"
Linux,
. , Linux Windows-
. ,
.
-
. ,
Windows-.
:

.
.

Linux ,
.

3.3.4.
24 (, Ethernet
, PPP ),
:

( ).

IP- .

IP- , .

, DNS (Domain Name Service) .

, , DHCP
, ,
DHCP
.
, :

ESSID .

WEP ( ).

20

3. Debian GNU/Linux

3.4.

, ,
.
, ,
. ,
, .

Pentium 4, 1 .
3-2.

()

()

64

256

128

512

,
. , Debian
20 ( s390) 60 ( amd64).
, , ,
;
. D.2.

, ,
, GNOME KDE;
xfce4, icewm wmaker, .

, , .
, ,
: , . ,
.
, Debian GNU/Linux
. , /var
Debian ,
. dpkg ( )
40. apt-get . ,
200 /var ,
.

3.5. -
.
. , , ;

21

3. Debian GNU/Linux
, .
(Windows 9x, Windows
NT/2000/XP/2003/Vista/7, OS/2, MacOS, Solaris, FreeBSD, . . . ) Debian
, . Debian
. Windows MacOS. Unix,
. ,
Debian.

, , fdisk PartitionMagic.
.

.
. ,
.
,
Debian. ,
; ,
.

Debian GNU/Linux,
(. 6.3.3)
. ,
, CD-ROM . :

, , ,
.
, , CD.
,
,
Debian. ,
, ,
,
.
FAT NTFS, DOS
Windows,
Debian .
,
, Debian.
,
.
Debian GNU/Linux
.
, .
,
Debian. Windows
Debian
.

22

3. Debian GNU/Linux
,
.
(
) Debian, :
1. .
2. CD-ROM .
3. ().
-, Debian GNU/Linux.
4. .
5. , ,
Debian.
6. Debian, Debian.

3.5.1. DOS Windows


FAT NTFS,
, Windows,
DOS. , DOS Windows;
Debian .
IDE LBA ,
( )
( 1998 ) BIOS,
, Debian.
1024
( 524 BIOS).
FAT NTFS.

3.5.1.1. DOS, Win-32


OS/2
: ,
DOS ( Windows 3.1), Win32 ( Windows 95, 98, Me, NT, 2000, XP, 2003, Vista,
7) OS/2, Debian
. ,
FAT NTFS, DOS Windows.
, , .
, .
- , .
.
, Debian. Debian
Debian, ,
.
,
.
,

23

3. Debian GNU/Linux
, ,
, .
-,

fips.
RESTORRB.EXE, FIPS.EXE ERRORS.TXT .
sys a: DOS. fips ,
. ,
.
.
, . defrag
DOS 6.0 .
fips , . , Windows 9x, defrag , DOS VFAT,
Windows 95 .
( ),
fips. a:\fips .
, , fips -
.

3.5.1.2. DOS
DOS DOS
Debian, ,
FAT. ,
, scandisk
DOS Windows.
, DOS
. ,
DOS format, Debian:
# dd if=/dev/zero of=/dev/hdXX bs=512 count=4

3.6.

,
Debian. , ,
. (firmware)
;
( ).
, Debian
GNU/Linux.

24

3. Debian GNU/Linux

3.6.1. BIOS
BIOS ,
. , BIOS
. , BIOS
;
Debian.
http://www.faqs.org/faqs/pc-hardware-faq/part1/ ,
CMOS?. BIOS
( CMOS), BIOS:
AMI BIOS
Delete POST (power on self test,
)
Award BIOS
Ctrl-Alt-Esc Delete POST
DTK BIOS
Esc POST
IBM PS/2 BIOS
Ctrl-Alt-Insert Ctrl-Alt-Delete
Phoenix BIOS
Ctrl-Alt-Esc Ctrl-Alt-S F1

http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/install.html.

BIOS

32-bit PC CMOS BIOS.


CMOS.
/ ,
shareware/freeware .
ftp://ftp.simtel.net/pub/simtelnet/msdos/.

3.6.2.
BIOS ,
. ,
A: ( ), ,
, CD-ROM (, D: E:) C:
( ). , ,
CD-ROM,
, Debian.
SCSI- CD-ROM, ,
CD-ROM. , ,
CD-ROM BIOS SCSI-.
USB (
USB USB). BIOS

25

3. Debian GNU/Linux
USB, . USB
BIOS Removable drive
USB-ZIP.
.
Linux .

3.6.2.1. IDE
1. , BIOS.
Delete. , ,
.
2. . BIOS,
.
IDE: C, A, cdrom A, C, cdrom.
C , A .
3. , CD-ROM .
, Page Up Page Down,
.
4. . .

3.6.2.2. SCSI
1. ,
SCSI.
SCSI ,
, .
. , Ctrl-F2. ,
.
2. .
3. , SCSI ID .
4. . . ,
F10.

3.6.3. BIOS
3.6.3.1. CD-ROM
BIOS (, Award BIOS)
CD.
. seek failed,
, .

26

3. Debian GNU/Linux

3.6.3.2.
(extended) (expanded)
, , ,
. Linux .

3.6.3.3.
BIOS .
, ,
GNU/Linux.
GNU/Linux; , -
Linux, 1.

3.6.3.4. Shadow RAM


shadow RAM BIOS.
Video BIOS Shadow, C800-CBFF Shadow ...
. Shadow RAM
. Linux
, 32-
16- . shadow RAM
. shadow
RAM Linux .

3.6.3.5. Memory Hole


BIOS - 1516 MB Memory Hole, . Linux
, .
Intel Endeavor,
LFB Linear Frame Buffer. Disabled 1
Megabyte. 1 Megabyte. ,
, .
, ,
, .

3.6.3.6. (Advanced
Power Management)

(APM), , APM. doze,
standby, suspend, nap sleep, .
Linux , BIOS.

1. , .
Linux, Windows, .
(MBR) .

27

3. Debian GNU/Linux

3.6.4. ,

USB BIOS . AT, USB


, (legacy) AT
BIOS.
USB . , (
) , .
BIOS Legacy keyboard emulation USB keyboard support.

28

4.

4.1. - Debian
GNU/Linux
Debian GNU/Linux
- Debian ( -
Debian (http://www.debian.org/CD/vendors/)). ,
- - Debian ,
-
( Debian GNU/Linux -
(http://www.debian.org/CD/)). - Debian
CDROM, . 5;
, ,
.
, ,
. DVD ,
-
.
-, CD,
, ,
, usb, , CD.
- ; Debian
CD . , ,
,
CD.
,
-.
CD,
, usb,
.

4.2. - Debian
( , , ) -
- Debian (http://www.debian.org/distrib/ftplist).
- Debian FTP ,
, .

4.2.1.

-
Debian

debian/dists/squeeze/main/installer-i386/current/images/

29

4.
(http://http.us.debian.org/debian/dists/squeeze/main/installer-i386/current/images)

MANIFEST
(http://http.us.debian.org/debian/dists/squeeze/main/installeri386/current/images/MANIFEST)

4.3.
USB
USB GNU/Linux
USB. USB
. , ,
usb-storage. USB- ,
/dev/sdX, X a-z. ,
USB dmesg.
.

, , !
USB. ,
- , , .

4.3.1. Preparing a USB stick using a hybrid CD or DVD


image
Debian CD and DVD images can now be written directly a USB stick, which is a very easy way to
make a bootable USB stick. Simply choose a CD or DVD image that will fit on your USB stick. See
. 4.1 to get a CD or DVD image.
Alternatively, for very small USB sticks, only a few megabytes in size, you can download the
mini.iso image from the netboot directory (at the location mentioned in . 4.2.1). 1
The CD or DVD image you choose should be written directly to the USB stick, overwriting its current
contents. For example, when using an existing GNU/Linux system, the CD or DVD image file can be
written to a USB stick as follows:
# cat debian.iso > /dev/sdX
# sync

1. A special method can be used to add firmware to the mini.iso. First, write the mini.iso to the USB stick. Next
obtain the necessary firmware files. See . 6.4 for more information about firmware. Now unplug and replug the USB
stick, and two partitions should now be visible on it. You should mount the second of the two partitions, and unpack the
firmware onto it.
# mount /dev/sdX2 /mnt # cd /mnt # tar zxvf ///firmware.tar.gz # cd / # umount

30

4.

4.3.2. Manually copying files to the USB stick


An alternative way to set up your USB stick is to manually copy the installer files, and also a CD
image to it. Note that the USB stick should be at least 256 MB in size (smaller setups are possible if
you follow . 4.3.3).
"--" hd-media/boot.img.gz,
( ) , syslinux .
, , :
256 , USB .
USB ,
, .
, CD-
USB, CD- , businesscard netinst.
, USB:
# zcat boot.img.gz > /dev/sdX

, USB (mount /dev/sdX /mnt),


FAT ISO- Debian netinst
businesscard. (umount /mnt) .

4.3.3. Manually copying files to the USB stick the flexible


way
,
,
. , USB
, CD ISO.

4.3.3.1. USB
,
.
: USB
FAT16, , , .
, cfdisk
FAT162, :
# mkdosfs /dev/sdX1

USB. mkdosfs
Debian dosfstools.

USB,
. (, lilo),
2.

bootable.

31

4.
syslinux, FAT16
.
,
FAT.
syslinux FAT16 USB,
syslinux mtools
# syslinux /dev/sdX1

: .
syslinux.
ldlinux.sys, .

4.3.3.2.
(mount /dev/sdX1 /mnt),
:
vmlinuz

linux ( )

initrd.gz

( ramdisk)


. gtk.
, , syslinux
DOS (8.3).
, syslinux.cfg, ,
( linux,
netboot):
default vmlinuz
append initrd=initrd.gz

vga=788
.
hd-media, ISO- Debian3
. , USB (umount /mnt).

4.4.

,
,
BIOS.
3. businesscard, netinst CD (. . 4.1). ,
. , netboot mini.iso .

32

4.
.
, , CD
.

4.4.1.
LILO GRUB
linux
LILO GRUB.

, . RAMdisk
.
Debian
(, LILO
NTFS), , /boot/newinstall/.
vmlinuz

( )

initrd.gz

( ramdisk)

. 5.1.4.

4.4.2.
loadlin

DOS loadlin.
Debian CD c:\.
/install.386
/tools

( ramdisk)

( loadlin)

4.5. TFTP
,
TFTP.
.
TFTP , , DHCP .
BOOTP IP , IP-
. DHCP (Dynamic Host Configuration Protocol)
BOOTP.
DHCP.

33

4.
Trivial File Transfer Protocol (TFTP)
. ,
, .
SunOS 4.x, SunOS 5.x ( Solaris) GNU/Linux.
: Debian GNU/Linux tftpd-hpa.
syslinux , , .
atftpd.

4.5.1. DHCP
DHCP ISC dhcpd. Debian GNU/Linux
dhcp3-server. (
/etc/dhcp3/dhcpd.conf):
option domain-name "example.com";
option domain-name-servers ns1.example.com;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
server-name "servername";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.253;
option routers 192.168.1.1;
}
host clientname {
filename "/tftpboot.img";
server-name "servername";
next-server servername;
hardware ethernet 01:23:45:67:89:AB;
fixed-address 192.168.1.90;
}

servername,
DHCP, TFTP .
domain-name, . filename
, TFTP.
dhcpd,
/etc/init.d/dhcp3-server restart.

4.5.1.1. PXE DHCP


dhcp.conf, ,
(PXE) TFTP.
option domain-name "example.com";

34

4.

default-lease-time 600;
max-lease-time 7200;
allow booting;
allow bootp;
#
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.253;
option broadcast-address 192.168.1.255;
# ,
# ( , )
option routers 192.168.1.1;
# dns
option domain-name-servers 192.168.1.3;
}
group {
next-server 192.168.1.3;
host tftpclient {
# tftp
hardware ethernet 00:10:DC:27:6C:15;
filename "/pxelinux.0";
}
}

, PXE filename pxelinux.0


, ( . 4.5.4).

4.5.2. BOOTP
GNU/Linux BOOTP . CMU bootpd. ,
DHCP ISC dhcpd. Debian GNU/Linux
bootp dhcp3-server .
CMU bootpd, -, (
) /etc/inetd.conf. Debian GNU/Linux
update-inetd --enable bootps, /etc/init.d/inetd
reload. BOOTP Debian, :
bootps

dgram

udp

wait

root

/usr/sbin/bootpd

bootpd -i -t 120

/etc/bootptab.
BSD printcap, termcap
disktab. bootptab. CMU bootpd
(MAC) . /etc/bootptab:
client:\
hd=/tftpboot:\
bf=tftpboot.img:\
ip=192.168.1.90:\
sm=255.255.255.0:\

35

4.
sa=192.168.1.1:\
ha=0123456789AB:

, , ha,
. bf , TFTP;
. 4.5.4.
, BOOTP ISC dhcpd , BOOTP
DHCP.
BOOTP. ,
. 4.5.1. , allow
bootp , , /etc/dhcp3/dhcpd.conf
dhcpd /etc/init.d/dhcp3-server restart.

4.5.3. TFTP
TFTP , - tftpd.
tftpd-hpa .
inetd,
. ,
.
: , TFTP- /tftpboot
. , Debian GNU/Linux ,
Filesystem Hierarchy Standard (http://www.pathname.com/fhs/). ,
tftpd-hpa /srv/tftp.
.

, in.tftpd, Debian,
TFTP .
-v, .
;
.

4.5.4. TFTP TFTP

, TFTP . 4.2.1
tftpd. , tftpd
. ,
TFTP .
PXE, netboot/netboot.tar.gz.
tftpd. , dhcp
pxelinux.0 tftpd .

36

4.

4.6.

. Debian: fai-quickstart
( ) Debian.
FAI (http://fai-project.org).

4.6.1.
Debian
Debian
.
, ,
.
,
, . B.

37

5.
5.1. 32-bit PC

(
), ,
.
"" (
) ,
.

: ,
. D.6.

5.1.1. CD-ROM
-
Debian. -
-, !
-,
- . 3.6.2,
.
, -
, .
CD ,
,
.
CD-ROM, ,
CD-ROM Debian . , ,
. ,
, CD-ROM.
. 5.4.

5.1.2. Windows
Windows,
CD-ROM/DVD-ROM USB
. 4.1 . 4.3.
CD-ROM DVD-ROM, ,
. Windows , USB,
, setup.exe.

38

5.
, ,
Debian GNU/Linux.

5.1.3. DOS
DOS ( Windows).
.
CD, CDROM,
d:

, , (. 4.4.2),
, .
, ,
cd \install.386

,
gtk.
cd gtk

install.bat. .

5.1.4. Linux LILO GRUB



( . 4.4).
,
,
netboot/debian-installer/i386/initrd.gz

netboot/debian-installer/i386/linux.
, .
,
, hd-media/initrd.gz ,
CD ( DVD) (,
.iso).
CD/DVD .
LILO /etc/lilo.conf:

initrd.gz;

vmlinuz RAM .

/etc/lilo.conf:
image=/boot/newinstall/vmlinuz
label=newinstall

39

5.
initrd=/boot/newinstall/initrd.gz

initrd(4) lilo.conf(5).
lilo .
GRUB . menu.lst /boot/grub/
( /boot/boot/grub/) ,
(, /boot
):
title
root
kernel
initrd

New Install
(hd0,0)
/boot/newinstall/vmlinuz
/boot/newinstall/initrd.gz

GRUB LILO.

5.1.5. USB
, . 3.6.2 . 4.3.
USB USB .
boot:.
, Enter.

5.1.6. TFTP

TFTP (DHCP, RARP BOOTP).
. 4.5.
TFTP i386.

5.1.6.1. PXE
, (NIC)
PXE. TFTP Intel.
BIOS .

5.1.6.2. BootROM
, (NIC) TFTP.

5.1.6.3. Etherboot
etherboot (http://www.etherboot.org)
(bootrom) TFTPboot.

40

5.

5.1.7.
Debian
:
Installer boot menu
Install
Graphical install
Advanced options
Help

>

Press ENTER to boot or TAB to edit a menu entry

, Graphical install
.
Install Graphical install
() , Enter
.
Advanced options ,
,
.
-
, Tab.
, .
( ) . Enter
;
, Esc.
Help, ,
. ,
, . ,
F3 F4 , ,
. ,
:
Press F1 for the help index, or ENTER to boot:

, Enter
,
.
. - ,
, ( install),
(, install fb=false).
: ,
. , ()
, ,
. Wikipedia
(http://en.wikipedia.org/wiki/Keymap#US),
.

41

5.
: , BIOS
,
; .
, ,
VGA .
Compaq integrated Lights Out (iLO) HP Integrated Remote Assistant
(IRA).
Esc
, ( ) H Enter
Help, . , , .
- ,
vga=normal fb=false,
.

5.2.
-,
, . USB- ,


. ( )
, .

( . 5.1.7). ,
, QWERTY.

5.2.1. USB-
USB- .
,
. Enter
. , brltty,
. brltty (http://www.mielke.cc/brltty/doc/drivers/).

5.2.2. ,

, ,
( ).
brltty= , , ,
brltty, .
- (.

(http://www.mielke.cc/brltty/doc/Manual-BRLTTY/English/BRLTTY-11.html)).
,
, ttyS0.

42

5.
(.
(http://www.mielke.cc/brltty/doc/Manual-BRLTTY/English/BRLTTY-6.html));
. ,
.
- brltty (http://www.mielke.cc/brltty/doc/drivers/).

5.2.3.

.
Graphical install.
.
speakup.synth= , speakup,
.
(. (http://www.linux-speakup.org/spkguide.txt)).
,

.

5.2.4.
,
.
, -
vga=normal fb=false. ,
.

, h Enter.

5.2.5.

- , . ,
theme=dark.

5.3.
Linux,
, .
. ,
.
,
( ) , .
, . ,

43

5.
,
.
Linux BootPrompt HOWTO
(http://www.tldp.org/HOWTO/BootPrompt-HOWTO.html),
.
.
. 5.4.
:
Memory:availk/totalk available

total .
,
mem=ram , ram , k,
m, . , mem=65536k mem=64m
64 .
,
.
(-) ,
, console= ,
, ttyS01.

5.3.1. Debian
2,
.
,
.
, ()
. .
debconf/priority (priority)
.
priority=high. ,
,
. ,
.
priority=medium ,
.
priority=low (
expert). priority=critical,

.
1. , ,
TERM= . ,
: linux, bterm, ansi, vt102 dumb.
debian-installer vt102.
2. (2.6.9 ) 32 32
.

44

5.
DEBIAN_FRONTEND
,
.
:
DEBIAN_FRONTEND=noninteractive
DEBIAN_FRONTEND=text
DEBIAN_FRONTEND=newt
DEBIAN_FRONTEND=gtk

DEBIAN_FRONTEND=newt.
DEBIAN_FRONTEND=text . ,

newt.
gtk.
BOOT_DEBUG
2
.
3
. (
.)
BOOT_DEBUG=0

.
BOOT_DEBUG=1

.
BOOT_DEBUG=2

.
BOOT_DEBUG=3


, .
.
INSTALL_MEDIA_DEV
,
Debian. , INSTALL_MEDIA_DEV=/dev/floppy/0
USB
.
.
lowmem
lowmem
,
. 1 2. . 6.3.1.1.

45

5.
noshell
tty2
tty3. ,
.
debian-installer/framebuffer (fb)

- . -
, vga=normal
fb=false. bterm bogl,
.
debian-installer/theme (theme)

(, ..). .
newt gtk dark,
.
theme=dark .
netcfg/disable_dhcp
, debian-installer
DHCP. ,
.
DHCP.
DHCP , ,
, , ,
netcfg/disable_dhcp=true, DHCP
.
hw-detect/start_pcmcia
false, PCMCIA ,
. .
disk-detect/dmraid/enable (dmraid)
true, Serial ATA RAID (
ATA RAID, BIOS RAID -RAID) . ,
.
Debian Installer (http://wiki.debian.org/DebianInstaller/).
preseed/url (url)
url
. . 4.6.
preseed/file (file)
.
. 4.6.
preseed/interactive
true ,
.

46

5.
. , ,
,
. . B.5.2.
auto-install/enable (auto)
, ,
.
. B.2.3.
finish-install/keep-consoles

(VT1-VT6) /etc/inittab. true,
.
cdrom-detect/eject
, debian-installer
-, . ,
- .
, ,
-
. , slim-line caddy
.
false, ,
-
.
base-installer/install-recommends (recommends)
false,
,
.
, ,
,
.
.
.
debian-installer/allow_unauthenticated

gpg. true
. : ,
.
rescue/enable
true ,
. . 8.7.

47

5.

5.3.2.

,
, .
. B.2.2.
.
debian-installer/language (language)
debian-installer/country (country)
debian-installer/locale (locale)
, ,
.
locale.
. ,
locale=de_CH (
de_CH.UTF-8 ).
, .
, . locale

. : language=en country=DE locale=en_GB.UTF-8.
anna/choose_modules (modules)

, .
, openssh-client-udeb (
, scp) ppp-udeb
( PPPoE).
netcfg/disable_dhcp
true, DHCP
.
mirror/protocol (protocol)
, http
- Debian, ftp
. ftp,
. , ftp , .
tasksel:tasksel/first (tasks)
,
, kde-desktop.
. 6.3.5.2.

5.3.3.
,
.

48

5.
- ,
.
, ,
,
.
.
, .

.
.
:
_ ._ =

,
. , 3Com
BNC () IRQ 10, :
3c509.xcvr=3 3c509.irq=10

5.3.4.
,
udev.
, . ,
.
,
.

:

/etc/modprobe.d/blacklist.local .

module_name.blacklist=yes.

, .
,
, .

5.4.
5.4.1. CD-ROM
, CD-ROM,
CD-ROM. (
CD-ROM) CD-ROM
.

49

5.
.
. .
,
.

CD-ROM , ,
.

CD-ROM,
CD-ROM . DMA
CD-ROM .

, . , ,
CD-ROM DVD,
CD-ROM.
CD-ROM, ,
, .

5.4.1.1.

CD-ROM ,
CD.

CD-ROM, , Linux
CD-ROM (, , ,
CD-ROM).

CD-ROM ,
(DMA).

5.4.1.2.
CD-ROM , .

, BIOS CD-ROM (,
), CD-ROM .

iso, , md5sum
MD5SUMS, , .
$ md5sum debian-testing-i386-netinst.iso
a20391b12f7ff22ef705cee4059c6b92 debian-testing-i386-netinst.iso

, md5sum CD-ROM .
. CD-ROM ,
.
$ dd if=/dev/cdrom | \
> head -c stat --format=%s debian-testing-i386-netinst.iso | \

50

5.
> md5sum
a20391b12f7ff22ef705cee4059c6b92 262668+0 records in
262668+0 records out
134486016 bytes (134 MB) copied, 97.474 seconds, 1.4 MB/s

CD-ROM,
. CD-ROM,
CD-ROM. CD-ROM
, , ,
. Linux.
,
(VT2) .

VT4 /var/log/syslog (
nano), .
dmesg.

dmesg , CD-ROM . ( ):
Probing IDE interface ide1...
hdc: TOSHIBA DVD-ROM SD-R6112, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20

, , ,
CD-ROM, .
, ,
modprobe.

, CD-ROM
/dev/. , /dev/hdc.
/dev/cdroms/cdrom0.

mount , CD-ROM ; ,
:
$ mount /dev/hdc /cdrom

, .

, DMA:
$ cd /proc/ide/hdc
$ grep using_dma settings
using_dma
1
0

rw

1 . , :
$ echo -n "using_dma:0"
>settings

51

5.
, ,
CD-ROM.

,
CD-ROM .
CD-ROM.

5.4.2.
,
,
, . 5.3.
, , ,
. ,
Plug-n-Play.
, 512
,
mem=512m.

5.4.3. 32-bit
PC
,
.
DCL.
, , ,
floppy=thinkpad.
, IBM PS/1 ValuePoint (
ST-506), IDE .
, IDE.
, ( , )

hd= , ,
.
Checking hlt
instruction..., no-hlt,
.
( ),
4:3 ( , , 800x600 1024x768),
.
vga=7883. ,
fb=false.
3. vga=788 - VESA 800x600. , , ,
.
vga=ask, , .

52

5.
, , ,
, , ,
, -.
, fb=false,
- . -
. . . 5.3.

5.4.3.1. PCMCIA
Dell ,
PCMCIA .
.
PCMCIA ,
PCMCIA hw-detect/start_pcmcia=false.
PCMCIA, ,
.
: .
,
. , Dell, ,
exclude port 0x800-0x8ff. ,
System resource settings section of the PCMCIA HOWTO
(http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-HOWTO-1.html#ss1.12). ,
, .

5.4.3.2. USB
, USB USB ,
USB. ,
USB , . ,
USB BIOS
. nousb
.

5.4.4.
cant find -
- not present, cant initialize -
this driver release
depends on - . .
,
. ,
,
, . ,
, . -
, . ,
,
( . 8.6).

53

5.

5.4.5.
, ,
.

.
, .
, .
, , /var/log/
, /var/log/installer/ ,
.

5.4.6.
, . ,
,
.
, Debian (BTS) . ,
, .
Debian ,
installation-report reportbug (aptitude install installation-report
reportbug), reportbug, . 8.5.2
reportbug installation-reports.

- installation-reports
<submit@bugs.debian.org>.
Package: installation-reports
Boot method: < ? CD? ? ?>
Image version: < url, >
Date: < >

Machine: < (, IBM Thinkpad R32)>


Processor:
Memory:
Partitions: < df -Tl; (raw)
lspci -knn lspci -nn:
Base System Installation Checklist:
[O] = OK, [E] = ( ), [ ] =
Initial boot:
Detect network card:
Configure network:
Detect CD:
Load installer modules:
Detect hard drives:
Partition hard drives:
Install base system:

[
[
[
[
[
[
[
[

]
]
]
]
]
]
]
]

54

5.
Clock/timezone setup:
User/password setup:
Install tasks:
Install boot loader:
Overall install:

[
[
[
[
[

]
]
]
]
]

Comments/Problems:
< , , .>

, ,
. , ,
.

55

6.
Debian
6.1.
Debian ,
.
, ,
. ,
.
,
() .
.
;
, , ,
.
, .
, , ,
- .
, ,
.
, .
, ,

debian-installer. , , (
DHCP, ),
netcfg/disable_dhcp=true. . 5.3.1.
, ,
, ,
.
, priority=medium.
,
.
expert ,
priority=low. debian-installer.
debian-installer
: .
, Graphical install .
.
. D.6.
. ,
. Tab
, Shift-Tab
.
,
. , ,

56

6. Debian
, ,
Pg-Up Pg-Down .
.
Enter.
. ,
,
F1.
.
, Alt-F4 ( Alt
F4);
Alt-F1.
/var/log/syslog.
/var/log/installer/syslog .
/var/log/
/var/log/installer/ ,
.

6.2.

.
. 6.3.
main-menu

, . main-menu
(medium) ,
( ), . ,
, ,
, ,
.
, Go Back,
.
localechooser

: , .
, .
, .
kbd-chooser
,
.

hw-detect
,
, PCMCIA.

57

6. Debian
cdrom-detect
- Debian.
netcfg
,
.
iso-scan
ISO- ( .iso files) .
choose-mirror
- Debian.
, .
cdrom-checker
-.
, - .
lowmem

, debian-installer
( ).
anna
Anna APT. ,
- -.
user-setup
.
clock-setup
(UTC)
.
tzsetup
, .
partman
,
.
, ,
LVM.
Debian.
partitioner
, .
.

58

6. Debian
partconf
,
.
lvmcfg
LVM ( ).
mdcfg
RAID (Redundant Array of Inexpensive Disks). RAID , IDE (-)
RAID- .
base-installer
,
Debian GNU/Linux .
apt-setup
apt, , ,
.
pkgsel
tasksel .
os-prober

bootloader-installer,
.

.
bootloader-installer
,
, Linux
-.

.
shell

.
save-logs
,
, ,
Debian
.

59

6. Debian

6.3.
.

. ,
.

6.3.1. Debian

, Debian
. debian-installer
. ,
, . .
debian-installer ,
,
. , debian-installer
, (,
,
-).
, debian-installer
. ,
(.. CD-ROM ).
,
.
debian-installer
. ,
, ,
. . . 6.4.

6.3.1.1. /

, debian-installer,
. ,
, , , Debian
GNU/Linux .
,
,
. ,
.
,
,
. .
,
, ,
.

60

6. Debian

(64128).
,
.
. ,

.
, ,
-
( Out of memory VT4 syslog).
, ,
,
. ,
ext2 (
). ext2 ext3.

lowmem , ,
lowmem . 5.3.1.

6.3.1.2.
,
.
, .
,
. ,
.
( )

- Debian.

.
.
() ();
.
. ,
C . C
; ,
locales .
. ,
1, .
, ( ).
;
, .
,
, , .
, .
1.

: .

61

6. Debian
: ,
, .

,
,
2.
.
, ,
UTF-8.
,
, 3
; - ,
.

6.3.1.3.
.
, , ,
.
( kbd-config
).
Enter.

, .
F1 F10 .

6.3.1.4. ISO Debian


hd-media, ,
ISO- Debian,
. iso-scan.
iso-scan (,
), ,
, .iso ( .ISO, ).
,
( / .iso, /data/ .iso, /data/tmp/ .iso).
iso-, iso-scan ,
iso- Debian .
, iso-scan .
ISO- , iso-scan ,
.
.
2. , ,
( ).
3. , UTF-8,
, ISO 8859-1 ( - ) EUC-JP (
).

62

6. Debian
iso-scan ISO ,
(
.iso), debian-installer
, ( ).
Unix .

6.3.1.5.
,
, ,
, .
.
; interfaces(5).
, debian-installer
DHCP. DHCP ,
. ,
,
DHCP. DHCP .
.
, ,
. DHCP ,
, , .
,
IP-, , , DNS- . ,
, Wireless ESSID WEP
. . 3.3.
: , , :
, IP-
IP- .
IP- .
. - ,
,
, /etc/network/interfaces.

6.3.1.6.

( NTP), .
, ,
.
.
, ,
, .
,
.

(UTC) .

63

6. Debian
-
, ,
.
1. :
. :
# dpkg-reconfigure tzdata

2. :
time/zone= .
, Europe/London UTC.
.

6.3.2.
,
root / .
.

6.3.2.1. (root)
root ,
. root
.
6
, .
root, .
,
.
- , root, .
root -,
.

6.3.2.2.
,
.
. root
.
? ,
root , root
. :
,
, .
Unix
, .

64

6. Debian
.
; , -
. , , .
,
adduser.

6.3.3.
,
debian-installer ,
- .
,
, , , ,
RAID, LVM .
, ,
. C.

. .
, .

6.3.3.1.
debian-installer .
,
.
, , ,
. ,
. . ,
, , ,
.
debconf; ,
.

,
.

(LVM)

RAID
RAID 0, 1, 4, 5, 6 10 .

Serial ATA RAID ( dmraid)


RAID BIOS RAID. Serial ATA RAID
.
(http://wiki.debian.org/DebianInstaller/SataRaid).

( )

65

6. Debian
(http://wiki.debian.org/DebianInstaller/MultipathSupport).

.

ext2, ext3, ext4


ext3;
/boot ext2.

jfs ( )

xfs ( )

reiserfs ( ; )
Reiser .
debconf,
partman-reiserfs.
.

qnx4
.
qnx4 .

FAT16, FAT32

NTFS ( )
NTFS .
NTFS .

6.3.3.2.
, :
( ),
(LVM) , LVM 4.
: LVM LVM .

LVM LVM c ,
;
,
. LVM
,
() .
LVM,
, .
(
4. LVM 256- AES
dm-crypt .

66

6. Debian
),
.
: LVM LVM c ,
LVM, .

.
.

If you choose guided partitioning (either classic or using (encrypted) LVM) for a whole disk, you will
first be asked to select the disk you want to use. Check that all your disks are listed and, if you have
several disks, make sure you select the correct one. The order they are listed in may differ from what
you are used to. The size of the disks may help to identify them.
Any data on the disk you select will eventually be lost, but you will always be asked to confirm any
changes before they are written to the disk. If you have selected the classic method of partitioning,
you will be able to undo any changes right until the end; when using (encrypted) LVM this is not
possible.
, .
"" "", . C.
, . ,
.
1 ( ),
.

600

/, swap

/home

500

/, /home, swap

/home,
/usr, /var /tmp

/, /home, /usr, /var, /tmp,

swap

LVM ( ),
/boot. ,
, LVM.
,
,
.
:
IDE1 master (hda) - 6.4 GB WDC AC36400L
#1 primary
16.4 MB B f ext2
/boot
#2 primary 551.0 MB
swap
swap
#3 primary
5.8 GB
ntfs
pri/log
8.2 MB
FREE SPACE
IDE1 slave (hdb) - 80.0 GB ST380021A
#1 primary
15.9 MB
ext3
#2 primary 996.0 MB
fat16
#3 primary
3.9 GB
xfs

/home

67

6. Debian
#5
#6
#7
#8
#9

logical
logical
logical
logical
logical

6.0
1.0
498.8
551.5
65.8

GB
GB
MB
MB
GB

f ext3
f ext3
ext3
swap
ext2

/
/var
swap

IDE, ;
.
, , , ,
( ). :
, , .
.
,
( ).
,

, .

6.3.3.3.
, ,
.
Debian.
, ,
(
). ,
.
If you select some free space, you will have the opportunity to create a new partition. You will have to
answer a quick series of questions about its size, type (primary or logical), and location (beginning or
end of the free space). After this, you will be presented with a detailed overview of your new partition.
The main setting is Use as:, which determines if the partition will have a file system on it, or be used
for swap, software RAID, LVM, an encrypted file system, or not be used at all. Other settings include
mountpoint, mount options, and bootable flag; which settings are shown depends on how the partition
is to be used. If you dont like the preselected defaults, feel free to change them to your liking. E.g.
by selecting the option Use as:, you can choose a different filesystem for this partition, including
options to use the partition for swap, software RAID, LVM, or not use it at all. Another nice feature
is the ability to copy data from an existing partition onto this one. When you are satisfied with your
new partition, select Done setting up the partition and you will return to partmans main screen.
, - ,
.
, . ,
, , :
, , . , ,
fat16, fat32, ext2, ext3 . ,
.
, , , :
( /) .
, partman
, .

68

6. Debian
partman ,
. ,
, , (, partman-ext3,
partman-xfs partman-lvm).
,
. ,
,
.

6.3.3.4. Multidisk ( RAID)


5 ,
mdcfg /
.
Multidisk ( , , RAID).
MD ,
.
( partman ,
..).
MD .
:
RAID0
. RAID0
.
/, ,
( (),
).
, RAID0 .
RAID1
, .
( ) ,
. , . :
, ,
. : (
, RAID). :
,
, , ,
.
, ,
.
RAID5
, . RAID5

5. , MD ,
, .

69

6. Debian
( RAID0). RAID0, RAID5
, .
( RAID4), ,
.
,
. RAID5 ,
. , ,
.
, RAID5 RAID1,
. ,
, RAID0 - .
RAID6
RAID5, , .
RAID6 .
RAID10
RAID10 ( RAID0) ( RAID1).
n ,
, .
n 2, .
n. RAID10
. (near)
.
. (far) .
, .
RAID10
.
:

RAID0



RAID

RAID1

RAID

70

6. Debian

RAID5


(

RAID
)

RAID6


(

RAID
)

RAID10


,


(
)

RAID, Software RAID HOWTO


(http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html).
MD
RAID. ( partman ,
: RAID.)
: , .
, /boot,
(/) RAID. ( lilo
grub) ( !) RAID1, ,
,RAID5 / RAID1 /boot.

MD .
RAID ,
MD (/).
, , ,
.

71

6. Debian
, RAID partman.
(
RAID.) mdcfg MD
. MD ,
(, RAID1).
MD.

RAID0 RAID,
, MD.

RAID1 . -,
, MD.
, RAID ,
, .
, . .
, debian-installer
, .

RAID5 RAID1 ,
.

RAID6 RAID1 ,
.

RAID10 RAID1,
. debian-installer
. . .
n ( ), f ( ), o ( ).
. ,
, ,
.

MD . ,
200 MD, 100 ,
RAID0 ( 300
) (2 1 )
RAID1 ( 100 /home).
MD ,
mdcfg partman, MD
.

6.3.3.5. (LVM)

, , , ,
( ) ,
,
..

(LVM). , LVM
( LVM) (
), (

72

6. Debian
). , (, , )
.
, , 160 /home
, 300 ,
,
/home ,
460 . , , .
LVM HOWTO (http://www.tldp.org/HOWTO/LVM-HOWTO.html).
LVM debian-installer
partman -, (),
LVM. ,
: LVM.
partman,
(LVM). ,
( ) ,
LVM. LVM.
.
:

: LVM ,
..

: partman

,
.
partman,
, ( ).

6.3.3.6.
debian-installer . ,

,
. ,
.
.
,
, .
: /home,
, ,

73

6. Debian
. , ,
, . , /var,
, , /tmp,

. .
/boot, ,
.
: ,
,
. ,
.


. (,
, LVM RAID).
: .
.
debian-installer .
dm-crypt ( Linux,
LVM), loop-AES (,
Linux). ,
.

,
Device-mapper (dm-crypt). : ,
,
.
: aes
(),
. debian-installer
: aes, blowfish, serpent twofish.
, ,
, 2000 AES

21- .
: 256
.
. ,
.
.
IV : cbc-essiv:sha256
IV ,

. ,

.

74

6. Debian
, cbc-essiv:sha256
.

, .
:
.

6 ,
.


. :
,
. (,
, ,
.)
,

. ,
, suspend-to-disk
Linux, ( )
.
:
,
. ,
,
. ,
7.

:Loopback (loop-AES),
:
: AES256
loop-AES, dm-crypt,
, .
.
6. , LUKS
(http://luks.endorphin.org/).
7. , ,
.

75

6. Debian
: Keyfile (GnuPG)
.
(GnuPG)

. , GnuPG,
,
( ).

.
:
.

,
.
. ,
, , ,
. .
,
. 8 ,
,
, -
(, , , ,
).

,
. ,
.
, , qwerty,
azerty.
.
,
.


, .
,
. :
, ,

( - , /dev/null ..).
.
,
, .

76

6. Debian
.
dm-crypt, loop-AES.
(sda2_crypt) - 115.1 Linux device-mapper
#1 115.1 GB F ext3
loopback (loop0) - 515.2 AES256 keyfile
#1 515.2 MB F ext3

,
- .
-
(sda2_crypt loop0 ) ,
. .

. 7.2.
, .

6.3.4.
,
, ,
. ,
.

tty4. , Alt-F4;
Alt-F1.
/
/var/log/syslog. ,

.
Linux.

. ,
.

, .

, ,
, .
: , ,
, . , ,
.

77

6. Debian

6.3.5.

, .

, ,
. ,
.

6.3.5.1. apt

apt-get apt8.
, , aptitude synaptic. ,
(
) . , aptitude
.
apt .
/etc/apt/sources.list.
.
,
,
, , , .
,
, volatile.
(,
), .
/
(volatile), contrib non-free.
6.3.5.1.1. CD DVD
CD DVD ,
, CD DVD .
CD DVD, , ,
, .
, : .
- (
) , ,
.
: CD ( DVD) .
, CD ,
CD-.
8. , , , dpkg. ,
. apt-get , dpkg
. CD, - . ,
, ,
.

78

6. Debian
, CD
, .
3 8 CD,
-. DVD : DVD
, , DVD .
, (
GNOME) CD.
(KDE Xfce) CD-. DVD
.

CD DVD-,
CD/DVD . ,
CD DVD .
, .

6.3.5.1.2. -
: -
.
, .
CD DVD
CD/DVD, ,
. ,
,
.
CD- CD,
, ,
CD .
, ,
CD (
).
DVD ,
DVD. ,
CD-, .
- .
, ,
CD/DVD ,
, CD/DVD
.
: - ,
. CD/DVD,
. ,
, ,
1. , ,
2. , ,
3. CD/DVD,

79

6. Debian
4. , CD DVD, -
( ,
).

, ,
, ,
, ,
.

6.3.5.2.

. 28250
,
,
.
, ,
. , - ,
, ,
, - 9.
. D.2 .

. ,
.
.
:
/ .

: CD- KDE Xfce/LXDE,


GNOME.
. ,
debian-installer KDE GNOME
(. . B.4.10) desktop=kde
.
Xfce LXDE,
desktop=xfce desktop=lxde.
CD (businesscard, netinst DVD)
. Advanced
options Alternative desktop environments.
, , ,
. CD ,
9. ,
tasksel. , ( )
, aptitude.
- , aptitude
install , .

80

6. Debian
-,
CD-; KDE, Xfce LXDE
DVD .

,
. DNS-: bind9; : samba, nfs; : exim4,
spamassassin, uw-imap; : cups; SQL: postgresql; -:
apache2.
.
, Linux Unix .
,
.
C,
tasksel , - ,
. ,

. ,
( ).
Continue. aptitude ,
. -
,
.
, , .
CD-ROM , CD-ROM,
.
, .
.
CD-ROM,
, , CD-ROM.
,
( );
, , .

6.3.6.
, ,
, .

6.3.6.1.

, .
,
,
Debian.

81

6. Debian
,
.

.
.

6.3.6.2. Grub
i386 grub. Grub

.
, grub (MBR),
. ,
. grub.
grub, Go Back,
, , .

6.3.6.3. LILO
i386 LILO.
, DOS, Windows
OS/2. /usr/share/doc/lilo/,
; LILO mini-HOWTO
(http://www.tldp.org/HOWTO/LILO.html).
: LILO
, . ,
, , GNU/Linux
GNU/Hurd .

debian-installer ,

LILO:
(MBR)
LILO .
Debian
, .
LILO , Debian
.

, LILO -
. .
/dev/hda /dev/sda.

82

6. Debian
Windows 9x ( DOS) ,
Windows 9x (MS-DOS)
fdisk /mbr MS-DOS ,
, - ,
Debian!

6.3.6.4.

, /
, (,
).
,
, /target/boot. ,
initrd; ,
, .
, / ,
/boot, /boot.

6.3.7.
Debian
. , debian-installer.

6.3.7.1.

(UTC). , ,
, ,
.

. , () Dos Windows,
. ,
UTC.
debian-installer
. UTC ,
, .

6.3.7.2.
(CD, , ),
.
Debian.

83

6. Debian

6.3.8. Troubleshooting

, , -
.

6.3.8.1.
, ,
, /var/log/installer/
Debian.

, , .
,
.

6.3.8.2.


. ,
,
Alt-F210 ( Mac: Option-F2).
Alt-F1.
. D.6.1.
,
, .
Go Back .
, exit .
RAM Unix .
ls /bin /sbin /usr/bin
/usr/sbin help. Bourne ash
, .
nano.
/var/log.
: ,
, , , -
.

. ,

.

10. : Alt F2
.

84

6. Debian

6.3.9.
network-console.
SSH.
, ,
. (
. 4.6.)
,
. CD,
-
-
network-console: Continue installation
remotely using SSH.
SSH.

. .
installer
. (fingerprint) .
,
.
, Enter .
.
UTF-8,
. ,
,
-ascii .
:
$ ssh -l installer install_host

install_host IP- .
(fingerprint),
, .
: ssh ,
keep-alive. , , ,
. ,

.
(NAT) - .
, ,
.
, -o ServerAliveInterval=
ssh, ssh.
,
(, keep-alive
, ssh ),
.

85

6. Debian
:
, IP- , ssh
. , ,
. , ,
~/.ssh/known_hosts11 .

:Start menu Start


shell. , ,
.
, , - .
SSH
.

SSH, ,
, . ,
,
.

6.4.
. 2.2,
. ,
; - ,
.
, ,
debian-installer ,
. , debian-installer
.
,
(/lib/firmware) .
: ,
.
USB-
FAT. i386 amd64 MMC SD.

, , ,
,
.
11. : ssh-keygen -R
<_ |IP- >.

86

6. Debian

, ,
. , debian-installer,
, , ,
.
(. . 5.4.6).

6.4.1.

, - ,
, USB.
/firmware
. FAT,
, , .
Tar- zip
:

http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/

tar- zip-
.
tar-,
( non-free).
,
:

http://packages.debian.org/search?keywords=firmware

, .
, ,
.

6.4.2.
, ,
. ,
, ,
. ,
, ,
, - .
, debian-installer
non-free
APT- sources.list.
.

87

6. Debian
,
, ,
() .
: ,
,
( )
.

88

7.
Debian
7.1.
- smoke test.
, ,
grub , , lilo.
Debian.
, ,
( ).
, . ,
- ,
Debian.
.
(. 8.7).
Debian Linux,
. ,
IRC #debian #debian-boot OFTC.
debian-user (http://www.debian.org/MailingLists/subscribe).
. 5.4.6.
,
, .
,
, .

7.2.

,
. dm-crypt loop-AES .

7.2.1. dm-crypt
, dm-crypt,
:
Starting early crypto disks... part_crypt(starting)
Enter LUKS passphrase:

, part
, sda2 md0. , , :
? /home? /var? ,
, ,
. ,

89

7. Debian
, . 6.3.3.6.
part_crypt ,
/etc/crypttab /etc/fstab .

. initramfs,
initrd . initrd,
initramfs-tools:
Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
Enter LUKS passphrase:

( ).
, .

. . 7.2.3.
.

7.2.2. loop-AES
, loop-AES,
:
Checking loop-encrypted file systems.
Setting up /dev/loopX (/mountpoint)
Password:

( ).
, .

. . 7.2.3.
.

7.2.3.
-
, .
.

. ,
,
.

/home /srv.
. loop-AES :
# mount /_

90

7. Debian
Password:

, /_ (, /home).

.
dm-crypt . -
device mapper:
# /etc/init.d/cryptdisks start

/etc/crypttab
/dev
. ( ,
.)
:
# mount /_


(/usr /var),
. , ()
, ,
.

# init 1

Control-D .

7.3.
.
,
. .
, ,
. ,
. , .
/usr/share/doc/
(, Debian,
).
,
. , apt
apt-doc apt-howto.
, /usr/share/doc/ . Linux HOWTO
.gz /usr/share/doc/HOWTO/en-txt/.
dhelp /usr/share/doc/HTML/index.html
.

91

7. Debian

:
$ cd /usr/share/doc/
$ w3m .

w3m .
,
-. -
/usr/share/doc/ .
info man ,
. help,
.
--help .
,
| more , .
, ,
.

92

8.

8.1.
Debian GNU/Linux ,

. Debian GNU/Linux ,
/ . ,
,
( ) .
Ctrl-Alt-Del .
,
root : poweroff, halt
shutdown -h now; reboot.

8.2. Unix
Unix, , ,
- .
Debian (http://www.debian.org/doc/user-manuals#quick-reference). Unix FAQs
(http://www.faqs.org/faqs/unix-faq/)
UseNet.
Linux Unix. Linux Documentation Project (LDP)
(http://www.tldp.org/) HOWTO ,
Linux.
doc-linux-html (HTML ) doc-linux-text (ASCII ),
/usr/share/doc/HOWTO. LDP HOWTO
Debian.

8.3. Debian
Debian .
Linux, , Debian,
. ,
; Debian,
.

8.3.1. Debian
Debian. ,
.

93

8.
:

/usr

( /usr/local)

/var

( /var/local, )

/bin
/sbin
/lib

, /usr/bin/perl, , ,
perl, , .
, hold aptitude.
apt.
apt-get aptitude. ,
apt main, contrib non-free,
.

8.3.2.

update-alternatives. ,
update-alternatives.

8.3.3. cron

/etc, .
, cron ,
/etc/cron.{daily,weekly,monthly}. /etc/crontab
.
, : ()
(b) ,
/etc/crontab, , , /etc/cron.d/_.
, ,
, cron.
, , cron
. .
cron(8), crontab(5) /usr/share/doc/cron/README.Debian.

8.4.
, ,
man info .
, /usr/share/doc. ,
/usr/share/doc/HOWTO /usr/share/doc/FAQ

94

8.
. /usr/share/doc/debian/bug*.
, Debian,
/usr/share/doc/( )/README.Debian.
- Debian (http://www.debian.org/)
Debian. , Debian GNU/Linux FAQ (http://www.debian.org/doc/FAQ/)

Debian
(http://www.debian.org/doc/user-manuals#quick-reference).
Debian Debian
(http://www.debian.org/doc/ddp). Debian
Debian
(http://www.debian.org/MailingLists/subscribe). ,
Debian (http://lists.debian.org/),
Debian.
GNU/Linux Linux (http://www.tldp.org/).
HOWTO
GNU/Linux.

8.5.
(email) .
,
Debian,
.
. :
[Mail User Agent] (MUA) ,
. : [Mail Transfer Agent] (MTA)
. :
[Mail Delivery Agent] (MDA)
.
,
. ,
.
, Linux Unix MUA mutt.
Linux .
exim sendmail, MTA procmail
MDA.
,
GNOME
evolution, KDE kmail Mozilla thunderbird ( Debian icedove1).
MUA, MTA MDA, (
) Linux.

8.5.1.

, , Debian GNU/Linux
1. thunderbird icedove .
.

95

8.
MTA/MDA. ,
2,
() .
exim4 mutt (
). exim4 MTA/MDA,
, .
, ,
, ( root),
, 3.
/var/mail/_ .
mutt.

8.5.2.
, Debian
,
.
, exim4 ,
, .
.

(ISP) ,
exim4 .

( ).
, ,
. reportbug,
Debian. ,
exim4.
reportbug ,
reportbug --configure MTA.
SMTP,
.

8.5.3. Exim4
, ,
exim44:
# dpkg-reconfigure exim4-config

2. : cron, quota, logcheck, aide, . . .


3. root /etc/aliases.
, , ,
root.
4. , exim4 MTA/MDA.

96

8.
( ), ,
. ,
.
. ,
.
-
,
SMTP. ,
,
.
- (smarthost)
,
smarthost, . Smarthost
, ,
. ,
smarthost fetchmail.
, smarthost
ISP, ,
.
.
smarthost;
, , ,
. (,
) .

.

, , .
; ,

.
, ,

/etc/exim4. exim4
/usr/share/doc/exim4; README.Debian.gz
exim4 .
,
, ,
, .
ISP. ,
, .
MTA exim4,
/etc/email-addresses.

97

8.

8.6.
? , ,
Debian, . , Debian
. , ,
. ,
:

, (,
high memory)

linux

8.6.1.
. .
Debian, :
fakeroot, kernel-package, linux-source-2.6 , , ,
( /usr/share/doc/kernel-package/README.gz ).
.deb , ,
, .deb
. ; /boot ,
System.map .
, Debian;
,
. ,
, linux-source-2.6, kernel-package.
, kernel-package
/usr/share/doc/kernel-package. .
,
5. ,
2.6.32. ,
, tar xjf
/usr/src/linux-source-2.6.32.tar.bz2
linux-source-2.6.32.
. ,
X11, make xconfig, make menuconfig (
libncurses5-dev).
5. ,
.

98

8.
. - ,
( ,
, , Ethernet, SCSI-
). : ,
, ,
, . Kernel module loader Loadable module
support ( ). ,
Debian.
kernel-package.
make-kpkg clean.
: fakeroot make-kpkg --initrd --revision=custom.1.0
kernel_image. 1.0 ;
. ,
custom (, ).
.

dpkg -i
../linux-image-2.6.32- _custom.1.0_i386.deb.
, , 686,
. dpkg -i
. , System.map (
), /boot/config-2.6.32, .
,
. ,
.
: ,
, shutdown -r now.
Debian Debian Linux Kernel Handbook
(http://kernel-handbook.alioth.debian.org/). kernel-package
/usr/share/doc/kernel-package.

8.7.
- , ,
. ,
, ,
/sbin/init. ,
,
.
, rescue boot:,
rescue/enable=true .
, ,
, . ,
!
, ,
.

99

8.
, , ,
. , ,
, . ,
RAID LVM.
,
,
. , GRUB
, grub-install (hd0).

.
,
.
, .
/target.
,
.
,
, ,
.
.

100

A.

Debian GNU/Linux squeeze 32-bit PC (i386)


debian-installer. ,
, .
, ,
.

A.1.
, . 5.4.6,
. ,
, debian-boot (debian-boot@lists.debian.org)
IRC- (#debian-boot OFTC).

A.2.
CD- debian-installer, debian-cd
Debian CD (http://www.debian.org/CD/).
. 4.1.

CD-. . 4.2.1 , - Debian.
,
.

A.2.1. CDROM
CD-netinst- squeeze
debian-installer. CD

, netinst.
, netinst- , business card
. CD-,
.
.
CD.
CD, BIOS. . 3.6.1
, .

A.2.2. USB
USB . , USB Debian,
.

101

A.
The easiest way to prepare your USB memory stick is to download any Debian CD or DVD image
that will fit on it, and write the CD image directly to the memory stick. Of course this will destroy
anything already on the memory stick. This works because Debian CD images are "isohybrid" images
that can boot both from CD and from USB drives.
,
debian-installer, .
. 4.3.
BIOS USB, .
BIOS removable drive
USB-ZIP, USB .
. 5.1.5.

A.2.3.
debian-installer .
(netboot) .
debian-installer netboot/.

The easiest thing to set up is probably PXE netbooting. Untar the file netboot/pxeboot.tar.gz
into /srv/tftp or wherever is appropriate for your tftp server. Set up your DHCP server to pass
filename /pxelinux.0 to clients, and with luck everything will just work. For detailed instructions,
see . 4.5.

A.2.4.
,
,
. hd-media/initrd.gz, hd-media/vmlinuz Debian
CD . , CD ,
.iso. linux initrd. . 5.1.4
, .

A.3.
. Enter ,
(
. 5.3).
.
Enter, .
, .
, .
.
, .
, debian-installer
, CD, ,
USB ..

102

A.

DHCP. DHCP,
.
.
,
. ,
,
.
.
(. . 6.3.3.2).
. ,
.
DOS Windows, ,
. ,

FAT NTFS, Debian;
.
,
. .
,
, .

/. . 6.3.3
; . C .
debian-installer ,
. .
, , , .
,
.
, apt.
.
, .
. 6.3.5.2.
.
, root ()
, .
.
,
.
GRUB, .
.
debian-installer , . -
Enter
.
. . 7.
,
. 6.

103

A.

A.4.
debian-installer, ,
.
reportbug (aptitude install reportbug), reportbug
. 8.5.2 reportbug installation-reports.
,
debian-installer. ,
, , , .
, ; ,
. 5.4.5.

A.5. . . .
, Debian Debian .
, . 8.

104

B.

,
debian-installer .

, ,
http://www.debian.org/releases/squeeze/example-preseed.txt.

B.1.

.
, ,
.
.
, , .
( !)
.

B.1.1.
: initrd, .
initrd
, .
.

.

initrd

CD/DVD

netboot

hd-media (
usb-)

:
a. preseed/url

. initrd ,
.
CD CD . .
, , ,
( ,
, .
. B.2.2 .

105

B.
,
, auto.
,
(, , ),
.
,
. . B.2.3.

B.1.2.
debian-installer
, .
() ;
.

B.2.
-, .
.

usb-. CD DVD,
ISO .
initrd; debian-installer.
,
http://www.debian.org/releases/squeeze/example-preseed.txt.
, .

B.2.1.
initrd, , preseed.cfg
initrd.
.

.
,
(, syslinux.cfg) append
.
,
,
. syslinux timeout 1
syslinux.cfg.
, ,
.
md5sum, ,
, .

106

B.
:
- :
preseed/url=http://host/path/to/preseed.cfg
preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
- CD:
preseed/file=/cdrom/preseed.cfg
preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
- USB (
USB ):
preseed/file=/hd-media/preseed.cfg
preseed/file/checksum=5da499872becccfeda2c4872f9171c3d

, preseed/url url, preseed/file file,


.

B.2.2.

,
,
.

, , .
.
, debian-installer,
//= ,
.
, 1,
, :// = . ,
debconf
.
, , .
,
?= =. . B.5.2.
, ,
, . ,
.
, preseed/url url. : tasks
tasksel:tasksel/first.
-- .
, --,
( ).
(,
), .
1. debconf ( ) , , ,
debconf. d-i.
, debconf
.

107

B.
: linux (2.6.9 )
32 32 ,
, . ,
. ( .)


, vga=normal, ,
.
: ,
.

B.2.3.
Debian,
,
.
:
auto url=autoserver

DHCP
autoserver DNS,
, DHCP.
example.com, DHCP,
http://autoserver.example.com/d-i/squeeze/./preseed.cfg.

url
(d-i/squeeze/./preseed.cfg)

auto-install/defaultroot. squeeze,

,
. /./ ,
(
preseed/include preseed/run). URL (,
/) ,
. ,

, USB-,
-. ,
preseed/run /scripts/late_command.sh,
http://autoserver.example.com/d-i/squeeze/./scripts/late_command.sh.
DHCP DNS, ,
preseed.cfg, url, ,
/./, ( / URL). ,
:
auto url=http://192.168.1.2/path/to/mypreseed.file

108

B.

URL , http,
, , DHCP,
/ , .

, url, ,
debian-installer, ,
preseed/run . ,
, auto-install/classes classes.
:
auto url=example.com classes=class_A;class_B

classes, ,
.
, , ,
auto-install.
auto-install/style, .
, ,
<debian-boot@lists.debian.org>,
, , .
auto .
auto=true priority=critical
. auto auto-install/enable
true ,
, priority
debconf/priority, critical
.
DHCP
: interface=auto netcfg/dhcp_timeout=60,
, DHCP
.
: ,
, (http://hands.com/d-i/).
,
, .

B.2.4.
( auto)
. , ,
. , auto=true interface=eth0.
auto
classes

auto-install/enable
auto-install/classes

fb
language

debian-installer/framebuffer
debian-installer/language

109

B.

country
locale

debian-installer/country
debian-installer/locale

priority

url

debconf/priority
preseed/file
preseed/url

interface
hostname

netcfg/choose_interface
netcfg/get_hostname

domain
protocol

netcfg/get_domain
mirror/protocol

suite

mirror/suite

B.2.5. DHCP

DHCP
, . DHCP . ,
, URL,
, ,
URL
. , dhcpd.conf ISC
DHCP (Debian dhcp3-server).
if substring (option vendor-class-identifier, 0, 3) = "d-i" {
filename "http://host/preseed.cfg";
}

, DHCP
"d-i", DHCP ,
.
, .
DHCP
, , - Debian.
-,
. DHCP
Debian , .

B.3.

debconf-set-selections. :

<> < > < > <>

110

B.
, .

(tab):
.

,
(\) . ;
.
/ .

debconf (),
, d-i; ,
, ,
debconf. debconf
, ,
d-i.

,
. , (, partman),
.

,
.

. B.4
.
, ,
debconf-get-selections debconf-utils,
debconf cdebconf :
$ debconf-get-selections --installer >
$ debconf-get-selections >>

, ,
, -
.
: , ,
cdebconf /var/log/installer/cdebconf.
, ,
.
/var/log/installer
installation-report.

nano
/var/lib/cdebconf .
templates.dat , questions.dat
, .
,
debconf-set-selections -c preseed.cfg .

111

B.

B.4. ( squeeze)
, ,
http://www.debian.org/releases/squeeze/example-preseed.txt.
, Intel x86.
, (,
)
debconf .
Details on how the different Debian Installer components actually work can be found in . 6.3.

B.4.1.
initrd.
, .
;
, debian-installer, .
,
, .
, locale=ru_RU .
,
, 2.
.
.
# .
d-i debian-installer/locale string en_US
# .
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
#d-i debian-installer/locale string en_GB.UTF-8
# , .
#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8

.
,
.
debian-installer .
# .
#d-i console-tools/archs select at
d-i console-keymaps-at/keymap select ru
d-i keyboard-configuration/xkb-keymap select ru
#
#d-i console-keymaps-usb/keymap select mac-usb-us

2. locale en_NL, ,
en_US.UTF-8. , , en_GB.UTF-8,
.

112

B.
console-tools/archs
skip-config. .
: 2.6
. 2.6
PC (at).

B.4.2.
, ,
. , CD
USB . ,
.

, interface=eth1.

( preseed/url), , ,
.
,
preseed/run :
killall.sh; netcfg

debconf .
# . cdrom
# , , ,
# .
#d-i netcfg/enable boolean false
# netcfg , .
# ,
# .
d-i netcfg/choose_interface select auto
# :
#d-i netcfg/choose_interface select eth1
# dhcp
# , .
#d-i netcfg/dhcp_timeout string 60
# ,
# .
#d-i netcfg/disable_dhcp boolean true
#
# dhcp, .
#d-i netcfg/dhcp_failed note

113

B.
#d-i netcfg/dhcp_options select Configure network manually
# .
#d-i netcfg/get_nameservers string 192.168.1.1
#d-i netcfg/get_ipaddress string 192.168.1.42
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string 192.168.1.1
#d-i netcfg/confirm_static boolean true
# , dhcp,
# , . ,
# , dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# WEP .
d-i netcfg/wireless_wep string
# dhcp ,
# .
#d-i netcfg/dhcp_hostname string radish
#
# ,
# . false,
# .
#d-i hw-detect/load_firmware boolean true

, netcfg ,
netcfg/get_netmask. , seen
. netcfg ,
netcfg/get_gateway. :
netcfg/get_gateway none, ,
.

B.4.3.
# ,
# network-console SSH. ,
# .
#d-i anna/choose_modules string network-console
#d-i network-console/password password r00tme
#d-i network-console/password-again password r00tme

B.4.4. -

,
/etc/apt/sources.list -.
mirror/suite
.

114

B.
mirror/udeb/suite
.
,
initrd, .
,
.
# ftp, mirror/country string .
#d-i mirror/protocol string ftp
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
# .
#d-i mirror/suite string testing
# ().
#d-i mirror/udeb/suite string testing

B.4.5.

.
MD5.

, ,
. ,
MD5 , MD5
.

# (
# sudo).
#d-i passwd/root-login boolean false
# .
#d-i passwd/make-user boolean false
# ,
#d-i passwd/root-password password r00tme
#d-i passwd/root-password-again password r00tme
# MD5 .
#d-i passwd/root-password-crypted password [MD5 ]
# .
#d-i passwd/user-fullname string Debian User
#d-i passwd/username string debian
# ,
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# MD5 .
#d-i passwd/user-password-crypted password [MD5 ]

115

B.
# UID
# .
#d-i passwd/user-uid string 1010
# .
# -- .
#d-i passwd/user-default-groups string audio cdrom video

passwd/root-password-crypted
!. ,
.
, ,

(, SSH
sudo).
passwd/user-password-crypted

MD5 :
$ printf "r00tme" | mkpasswd -s -m md5

B.4.6.
# , .
d-i clock-setup/utc boolean true
# $TZ;
# /usr/share/zoneinfo/.
d-i time/zone string US/Eastern
# , NTP
d-i clock-setup/ntp boolean true
# NTP. .
#d-i clock-setup/ntp-server string ntp.example.com

B.4.7.

; partman-auto.
.
,
.
RAID, LVM
,
.

.

partman-auto-recipe.txt

partman-auto-raid-recipe.txt

debian-installer.

116

B.
debian-installer (http://svn.debian.org/wsvn/di//trunk/installer/doc/devel/). ,
.

.
, ,
.

B.4.7.1.
# ,
# .
# , partman-auto/method ().
#d-i partman-auto/init_automatically_partition select biggest_free
# , .
# ,
# ,
# -devfs ( ,
# /dev/hda /dev/sda, /dev/discs/disc0/disc).
# , SCSI/SATA:
#d-i partman-auto/disk string /dev/sda
# , .
# :
# - regular:
# - lvm: LVM
# - crypto: LVM
d-i partman-auto/method string lvm
# ,
# , LVM,
# . ...
d-i partman-lvm/device_remove_lvm boolean true
# RAID :
d-i partman-md/device_remove_md boolean true
# lvm .
d-i partman-lvm/confirm boolean true
# :
# - atomic:
# - home:
/home
# - multi: /home, /usr, /var /tmp
d-i partman-auto/choose_recipe select atomic
# ...
# - d-i,
# .
#d-i partman-auto/expert_recipe_file string /hd-media/recipe
# ,
# () . /boot
# , ,

117

B.
# :
#d-i partman-auto/expert_recipe string
#
boot-root ::
#
40 50 100 ext3
#
$primary{ } $bootable{ }
#
method{ format } format{ }
#
use_filesystem{ } filesystem{ ext3 }
#
mountpoint{ /boot }
#
.
#
500 10000 1000000000 ext3
#
method{ format } format{ }
#
use_filesystem{ } filesystem{ ext3 }
#
mountpoint{ / }
#
.
#
64 512 300% linux-swap
#
method{ swap } format{ }
#
.
#
#
#
#
#

\
\
\
\
\
\
\
\
\
\
\
\
\
\
\

partman-auto-recipe.txt,
debian-installer D-I.
,
,
.

# partman
# , , .
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

B.4.7.2. RAID
RAID.
RAID 0, 1, 5, 6 10, (degraded
arrays) .
RAID 1, grub
, . . B.4.11.

.
debian-installer.
( , )
. -- . /var/log/syslog.

# "raid".
#d-i partman-auto/method string raid
# . ,
# , .
#d-i partman-auto/disk string /dev/sda /dev/sdb

118

B.
# .
#d-i partman-auto/expert_recipe string \
#
multiraid ::
\
#
1000 5000 4000 raid
\
#
$primary{ } method{ raid }
\
#
.
\
#
64 512 300% raid
\
#
method{ raid }
\
#
.
\
#
500 10000 1000000000 raid
\
#
method{ raid }
\
#
.
#
#
#
#
#
#
#

,
RAID.
. RAID 0, 1, 5, 6 10;
"#".
:
<raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
<devices> <sparedevices>

#d-i
#
#
#
#
#
#
#
#
#

partman-auto-raid/recipe string
1 2 0 ext3 /
/dev/sda1#/dev/sdb1
.
1 2 0 swap /dev/sda5#/dev/sdb5
.
0 2 0 ext3 /home
/dev/sda6#/dev/sdb6
.

\
\
\
\
\
\
\
\
\

# partman-auto-raid-recipe.txt,
# debian-installer D-I.
# partman , .
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

B.4.7.3.
,
(UUID);
, . UUID-
, , ,
,
.
, UUID.
, LVM,
, UUID-.

119

B.

- ,
, .
, ,
USB-, ,
.

# , UUID,
# "traditional",
# "label", ,
# UUID-.
#d-i partman/mount_style select uuid

B.4.8.
, , .
.
# APT .
#
# ,
# .
#d-i base-installer/install-recommends boolean false
# initramfs, initrd
# 2.6.
#d-i base-installer/kernel/linux/initramfs-generators string initramfs-tools
# () ; "none",
# .
#d-i base-installer/kernel/image string linux-image-2.6-486

B.4.9. Apt
/etc/apt/sources.list

. () .
# non-free contrib .
#d-i apt-setup/non-free boolean true
#d-i apt-setup/contrib boolean true
# , .
#d-i apt-setup/use_mirror boolean false
# ; .
# .
#d-i apt-setup/services-select multiselect security, volatile
#d-i apt-setup/security_host string security.debian.org
#d-i apt-setup/volatile_host string volatile.debian.org

120

B.
# local[0-9]
#d-i apt-setup/local0/repository string \
#
http://local.server/debian stable main
#d-i apt-setup/local0/comment string local server
# deb-src
#d-i apt-setup/local0/source boolean true
# URL ;
# , apt
# ,
# sources.list
#d-i apt-setup/local0/key string http://local.server/key
# ,
# gpg.
# .
# : , .
#d-i debian-installer/allow_unauthenticated boolean true

B.4.10.
.
:
standard ( )
desktop ( )
gnome-desktop ( gnome)
kde-desktop ( kde)
web-server ( )
print-server ( )
dns-server (DNS-)
file-server ( )
mail-server ( )
sql-database ( SQL)
laptop ( )

-
. standard.
,
, pkgsel/include.

, .
#tasksel tasksel/first multiselect standard, web-server
# ,
# kde xfce gnome .
#tasksel tasksel/desktop multiselect kde, xfce
#
#d-i pkgsel/include string openssh-server build-essential

121

B.
# debootstrap.
# : none, safe-upgrade, full-upgrade
#d-i pkgsel/upgrade select none
#
# .
# ,
# CD.
#popularity-contest popularity-contest/participate boolean false

B.4.11.
# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true
# To also skip installing lilo, and install no bootloader, uncomment this
# too:
#d-i lilo-installer/skip boolean true

# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
# Alternatively, if you want to install to a location other than the mbr,
# uncomment and edit these lines:
#d-i grub-installer/only_debian boolean false
#d-i grub-installer/with_other_os boolean false
#d-i grub-installer/bootdev string (hd0,0)
# To install grub to multiple disks:
#d-i grub-installer/bootdev string (hd0,0) (hd1,0) (hd2,0)
# To install to a particular device:
#d-i grub-installer/bootdev string /dev/sda
# Optional password for grub, either in clear text
#d-i grub-installer/password password r00tme
#d-i grub-installer/password-again password r00tme
# or encrypted using an MD5 hash, see grub-md5-crypt(8).
#d-i grub-installer/password-crypted password [MD5 hash]
# Use the following option to add additional boot parameters for the
# installed system (if supported by the bootloader installer).
# Note: options passed to the installer will be added automatically.
#d-i debian-installer/add-kernel-opts string nousb

MD5 grub grub-md5-crypt


. B.4.5.

122

B.

B.4.12.
#
# (VT1-VT6) /etc/inittab.
# , .
#d-i finish-install/keep-consoles boolean true
# , .
d-i finish-install/reboot_in_progress note
# CD , .
#d-i cdrom-detect/eject boolean false
# ,
# .
#d-i debian-installer/exit/halt boolean true
# , .
#d-i debian-installer/exit/poweroff boolean true

B.4.13.
#
#
#
#
#
#
>
#
>
>

, -
,
. , .
, ,
, :
debconf-get-selections --installer

debconf-get-selections

B.5.
B.5.1.



.
#
#
#
#
#
#

d-i .

.
! ,
,
.

123

B.
# ,
# .
#d-i preseed/early_command string anna-install --udeb
# .
#
# , (
# preseed/early_command).
#d-i partman/early_command \
#
string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
# ,
# /target. chroot /target
# ,
# apt-install in-target
# .
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh

B.5.2.

,
.
seen false .
d-i foo/bar string value
d-i foo/bar seen false

preseed/interactive=true .

.
, d-i ,
. ,
, . .
. B.2.2.
,
?=,
foo/bar ?=value ( owner :foo/bar ?=value). ,
, ,
.

B.5.3.

.
, , ,
. , ,
, .
# , ;
# . , ,

124

B.
# preseed/include. ,
# ,
# , .
#d-i preseed/include string x.cfg
#
# .
# md5sums; md5sums ,
# .
#d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d
#
# , .
#d-i preseed/include_command \
#
string if [ "hostname" = bob ]; then echo bob.cfg; fi
# -- .
# , , debconf-set
# debconf.
# ,
# , ,
# , .
#d-i preseed/run string foo.sh

initrd ,
, preseed/url .
, .
,
, , , preseed/early
: , .

125

C. Debian
C.1. Debian
, GNU/Linux .
, , .
, ,
. (swap) ,

. Linux ,
. Linux
, .
GNU/Linux .
,
. . -
, . , (
, ) . ,
.
. ,
GNU/Linux .
.
, ,
. , , ,
. /var/mail
,
.

, , .
,
- .
, , ,
- . ,
?

C.2.
Debian GNU/Linux Filesystem Hierarchy Standard
(http://www.pathname.com/fhs/) .

. /.
, Debian :

bin

boot

126

C. Debian

dev

etc

home

lib

media

mnt

proc


( 2.4 2.6)

root

sbin

sys


( 2.6)

tmp

usr

var

srv

opt

.
, -,
.
.

/ /etc, /bin,
/sbin, /lib /dev, . ,
150250 .

/usr : (/usr/bin) ,
(/usr/lib), (/usr/share/doc) .
. 500
. ,
.
46 .

/var : ,
, -, , ..
,
.
, Debian, , 2 3
/var .
( , ,
, X, ...), 300500 .

127

C. Debian
,
30 40 .

/tmp : .
40100 .
, CD/DVD
/tmp .
, /tmp
.

/home : ,
.
.
100 ,
.
, (, MP3,
) .

C.3.
, Debian ,
/ ( ) ,
. , 6 , ext3.
ext2 ,
.

/usr, /var, /tmp /home , /.
/usr/local,
, Debian.
,
/var/mail. , /tmp 2050 .
, , ,
/home . ,
, .

Multi Disk HOWTO
(http://www.tldp.org/HOWTO/Multi-Disk-HOWTO.html).
, ,
.
.
,
. , 16 .
, .
10000 256 ,
( ) .
On some 32-bit architectures (m68k and PowerPC), the maximum size of a swap partition is 2GB.
That should be enough for nearly any installation. However, if your swap requirements are this high,
you should probably try to spread the swap across different disks (also called spindles) and, if
possible, different SCSI or IDE channels. The kernel will balance swap usage between multiple swap
partitions, giving better performance.

128

C. Debian
: 32 1.7
IDE /dev/hda. 500
/dev/hda1, 32 /dev/hda3 1.2 Linux
/dev/hda2.
, ,
; . D.2.

C.4. Linux
Linux
.
Linux. :

/dev/fd0.

/dev/fd1.

SCSI ( SCSI ID) /dev/sda.

SCSI ( SCSI ID) /dev/sdb .

SCSI CD-ROM /dev/scd0, /dev/sr0.

IDE /dev/hda.

IDE /dev/hdb.

/dev/hdc
/dev/hdd . IDE
, .

: sda1
sda2 SCSI .
. , 2- SCSI ,
SCSI 2, SCSI 4. ( 2) sda,
sdb. sda 3 , sda1, sda2 sda3.
sdb .
, SCSI ( , ),
.
; , / .
Linux 1 4.
, IDE /dev/hda1.
5,
/dev/hda5. , ,
, .
SCSI IDE.

C.5. Debian

Debian
. , .

129

C. Debian
partman
Debian.
, ( format Windows) .
fdisk
Linux, .
, FreeBSD.
,
fdisk . Linux+FreeBSD HOWTO
(http://www.tldp.org/HOWTO/Linux+FreeBSD-2.html)
cfdisk
,
.
, cfdisk FreeBSD, ,
.
,
( ).
VT2, .
.

C.5.1. 32-bit PC
, , DOS Windows,
, ,
Debian.
FAT NTFS;
.
PC BIOS .
,
. , BIOS 199498 , ,
BIOS .
Linux HOWTO (http://www.tldp.org/HOWTO/Partition/) Phoenix BIOS FAQ
(http://www.phoenix.com/en/Customer+Services/BIOS/BIOS+FAQ/default.htm),
, .
PC.
, . ,
.
, .
60 ; ,
.
Linux 15 SCSI (3 , 12
), 63 IDE (3 , 60
). , Debian GNU/Linux 20
,
20, .

130

C. Debian
IDE LBA ,
( ),
(, ) 1024
(, 524 BIOS ).
BIOS 199598 ( ),
Enhanced Disk Drive Support Specification. Lilo, Linux ,
Debian mbr, BIOS
. BIOS int 0x13
, . ,
, ,
1023- . Linux, BIOS ,
, Linux BIOS
.
,
, BIOS; LBA (
) CHS (Large).
HOWTO
(http://www.tldp.org/HOWTO/Large-Disk-HOWTO.html).
, BIOS
,
1024- .
(2550
) , ,
.
/boot, Linux.
,
LBA CHS, BIOS
.

131

D.
D.1. Linux
Linux /dev .
. Unix ,
.
, ( Linux),
. ,
. .

fd0

fd1

hda

IDE / CD-ROM
IDE ()

hdb

IDE / CD-ROM
IDE ()

hdc

IDE / CD-ROM
IDE ()

hdd

IDE / CD-ROM
IDE ()

hda1


IDE

hdd15


IDE

sda

SCSI SCSI ID
(.. 0)

sdb

SCSI
SCSI ID (.. 1)

sdc

SCSI
SCSI ID (.. 2)

sda1


SCSI

sdd10


SCSI

sr0

SCSI CD-ROM SCSI ID

sr1

SCSI CD-ROM
SCSI ID

ttyS0

0, COM1
MS-DOS

132

D.

ttyS1

1, COM2
MS-DOS

psaux

PS/2

gpmdata

-,
GPM ()

cdrom

CD-ROM

mouse

null

, ,

zero

D.1.1.
Linux ( gpm)
X window. , gpm X-.
/dev/input/mice .
gpm exps2, X ExplorerPS/2.
/etc/gpm.conf
/etc/X11/xorg.conf.
, .
,
, ,
1,
. Linux,
:

psmouse

PS/2 (
)

usbhid

USB (
)

sermouse

logibm

,
Logitech

1. , , 9 ;
8- , 6-
PS/2 4- ADB.

133

D.

inport

, ATI
Microsoft InPort

, modconf (
) kernel/drivers/input/mouse.

D.2. ,

amd64 2.6,
532 .
368 .
: ,
. ,
, , . ,
.

,
tasksel. aptitude. ,
,
, ,
.
GNOME,
,
CD ,
(. . 6.3.5.2).
,
.
/usr /lib,
() /var.


()


()


()

2567

954

3521

KDE

2159

860

3019

Xfce

1672

637

2309

LXDE

1452

566

2018

182

59

241

55

17

72


GNOME (
)

134

D.


()


()


()

196

63

259

DNS-

126

42

168

64

23

87

SQL

49

10

59

SSH-

:
a.
. ,
.
, tasksel
, .
; 350
.

D.3. Debian GNU/Linux


Unix/Linux
, Debian GNU/Linux
Unix Linux ,
ncurses, .
HOWTO , Debian
GNU/Linux Redhat, Mandriva SUSE.
*nix .
$ , , #
, Debian chroot.
Debian, ,
( ) .
Debian GNU/Linux (zero downtime). ,
.
: , , , ,
,
Debian Linux , .
, ,
. ,
. / .

135

D.

D.3.1.
*nix ,
, (swap).
350 1 ,
X ( ,
GNOME KDE).
. ,
ext3 /dev/hda6 ( ):
# mke2fs -j /dev/hda6

ext2, -j.
( ):

# mkswap /dev/hda5
# sync; sync; sync
# swapon /dev/hda5

/mnt/debinst ( ,
(/) ).
.
# mkdir /mnt/debinst
# mount /dev/hda6 /mnt/debinst

: (, /usr)
, ,
.

D.3.2. debootstrap
, Debian
Debian debootstrap.
wget ar, /bin/sh
Unix/Linux2. wget ar, ,
debootstrap.
.
.deb:
# mkdir work
# cd work

debootstrap Debian (,
, ). debootstrap .deb
2.

GNU sed, grep, tar gzip.

136

D.
(http://ftp.debian.org/debian/pool/main/d/debootstrap/),
.
(root).
# ar -x debootstrap_0.X.X_all.deb
# cd /
# zcat /full-path-to-work/work/data.tar.gz | tar xv

D.3.3. debootstrap
debootstrap .
http.us.debian.org/debian -
Debian, .
http://www.debian.org/mirror/list.
- squeeze Debian GNU/Linux, /cdrom,
URL file http URL: file:/cdrom/debian/
ARCH debootstrap: alpha,
amd64, arm, armel, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390 sparc.
# /usr/sbin/debootstrap --arch ARCH squeeze \
/mnt/debinst http://ftp.us.debian.org/debian

D.3.4.
Debian , .
chroot :
# LANG=C chroot /mnt/debinst /bin/bash

chrooting,
Debian, :
# export TERM=xterm-color

D.3.4.1.
/dev/ .
.
; : a) ,
; ) ;
) (, udev)
.

137

D.
:


# cd /dev
# MAKEDEV generic

MAKEDEV

/dev /dev
; , postinst
,

D.3.4.2.
/etc/fstab.
# editor /etc/fstab

, :
# /etc/fstab: .
#
# . .


/dev/XXX
/
ext3
defaults
0
1
/dev/XXX
/boot
ext3
ro,nosuid,nodev
0
2
/dev/XXX
proc

none
/proc

swap
proc

0
0

0
0

/dev/fd0
/dev/cdrom

/media/floppy auto
noauto,rw,sync,user,exec 0
/media/cdrom iso9660 noauto,ro,user,exec
0

0
0

/dev/XXX
/dev/XXX
/dev/XXX
/dev/XXX

/tmp
/var
/usr
/home

2
2
2
2

ext3
ext3
ext3
ext3

sw
defaults

rw,nosuid,nodev
rw,nosuid,nodev
rw,nodev
rw,nosuid,nodev

0
0
0
0

mount -a ,
/etc/fstab, :
# mount /path

# : mount /usr

Debian /media,
/ . ,
. :
#
#
#
#

cd /media
mkdir cdrom0
ln -s cdrom0 cdrom
cd /

138

D.
# ln -s media/cdrom

proc ,
/proc. mount -a, ,
, proc :
# mount -t proc proc /proc

ls /proc , . ,
proc chroot:
# mount -t proc proc /mnt/debinst/proc

D.3.4.3.
/etc/default/rcS , ,
UTC
. .
# editor /etc/default/rcS
# dpkg-reconfigure tzdata

D.3.4.4.
, /etc/network/interfaces, /etc/resolv.conf,
/etc/hostname /etc/hosts.
# editor /etc/network/interfaces

/usr/share/doc/ifupdown/examples:

######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# See the interfaces(5) manpage for information on what options are
# available.
######################################################################
# We always want the loopback interface.
#
auto lo
iface lo inet loopback
# To use dhcp:
#
# auto eth0

139

D.
# iface eth0 inet dhcp
# An example static IP setup: (broadcast and gateway are optional)
#
# auto eth0
# iface eth0 inet static
#
address 192.168.0.42
#
network 192.168.0.0
#
netmask 255.255.255.0
#
broadcast 192.168.0.255
#
gateway 192.168.0.1

Enter your nameserver(s) and search directives in /etc/resolv.conf:


# editor /etc/resolv.conf

A simple example /etc/resolv.conf:


search hqdom.local
nameserver 10.1.1.36
nameserver 192.168.9.100

DNS-() search /etc/resolv.conf:


# editor /etc/resolv.conf

/etc/resolv.conf:
search hqdom.local
nameserver 10.1.1.36
nameserver 192.168.9.100

( 2 63 ):
# echo DebianHostName > /etc/hostname

/etc/hosts IPv6:
127.0.0.1 localhost
127.0.1.1 DebianHostName
# The following lines are desirable for IPv6 capable hosts
::1
ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

,
/etc/modules .

(eth0, eth1 ..) .

140

D.

D.3.4.5. Apt
Debootstrap /etc/apt/sources.list,
. ,
, :
deb-src http://ftp.us.debian.org/debian squeeze main
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

aptitude update .

D.3.4.6.
, , .
locales . UTF8 .
# aptitude install locales
# dpkg-reconfigure locales

( ):
# aptitude install console-data
# dpkg-reconfigure console-data

, , chroot,
.

D.3.5.
, Linux
. :
# apt-cache search linux-image

, .
# aptitude install linux-image-2.6.32-arch-etc

141

D.

D.3.6.
Debian GNU/Linux ,
. , debootstrap
, aptitude
Debian chroot, .
info grub man lilo.conf .
, Debian,
Debian grub menu.lst
lilo.conf. lilo.conf
. , lilo
(, lilo.conf, ,
).
grub :
# aptitude install grub
# grub-install /dev/hda
# update-grub

grub ( MBR hda).


/boot/grub/menu.lst.
, , /dev/hda .
grub, .
/etc/lilo.conf :
boot=/dev/hda6
root=/dev/hda6
install=menu
delay=20
lba32
image=/vmlinuz
initrd=/initrd.img
label=Debian

D.3.7.
, .
,
:
# tasksel install standard

, aptitude .

/var/cache/apt/archives/. :

# aptitude clean

142

D.

D.4. Debian GNU/Linux Parallel Line


IP (PLIP)
Debian GNU/Linux
Ethernet, - -
( - ). -
, - Debian (, ).
, , PLIP
(ppp0).
IP- 192.168.0.1 192.168.0.2 PLIP
(
).
PLIP ,
( . 7).
, BIOS (IO base address IRQ)
. : io=0x378, irq=7.

D.4.1.

, , Debian.

; . 2.4.

, , ,
.

- DB-25. PLIPInstall-HOWTO (http://www.tldp.org/HOWTO/PLIP-Install-HOWTO.html).

D.4.2.
,
ppp0.
#!/bin/sh
# We remove running modules from kernel to avoid conflicts and to
# reconfigure them manually.
modprobe -r lp parport_pc
modprobe parport_pc io=0x378 irq=7
modprobe plip
# Configure the plip interface (plip0 for me, see dmesg | grep plip)
ifconfig plip0 192.168.0.2 pointopoint 192.168.0.1 netmask 255.255.255.255 up
# Configure gateway
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1
> /proc/sys/net/ipv4/ip_forward

143

D.

D.4.3.
.
; expert.
, . ,
io irq
parport_pc, :
expert parport_pc.io=0x378 parport_pc.irq=7

, .
1. CD
plip-modules; PLIP
.
2.

,
. , debian-installer
plip, .
, ,
.

/ ,
. plip.

3.

DHCP:

IP-: 192.168.0.1

PPP: 192.168.0.2

DNS-: (
/etc/resolv.conf)

D.5. Debian GNU/Linux


PPP Ethernet (PPPoE)
PPP Ethernet (PPPoE)
(ADSL )
.
PPPoE, .
.
PPPoE , ,
( . 7).

144

D.
PPPoE
CD-ROM/DVD.
(, netboot).
PPPoE
. .

modules=ppp-udeb3.
, PPPoE (ppp-udeb)
.

( ,
; 4).


Ethernet.

PPPoE.
PPPoE ( PPPoE)
Ethernet.
, .
- .
;
, PPPoE-
.

,
( PPPoE).


PPPoE. , PPPoE

( ).
- , ,

PPPoE-.

D.6.


, 32-bit PC.
, ,
, .
,
.
, ,
3. , , . . 5.1.7
4. ppp-udeb .
( ),
ppp-udeb, modules .

145

D.
newt. , ,
, .
CD
.
.
Advanced options.
installgui, expertgui rescuegui
, Help .
, .
mini ISO-5, , , .

.
:
, : 100MB. ,
newt.
56MB,
,
.
.

D.6.1.

,
,
.
, ,
. (,
), + -.
(, ), -,
Continue ; enter ,
Continue.
, .
F1.
, y Ctrl,
X Window System. , VT2 (
), : Ctrl- Alt-F2.
VT5,
Alt-F5 .

5.

mini ISO - Debian, . 4.2.

netboot/gtk/mini.iso.

146

E.
E.1.
debian-installer Sarge,
c boot-floppies
Woody,
Debian, Progeny,
GPL 2003 .
DocBook XML.

docbook-xml docbook-xsl.
,
XML, (entities)
(profiling attributes). ,
. XML-
, -
.

E.2.
,
installation-guide.
reportbug
Debian (http://bugs.debian.org/).
(http://bugs.debian.org/installation-guide),
- . ,
<XXXX @bugs.debian.org>,
XXXX .
DocBook XML
. SVN-
(http://svn.debian.org/wsvn/d-i/). DocBook, :
,
. DocBook HTML, ,
. debian-boot ( ) .
, SVN, README
(http://svn.debian.org/wsvn/d-i/README?op=file),
.

debian-installer,
<debian-boot@lists.debian.org>.
Debian (http://www.debian.org/MailingLists/subscribe) ,
. (http://lists.debian.org/) .

147

E.

E.3. ,

, (Bruce Perens),
(Sven Rudolph), (Igor Grobman), (James
Treacy) (Adam Di Carlo). (Sebastian) "
".
(Miroslav Kure) debian-installer
Sarge. (Frans Pop)
Etch, Lenny Squeeze.
Debian .
(Michael Schmitz) ( m68k),
(Frank Neumann) ( Amiga
(http://www.informatik.uni-oldenburg.de/~amigo/debian_inst.html)), (Arto Astala),
(Eric Delaunay), (Ben Collins) (
SPARC), (Tapio Lehtonen) (Stphane Bortzmeyer)
. (Pascal Le Bail)
USB- .
HOWTO
(Jim Mintha) (URL ), Debian FAQ
(http://www.debian.org/doc/FAQ/), Linux/m68k FAQ (http://www.linux-m68k.org/faq/faq.html),
FAQ Linux SPARC (http://www.ultralinux.org/faq.html), Linux/Alpha FAQ
(http://linux.iol.unh.edu/linux/alpha/faq/) .
.
chroot (. D.3) ,
. (Karsten M. Self).
plip (. D.4)
PLIP-Install-HOWTO (http://www.tldp.org/HOWTO/PLIP-Install-HOWTO.html),
(Gilles Lamiral).

E.4.
.

148

F. GNU General Public License


Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

F.1. Preamble
The licenses for most software are designed to take away your freedom to share and change it. By
contrast, the gnu General Public License is intended to guarantee your freedom to share and change
free software to make sure the software is free for all its users. This General Public License applies
to most of the Free Software Foundations software and to any other program whose authors commit
to using it. (Some other Free Software Foundation software is covered by the gnu Library General
Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses
are designed to make sure that you have the freedom to distribute copies of free software (and charge
for this service if you wish), that you receive source code or can get it if you want it, that you can
change the software or use pieces of it in new free programs; and that you know you can do these
things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to
ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the
recipients all the rights that you have. You must make sure that they, too, receive or can get the source
code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which
gives you legal permission to copy, distribute and/or modify the software.
Also, for each authors protection and ours, we want to make certain that everyone understands that
there is no warranty for this free software. If the software is modified by someone else and passed on,
we want its recipients to know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger
that redistributors of a free program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any patent must be licensed for
everyones free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.

F.2. GNU GENERAL PUBLIC LICENSE


TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

149

F. GNU General Public License


0. This License applies to any program or other work which contains a notice placed by the copyright
holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program
or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter,
translation is included without limitation in the term "modification".) Each licensee is addressed as
"you".
Activities other than copying, distribution and modification are not covered by this License; they are
outside its scope. The act of running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Programs source code as you receive it, in
any medium, provided that you conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and
to the absence of any warranty; and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer
warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work
based on the Program, and copy and distribute such modifications or work under the terms of Section
1 above, provided that you also meet all of these conditions:
a. You must cause the modified files to carry prominent notices stating that you changed the files
and the date of any change.
b. You must cause any work that you distribute or publish, that in whole or in part contains or is
derived from the Program or any part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c. If the modified program normally reads commands interactively when run, you must cause it,
when started running for such interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a notice that there is no warranty
(or else, saying that you provide a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this License. (Exception: if the
Program itself is interactive but does not normally print such an announcement, your work based
on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are
not derived from the Program, and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those sections when you distribute them
as separate works. But when you distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of this License, whose permissions
for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely
by you; rather, the intent is to exercise the right to control the distribution of derivative or collective
works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a
work based on the Program) on a volume of a storage or distribution medium does not bring the other
work under the scope of this License.

150

F. GNU General Public License


3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code
or executable form under the terms of Sections 1 and 2 above provided that you also do one of the
following:
a. Accompany it with the complete corresponding machine-readable source code, which must be
distributed under the terms of Sections 1 and 2 above on a medium customarily used for software
interchange; or,
b. Accompany it with a written offer, valid for at least three years, to give any third party, for a
charge no more than your cost of physically performing source distribution, a complete machinereadable copy of the corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
c. Accompany it with the information you received as to the offer to distribute corresponding source
code. (This alternative is allowed only for noncommercial distribution and only if you received
the program in object code or executable form with such an offer, in accord with Subsection b
above.)
The source code for a work means the preferred form of the work for making modifications to it. For
an executable work, complete source code means all the source code for all modules it contains, plus
any associated interface definition files, plus the scripts used to control compilation and installation of
the executable. However, as a special exception, the source code distributed need not include anything
that is normally distributed (in either source or binary form) with the major components (compiler,
kernel, and so on) of the operating system on which the executable runs, unless that component itself
accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place,
then offering equivalent access to copy the source code from the same place counts as distribution of
the source code, even though third parties are not compelled to copy the source along with the object
code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided
under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License. However, parties who have
received copies, or rights, from you under this License will not have their licenses terminated so long
as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else
grants you permission to modify or distribute the Program or its derivative works. These actions
are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the
Program (or any work based on the Program), you indicate your acceptance of this License to do so,
and all its terms and conditions for copying, distributing or modifying the Program or works based on
it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject
to these terms and conditions. You may not impose any further restrictions on the recipients exercise
of the rights granted herein. You are not responsible for enforcing compliance by third parties to this
License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason
(not limited to patent issues), conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not excuse you from the conditions
of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may not distribute the Program
at all. For example, if a patent license would not permit royalty-free redistribution of the Program by

151

F. GNU General Public License


all those who receive copies directly or indirectly through you, then the only way you could satisfy
both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the
balance of the section is intended to apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims
or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of
the free software distribution system, which is implemented by public license practices. Many people
have made generous contributions to the wide range of software distributed through that system in
reliance on consistent application of that system; it is up to the author/donor to decide if he or she is
willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of
this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by
copyrighted interfaces, the original copyright holder who places the Program under this License may
add an explicit geographical distribution limitation excluding those countries, so that distribution is
permitted only in or among countries not thus excluded. In such case, this License incorporates the
limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public
License from time to time. Such new versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. Each version is given a distinguishing version
number. If the Program specifies a version number of this License which applies to it and "any later
version", you have the option of following the terms and conditions either of that version or of any
later version published by the Free Software Foundation. If the Program does not specify a version
number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions
for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of
our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL AND COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING
BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO

152

F. GNU General Public License


OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

F.3. How to Apply These Terms to Your New Programs


If you develop a new program, and you want it to be of the greatest possible use to the public, the
best way to achieve this is to make it free software which everyone can redistribute and change under
these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each
source file to most effectively convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
one line to give the programs name and a brief idea of what it does.
Copyright (C) year name of author

This program is
modify it under
as published by
of the License,

free software; you can redistribute it and/or


the terms of the GNU General Public License
the Free Software Foundation; either version 2
or (at your option) any later version.

This program is distributed in the hope that it will be useful,


but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive
mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with absolutely no warranty; for details
type show w. This is free software, and you are welcome
to redistribute it under certain conditions; type show c
for details.

The hypothetical commands show w and show c should show the appropriate parts of the General
Public License. Of course, the commands you use may be called something other than show w and
show c; they could even be mouse-clicks or menu items whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a
"copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program Gnomovision (which makes passes at compilers) written
by James Hacker.

153

F. GNU General Public License

signature of Ty Coon, 1 April 1989

Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs.
If your program is a subroutine library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the GNU Lesser General Public
License instead of this License.

154