| 1 |
faw-guest |
33371 |
<!-- retain these comments for translator revision tracking -->
|
| 2 |
faw |
56619 |
<!-- original version: 56510 -->
|
| 3 |
|
|
<!-- updated 38960:56510 by Felipe Augusto van de Wiel (faw) 2008.11.10 -->
|
| 4 |
faw-guest |
33371 |
|
| 5 |
|
|
<!--
|
| 6 |
faw-guest |
44299 |
Be careful with the format of this file as it is parsed to generate
|
| 7 |
faw-guest |
38115 |
the example preconfiguration file.
|
| 8 |
faw-guest |
33371 |
In that file all text between <informalexample> tags that have the
|
| 9 |
|
|
attribute 'role="example"' set is included, except if a 'condition'
|
| 10 |
|
|
attribute is in force that does not match the specified release or if an
|
| 11 |
|
|
'arch' attribute is in force that does not match the specified architecture.
|
| 12 |
|
|
|
| 13 |
|
|
Currently only a single variant of the example file is generated (for i386).
|
| 14 |
|
|
-->
|
| 15 |
|
|
|
| 16 |
faw-guest |
38115 |
<appendix id="appendix-preseed">
|
| 17 |
faw-guest |
33592 |
<title>Automatizando a instalação usando pré-configuração</title>
|
| 18 |
faw-guest |
33371 |
|
| 19 |
|
|
<para>
|
| 20 |
|
|
|
| 21 |
faw-guest |
43078 |
Este apêndice explica como pré-configurar respostas para questões
|
| 22 |
faw-guest |
33592 |
do &d-i; para automatizar sua instalação.
|
| 23 |
faw-guest |
33371 |
|
| 24 |
|
|
</para><para>
|
| 25 |
|
|
|
| 26 |
faw-guest |
33592 |
Os fragmentos de configuração usados neste apêndice estão também disponíveis
|
| 27 |
|
|
como arquivos-exemplo de pré-configuração em &urlset-example-preseed;.
|
| 28 |
faw-guest |
33371 |
|
| 29 |
|
|
</para>
|
| 30 |
|
|
|
| 31 |
|
|
<sect1 id="preseed-intro">
|
| 32 |
faw-guest |
33592 |
<title>Introdução</title>
|
| 33 |
faw-guest |
33371 |
<para>
|
| 34 |
|
|
|
| 35 |
faw-guest |
38115 |
A pré-configuração provê um meio para definir respostas para perguntas feitas
|
| 36 |
|
|
durante o processo de instalação, sem ter que entrar com as respostas
|
| 37 |
|
|
manualmente durante a instalação. Isto torna possível automatizar totalmente
|
| 38 |
|
|
a maioria tipos de instalações e também oferece alguns recursos não disponíveis
|
| 39 |
|
|
durante a instalação normal.
|
| 40 |
faw-guest |
33371 |
|
| 41 |
faw |
52659 |
</para><para>
|
| 42 |
|
|
|
| 43 |
|
|
A pré-configuração não é obrigatório. Se você usar um arquivo
|
| 44 |
|
|
<quote>preseed</quote> vazio, o instalador se comportará da mesma forma que
|
| 45 |
|
|
uma instalação manual normal. Cada questão que você pré-configura (se você
|
| 46 |
|
|
fizer da forma correta!) modificará a instalação de alguma forma a partir
|
| 47 |
|
|
desta linha base inicial.
|
| 48 |
|
|
|
| 49 |
faw-guest |
33371 |
</para>
|
| 50 |
|
|
|
| 51 |
|
|
<sect2 id="preseed-methods">
|
| 52 |
faw-guest |
33592 |
<title>Métodos de pré-configuração</title>
|
| 53 |
faw-guest |
33371 |
<para>
|
| 54 |
|
|
|
| 55 |
faw-guest |
33592 |
Existem três métodos que podem ser usados para pré-configuração:
|
| 56 |
|
|
<firstterm>initrd</firstterm>, <firstterm>file</firstterm> e
|
| 57 |
|
|
<firstterm>network</firstterm>. Pré-configuração initrd funciona com qualquer
|
| 58 |
|
|
método de instalação e suporta pré-configuração de mais coisas, mas isto requer
|
| 59 |
|
|
maior preparação. Pré-configuração file e network podem ser utilizados com
|
| 60 |
faw-guest |
43078 |
diferentes métodos de instalação.
|
| 61 |
faw-guest |
33371 |
|
| 62 |
|
|
</para><para>
|
| 63 |
|
|
|
| 64 |
faw-guest |
33592 |
A tabela a seguir mostra os métodos de pré-configuração que podem ser utilizados
|
| 65 |
|
|
com cada método de instalação.
|
| 66 |
faw-guest |
33371 |
|
| 67 |
|
|
<informaltable>
|
| 68 |
|
|
<tgroup cols="4">
|
| 69 |
|
|
<thead>
|
| 70 |
|
|
<row>
|
| 71 |
faw-guest |
33592 |
<entry>Método de Instalação</entry><entry>initrd</entry>
|
| 72 |
faw-guest |
33371 |
<entry>file</entry><entry>network</entry>
|
| 73 |
|
|
</row>
|
| 74 |
|
|
</thead>
|
| 75 |
|
|
|
| 76 |
|
|
<tbody>
|
| 77 |
|
|
<row>
|
| 78 |
|
|
<entry>CD/DVD</entry>
|
| 79 |
faw-guest |
33592 |
<entry>sim</entry>
|
| 80 |
|
|
<entry>sim</entry>
|
| 81 |
faw-guest |
43078 |
<entry>yes<footnote id='apx-ps-net'>
|
| 82 |
|
|
|
| 83 |
|
|
<para>
|
| 84 |
|
|
mas apenas se você tiver acesso à rede, e definir
|
| 85 |
|
|
<literal>preseed/url</literal> apropriadamente
|
| 86 |
|
|
</para>
|
| 87 |
faw |
51225 |
|
| 88 |
faw-guest |
43078 |
</footnote></entry>
|
| 89 |
faw-guest |
33371 |
</row><row>
|
| 90 |
|
|
<entry>netboot</entry>
|
| 91 |
faw-guest |
33592 |
<entry>sim</entry>
|
| 92 |
|
|
<entry>não</entry>
|
| 93 |
|
|
<entry>sim</entry>
|
| 94 |
faw-guest |
33371 |
</row><row>
|
| 95 |
faw-guest |
33592 |
<entry>hd-media <phrase condition="bootable-usb">(incluindo usb-stick)</phrase></entry>
|
| 96 |
|
|
<entry>sim</entry>
|
| 97 |
|
|
<entry>sim</entry>
|
| 98 |
faw-guest |
43078 |
<entry>yes<footnoteref linkend='apx-ps-net'/></entry>
|
| 99 |
faw-guest |
33371 |
</row><row condition="supports-floppy-boot">
|
| 100 |
|
|
<entry>floppy based (cd-drivers)</entry>
|
| 101 |
faw-guest |
33592 |
<entry>sim</entry>
|
| 102 |
|
|
<entry>sim</entry>
|
| 103 |
faw-guest |
43078 |
<entry>yes<footnoteref linkend='apx-ps-net'/></entry>
|
| 104 |
faw-guest |
33371 |
</row><row condition="supports-floppy-boot">
|
| 105 |
|
|
<entry>floppy based (net-drivers)</entry>
|
| 106 |
faw-guest |
33592 |
<entry>sim</entry>
|
| 107 |
|
|
<entry>não</entry>
|
| 108 |
|
|
<entry>sim</entry>
|
| 109 |
faw-guest |
33371 |
</row><row arch="s390">
|
| 110 |
|
|
<entry>generic/tape</entry>
|
| 111 |
faw-guest |
33592 |
<entry>sim</entry>
|
| 112 |
|
|
<entry>não</entry>
|
| 113 |
|
|
<entry>sim</entry>
|
| 114 |
faw-guest |
33371 |
</row>
|
| 115 |
|
|
</tbody>
|
| 116 |
|
|
|
| 117 |
|
|
</tgroup></informaltable>
|
| 118 |
|
|
|
| 119 |
|
|
</para><para>
|
| 120 |
|
|
|
| 121 |
faw-guest |
33592 |
Uma importante diferença entre os métodos de pré-configuração é o ponto onde
|
| 122 |
|
|
o arquivo de pré-configuração é carregado e processado. Para a pré-configuração
|
| 123 |
|
|
initrd é logo no início da instalação, antes da primeira questão ser mostrada.
|
| 124 |
faw-guest |
43511 |
Para pré-configuração file é após o CD ou a imagem de CD ser carregada. Para
|
| 125 |
faw-guest |
33592 |
pré-configuração network é somente depois da rede ser configurada.
|
| 126 |
faw-guest |
33371 |
|
| 127 |
|
|
</para><para>
|
| 128 |
|
|
|
| 129 |
faw-guest |
43078 |
Obviamente, quaisquer questões que venham a ser processada antes que o
|
| 130 |
|
|
arquivo de pré-configuração seja carregado, não poderão ser pré-configuradas
|
| 131 |
|
|
(isso incluirá questões que são exibidas apenas nas prioridades média e
|
| 132 |
|
|
baixa, como a primeira tentativa de detecção de hardware).
|
| 133 |
|
|
<xref linkend="preseed-bootparms"/> oferece uma forma de evitar que estas
|
| 134 |
|
|
questões sejam perguntadas.
|
| 135 |
faw-guest |
33371 |
|
| 136 |
|
|
</para><para>
|
| 137 |
|
|
|
| 138 |
faw-guest |
43078 |
Para evitar que questões que normalmente aparecem antes que a
|
| 139 |
|
|
pré-configuração ocorra, você pode iniciar o instalador no modo
|
| 140 |
|
|
<quote>auto</quote>. Isso retarda perguntas que normalmente seriam
|
| 141 |
|
|
feitas muito cedo para a pré-configuração (i.e. seleção de idioma,
|
| 142 |
|
|
país ou teclado) até depois que a rede esteja ativa, e assim permitindo
|
| 143 |
|
|
que elas sejam pré-configurados. Isso também executa a instalação com
|
| 144 |
|
|
prioridade crítica, a qual evita muitas questões de pouca importância.
|
| 145 |
|
|
Veja <xref linkend="preseed-auto"/> para detalhes.
|
| 146 |
faw-guest |
33371 |
|
| 147 |
|
|
</para>
|
| 148 |
|
|
</sect2>
|
| 149 |
|
|
|
| 150 |
|
|
<sect2 id="preseed-limitations">
|
| 151 |
faw-guest |
33592 |
<title>Limitações</title>
|
| 152 |
faw-guest |
33371 |
<para>
|
| 153 |
|
|
|
| 154 |
faw-guest |
33592 |
Enquanto a maioria das questões usadas pelo &d-i; podem ser pré-configuradas
|
| 155 |
|
|
usando este método, aqui há algumas exceções dignas de nota. Você deve
|
| 156 |
|
|
re(particionar) o disco inteiro ou utilizar algum espaço livre disponível no
|
| 157 |
faw-guest |
43078 |
disco; não é possível usar partições existentes.
|
| 158 |
faw-guest |
33371 |
|
| 159 |
|
|
</para>
|
| 160 |
|
|
</sect2>
|
| 161 |
|
|
|
| 162 |
faw-guest |
33592 |
<!-- Next section is intentionally left untranslated (macs) -->
|
| 163 |
faw-guest |
33371 |
<!-- Joeyh feels this is too technical, so leave it out for now
|
| 164 |
|
|
<sect2 id="preseed-debconf">
|
| 165 |
|
|
<title>Debconf basics</title>
|
| 166 |
|
|
<para>
|
| 167 |
|
|
|
| 168 |
|
|
Preseeding makes use of the <classname>debconf</classname> framework. This
|
| 169 |
|
|
framework is the preferred mechanism used in Debian to interact with the user
|
| 170 |
|
|
when configuring packages and also forms the heart of &d-i;.
|
| 171 |
|
|
In the <classname>debconf</classname> framework questions or dialogs are
|
| 172 |
|
|
based on <firstterm>templates</firstterm>. There are different types of
|
| 173 |
|
|
templates for different types of questions. The actual questions are
|
| 174 |
|
|
<quote>generated</quote> from templates at runtime; multiple questions can
|
| 175 |
|
|
use the same template.
|
| 176 |
|
|
|
| 177 |
|
|
</para><para>
|
| 178 |
|
|
|
| 179 |
|
|
The following types of templates are relevant for preseeding.
|
| 180 |
|
|
|
| 181 |
|
|
</para>
|
| 182 |
|
|
|
| 183 |
faw-guest |
43078 |
<itemizedlist spacing="compact">
|
| 184 |
faw-guest |
33371 |
<listitem><para>
|
| 185 |
|
|
string: allows the user to type any value
|
| 186 |
|
|
</para></listitem>
|
| 187 |
|
|
<listitem><para>
|
| 188 |
|
|
password: similar to string but the value typed is not displayed
|
| 189 |
|
|
</para></listitem>
|
| 190 |
|
|
<listitem><para>
|
| 191 |
|
|
boolean: for yes/no or true/false type of questions
|
| 192 |
|
|
</para></listitem>
|
| 193 |
|
|
<listitem><para>
|
| 194 |
|
|
select: allows the user to select one option from a list
|
| 195 |
|
|
</para></listitem>
|
| 196 |
|
|
<listitem><para>
|
| 197 |
|
|
multiselect: allows the user to select zero, one or more options from a list
|
| 198 |
|
|
</para></listitem>
|
| 199 |
|
|
<listitem><para>
|
| 200 |
|
|
note: used to display a message
|
| 201 |
|
|
</para></listitem>
|
| 202 |
|
|
</itemizedlist>
|
| 203 |
|
|
|
| 204 |
|
|
<para>
|
| 205 |
|
|
|
| 206 |
|
|
In &d-i; templates are stored in a readable file
|
| 207 |
|
|
<filename>/var/cache/debconf/templates.dat</filename>. This file contains all fixed
|
| 208 |
|
|
text and all translations. It can also contain a default value for the
|
| 209 |
|
|
template. The fixed text can include variables that will be replaced at
|
| 210 |
|
|
runtime.
|
| 211 |
|
|
|
| 212 |
|
|
</para><para>
|
| 213 |
|
|
|
| 214 |
|
|
Another readable file <filename>/var/cache/debconf/questions.dat</filename>
|
| 215 |
|
|
is used to store the values for variables and the answers given to questions.
|
| 216 |
|
|
A question always refers to the template used to ask it. For obvious
|
| 217 |
faw-guest |
38115 |
security reasons the values for questions of type <quote>password</quote>
|
| 218 |
faw-guest |
33371 |
are stored in a separate, non-readable file in the same directory.
|
| 219 |
|
|
|
| 220 |
|
|
</para>
|
| 221 |
|
|
</sect2>
|
| 222 |
|
|
-->
|
| 223 |
faw-guest |
43078 |
</sect1>
|
| 224 |
faw |
51225 |
|
| 225 |
|
|
|
| 226 |
faw-guest |
33371 |
<sect1 id="preseed-using">
|
| 227 |
faw-guest |
33592 |
<title>Usando pré-configuração</title>
|
| 228 |
faw-guest |
33371 |
<para>
|
| 229 |
|
|
|
| 230 |
faw-guest |
43078 |
Você primeiro precisa criar um arquivo de pré-configuração e colocá-lo
|
| 231 |
faw-guest |
33592 |
em um local onde você possa usar. A criação do arquivo de pré-configuração é
|
| 232 |
|
|
coberto mais tarde neste apêndice. Colocar no local correto é essencial para
|
| 233 |
|
|
pré-configuração por rede ou se você quiser ler o arquivo de um disquete ou de
|
| 234 |
|
|
um <quote>usb-stick</quote>. Se você quiser incluir o arquivo em um CD ou DVD,
|
| 235 |
|
|
você deve recriar a imagem ISO. Como ter o arquivo de pré-configuração incluído
|
| 236 |
|
|
no initrd está fora do escopo deste documento; por favor consulte a documentação
|
| 237 |
|
|
para desenvolvedores do &d-i;.
|
| 238 |
faw-guest |
33371 |
|
| 239 |
|
|
</para><para>
|
| 240 |
|
|
|
| 241 |
faw-guest |
33592 |
Um exemplo de arquivo de pré-configuração que você pode usar como base para o
|
| 242 |
|
|
seu arquivo de pré-configuração está disponível em &urlset-example-preseed;.
|
| 243 |
|
|
Este arquivo é baseado nos fragmentos de configuração incluídos neste apêndice.
|
| 244 |
faw-guest |
33371 |
|
| 245 |
|
|
</para>
|
| 246 |
|
|
|
| 247 |
|
|
<sect2 id="preseed-loading">
|
| 248 |
faw-guest |
38115 |
<title>Carregando o arquivo de pré-configuração</title>
|
| 249 |
faw-guest |
33371 |
<para>
|
| 250 |
|
|
|
| 251 |
faw-guest |
33592 |
Se estiver usando pré-configuração initrd, você deve se assegurar que o arquivo
|
| 252 |
|
|
com nome <filename>preseed.cfg</filename> está incluído no diretório raiz do
|
| 253 |
|
|
initrd. O instalador irá automaticamente checar se o arquivo está presente e o
|
| 254 |
|
|
carrega.
|
| 255 |
faw-guest |
33371 |
|
| 256 |
|
|
</para><para>
|
| 257 |
|
|
|
| 258 |
faw-guest |
33592 |
Para outros métodos de pré-configuração você tem que dizer ao instalador qual
|
| 259 |
|
|
arquivo usar quando você o iniciar. Isto é feito passando para o kernel um
|
| 260 |
|
|
parâmetro de inicialização, tanto manualmente no momento da inicialização como
|
| 261 |
|
|
editando o arquivo de configuração do bootloader, (ex.: <filename>syslinux.cfg
|
| 262 |
|
|
</filename>) e adicionando o parâmetro no final da(s) linha(s) append do kernel.
|
| 263 |
faw-guest |
33371 |
|
| 264 |
|
|
</para><para>
|
| 265 |
|
|
|
| 266 |
faw-guest |
33592 |
Se você especificar o arquivo de pré-configuração na configuração do bootloader,
|
| 267 |
|
|
você pode mudar a configuração para não precisar apertar enter para carregar o
|
| 268 |
faw-guest |
38115 |
instalador. Para o syslinux isso significa marcar o timeout para
|
| 269 |
|
|
<literal>1</literal> no <filename>syslinux.cfg</filename>.
|
| 270 |
faw-guest |
33371 |
|
| 271 |
|
|
</para><para>
|
| 272 |
|
|
|
| 273 |
faw-guest |
33592 |
Para ter certeza que o instalador pegou o arquivo de pré-configuração certo,
|
| 274 |
|
|
você pode opcionalmente especificar um checksum para o arquivo. Atualmente isto
|
| 275 |
|
|
precisa ser um md5sum, e se especificado deve coincidir com o arquivo de
|
| 276 |
|
|
pré-configuração ou o instalador se recusará a usá-lo.
|
| 277 |
faw-guest |
33371 |
|
| 278 |
|
|
</para>
|
| 279 |
|
|
|
| 280 |
|
|
<informalexample><screen>
|
| 281 |
faw-guest |
43078 |
Parâmetros de inicialização a especificar:
|
| 282 |
faw-guest |
33592 |
- se estiver iniciando pela rede:
|
| 283 |
faw-guest |
33371 |
preseed/url=http://host/path/to/preseed.cfg
|
| 284 |
|
|
preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
|
| 285 |
|
|
|
| 286 |
faw-guest |
33592 |
- se estiver iniciando por um CD recriado:
|
| 287 |
faw-guest |
33371 |
preseed/file=/cdrom/preseed.cfg
|
| 288 |
|
|
preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
|
| 289 |
|
|
|
| 290 |
faw-guest |
33592 |
- se estiver instalando por uma mídia USB (coloque o arquivo de pré-configuração
|
| 291 |
|
|
no diretório de primeiro nível do <quote>USB stick</quote>):
|
| 292 |
faw-guest |
33371 |
preseed/file=/hd-media/preseed.cfg
|
| 293 |
|
|
preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
|
| 294 |
|
|
</screen></informalexample>
|
| 295 |
|
|
|
| 296 |
|
|
<para>
|
| 297 |
|
|
|
| 298 |
faw-guest |
38635 |
Note que <filename>preseed/url</filename> pode ser abreviado para apenas
|
| 299 |
|
|
<filename>url</filename> e <filename>preseed/file</filename> para apenas
|
| 300 |
|
|
<filename>file</filename> quando são passados como parâmetros de inicialização.
|
| 301 |
|
|
|
| 302 |
faw-guest |
43078 |
</para>
|
| 303 |
|
|
</sect2>
|
| 304 |
|
|
|
| 305 |
|
|
<sect2 id="preseed-bootparms">
|
| 306 |
faw |
51225 |
<title>Usando parâmetros de inicialização para pré-configurar questões</title>
|
| 307 |
faw-guest |
43078 |
<para>
|
| 308 |
|
|
|
| 309 |
|
|
Se um arquivo de pré-configuração não puder ser usado para pré-configurar
|
| 310 |
|
|
alguns passos, a instalação ainda pode ser totalmente automatizada, já
|
| 311 |
|
|
que você pode passar valores pré-configurados pela linha de comando quando
|
| 312 |
|
|
inicializar o instalador.
|
| 313 |
|
|
|
| 314 |
faw-guest |
38635 |
</para><para>
|
| 315 |
|
|
|
| 316 |
faw-guest |
43078 |
Parâmetros de inicialização também podem ser usados se você não quer
|
| 317 |
|
|
realmente usar a pré-configuração, mas apenas quer fornecer uma resposta para
|
| 318 |
|
|
uma pergunta específica. Alguns exemplos onde isso pode ser útil estão
|
| 319 |
|
|
documentados em outro lugar deste manual.
|
| 320 |
faw-guest |
33371 |
|
| 321 |
faw-guest |
43078 |
</para><para>
|
| 322 |
|
|
|
| 323 |
|
|
Para definir um valor a ser usando dentro do &d-i;, apenas passe
|
| 324 |
|
|
<userinput><replaceable>caminho/para/a/variavel</replaceable>=<replaceable>valor</replaceable></userinput>
|
| 325 |
|
|
para qualquer uma das variáveis de pré-configuração listadas nos exemplos
|
| 326 |
|
|
neste apêndice. Se um valor é para ser usado para configurar pacotes no
|
| 327 |
faw-guest |
44299 |
sistema algo, você precisa prefixar o <firstterm>dono</firstterm><footnote>
|
| 328 |
|
|
|
| 329 |
|
|
<para>
|
| 330 |
|
|
O dono de uma variável debconf (ou modelo) é normalmente o nome do pacote
|
| 331 |
|
|
que contém o modelo debconf correspondente. Para variáveis usadas no próprio
|
| 332 |
|
|
instalador o dono é <quote>d-i</quote>.
|
| 333 |
|
|
Modelos e variáveis podem ter mais de um dono, isto ajuda a determinar se
|
| 334 |
|
|
eles podem ser removidos da base de dados debconf se o pacote for expurgado
|
| 335 |
|
|
(<quote>purged</quote>).
|
| 336 |
|
|
</para>
|
| 337 |
|
|
|
| 338 |
|
|
</footnote> da variável como em
|
| 339 |
faw-guest |
43078 |
<userinput><replaceable>dono</replaceable>:<replaceable>caminho/para/a/variavel</replaceable>=<replaceable>valor</replaceable></userinput>.
|
| 340 |
|
|
Se você não especificar um dono, o valor para a variável não será copiado
|
| 341 |
|
|
para a base de dados do debconf no sistema alvo e portanto permanecerá sem
|
| 342 |
|
|
uso durante a configuração do pacote relevante.
|
| 343 |
|
|
|
| 344 |
|
|
</para><para>
|
| 345 |
|
|
|
| 346 |
faw |
48784 |
Normalmente, pré-configurar uma questão desta forma significará que essa
|
| 347 |
|
|
questão não será perguntada. Para definir um valor padrão específico para
|
| 348 |
|
|
uma questão, mas ainda assim ser questionado, use <quote>?=</quote> ao
|
| 349 |
|
|
invés de <quote>=</quote> como operador. Veja também
|
| 350 |
|
|
<xref linkend="preseed-seenflag"/>.
|
| 351 |
|
|
|
| 352 |
|
|
</para><para>
|
| 353 |
|
|
|
| 354 |
faw-guest |
43078 |
Note que algumas variáveis que são freqüentemente definidas no prompt de
|
| 355 |
|
|
inicialização tem um apelido abreviado. Se um apelido está disponível, ele
|
| 356 |
faw |
48784 |
é usado nos exemplos deste apêndice ao invés da variável completa. A
|
| 357 |
|
|
variável <literal>preseed/url</literal>, por exemplo, foi apelidada como
|
| 358 |
|
|
<literal>url</literal>. Outro exemplo é o apelido <literal>tasks</literal>,
|
| 359 |
|
|
que traduz para <literal>tasksel:tasksel/first</literal>.
|
| 360 |
faw-guest |
43078 |
|
| 361 |
|
|
</para><para>
|
| 362 |
|
|
|
| 363 |
|
|
Um <quote>--</quote> nas opções de inicialização tem um significado especial.
|
| 364 |
|
|
Parâmetros do kernel que aparecem após o último <quote>--</quote> podem ser
|
| 365 |
|
|
copiados dentro da configuração do carregador de inicialização
|
| 366 |
|
|
(<quote>bootloader</quote>) para o sistema instalado (se suportado pelo
|
| 367 |
|
|
instalador para o carregador de inicialização). O instalador irá
|
| 368 |
|
|
automaticamente filtrar quaisquer opções (como opções pré-configuradas) que
|
| 369 |
|
|
reconhecer.
|
| 370 |
|
|
|
| 371 |
faw-guest |
33371 |
</para>
|
| 372 |
faw-guest |
43078 |
<note><para>
|
| 373 |
|
|
|
| 374 |
|
|
Kernels atuais (2.6.9 e posteriores) aceitam um máximo de 32 opções de linha
|
| 375 |
|
|
de comando e 32 opções de ambiente, incluindo quaisquer opções adicionadas
|
| 376 |
|
|
por padrão pelo instalador. Se esses números forem excedidos, o kernel irá
|
| 377 |
|
|
entrar em pânico (crash). (Para kernels anteriores, esses números eram
|
| 378 |
|
|
menores).
|
| 379 |
|
|
|
| 380 |
|
|
</para></note>
|
| 381 |
|
|
<para>
|
| 382 |
|
|
|
| 383 |
|
|
Para a maioria das instalações algumas das opções padrão do arquivo de
|
| 384 |
|
|
configuração do seu carregador de inicialização
|
| 385 |
|
|
(<quote>bootloader</quote>, como <literal>vga=normal</literal>, podem
|
| 386 |
|
|
ser removidas com segurança, o que permite que você adicione mais opções
|
| 387 |
|
|
na pré-configuração.
|
| 388 |
|
|
|
| 389 |
|
|
</para>
|
| 390 |
|
|
<note><para>
|
| 391 |
|
|
|
| 392 |
|
|
Talvez nem sempre seja possível especificar valores com espaços nos
|
| 393 |
|
|
parâmetros de inicialização, mesmo se você delimitá-los com aspas.
|
| 394 |
|
|
|
| 395 |
|
|
</para></note>
|
| 396 |
faw-guest |
33371 |
</sect2>
|
| 397 |
|
|
|
| 398 |
faw-guest |
43078 |
<sect2 id="preseed-auto">
|
| 399 |
|
|
<title>Modo auto</title>
|
| 400 |
|
|
<para>
|
| 401 |
|
|
|
| 402 |
|
|
Existem vários recursos do Instalador Debian que se combinam para permitir
|
| 403 |
faw-guest |
43511 |
que simples linhas de comando passadas ao carregador de inicialização
|
| 404 |
faw-guest |
43078 |
resultem em instalações automaticamente personalizadas e arbitrariamente
|
| 405 |
|
|
complexas. Para ilustrar isso, aqui estão alguns exemplos que podem ser
|
| 406 |
|
|
usados no prompt de inicialização:
|
| 407 |
|
|
|
| 408 |
|
|
<informalexample><screen>
|
| 409 |
|
|
auto url=autoserver
|
| 410 |
|
|
</screen></informalexample>
|
| 411 |
|
|
|
| 412 |
|
|
Isso depende da existência de um servidor DHCP que irá levar a máquina ao
|
| 413 |
|
|
ponto onde <literal>autoserver</literal> possa ser resolvido pelo DNS,
|
| 414 |
|
|
talvez após adicionar o domínio local se isso for fornecido pelo DHCP. Se
|
| 415 |
faw-guest |
45684 |
isso for feito em um local onde o domínio é <literal>example.com</literal>,
|
| 416 |
faw-guest |
43078 |
e eles tiverem um DCHP com uma configuração razoavelmente sã, isso resultaria
|
| 417 |
|
|
em um arquivo de pré-configuração sendo pego de
|
| 418 |
fjp |
52911 |
<literal>http://autoserver.example.com/d-i/&releasename;/./preseed.cfg</literal>.
|
| 419 |
faw-guest |
43078 |
|
| 420 |
|
|
</para><para>
|
| 421 |
|
|
|
| 422 |
fjp |
52911 |
A última parte daquela url (<literal>d-i/&releasename;/./preseed.cfg</literal>)
|
| 423 |
faw-guest |
44299 |
é tirada de <literal>auto-install/defaultroot</literal>. Por padrão
|
| 424 |
fjp |
52911 |
isto inclui o diretório <literal>&releasename;</literal> para permitir que
|
| 425 |
faw-guest |
44299 |
futuras versões especifiquem o seu próprio codinome e deixar que as
|
| 426 |
faw-guest |
43078 |
pessoas migrem adiante de uma maneira controlada. O <literal>/./</literal> é
|
| 427 |
|
|
usado para indicar uma raiz relativa, no qual subseqüentes caminhos podem ser
|
| 428 |
|
|
ancorados (para uso em preseed/include e preseed/run). Isso permite que
|
| 429 |
|
|
arquivos sejam especificados tanto como URLs completas, caminhos iniciados
|
| 430 |
|
|
com / que são assim ancorados, ou mesmo caminhos relativos para o local onde
|
| 431 |
|
|
o último arquivo de pré-configuração foi encontrado. Isso pode ser usado
|
| 432 |
|
|
para construir scripts mais portáveis onde toda uma hierarquia de scripts
|
| 433 |
|
|
pode ser movida para um novo local sem ser quebrada, por exemplo, copiando
|
| 434 |
|
|
os arquivos para um dispositivo USB quando eles foram iniciados em um
|
| 435 |
|
|
servidor web. Neste exemplo, se o arquivo de pré-configuração define
|
| 436 |
|
|
<literal>preseed/run</literal> para
|
| 437 |
|
|
<literal>/scripts/late_command.sh</literal> então o arquivo será pego de
|
| 438 |
fjp |
52911 |
<literal>http://autoserver.example.com/d-i/&releasename;/./scripts/late_command.sh</literal>.
|
| 439 |
faw-guest |
43078 |
|
| 440 |
|
|
</para><para>
|
| 441 |
|
|
|
| 442 |
faw-guest |
44299 |
Se não existir uma infraestrutura local com DHCP ou DNS, ou se você não quiser
|
| 443 |
|
|
usar o caminho padrão para o <filename>preseed.cfg</filename>, você pode ainda
|
| 444 |
|
|
usar uma url explícita, e se você não usar o elemento <literal>/./</literal>
|
| 445 |
|
|
ele será ancorado no início do caminho (i.e. o terceiro <literal>/</literal>
|
| 446 |
|
|
da URL). Aqui está um exemplo que requer suporte mínimo da infraestrutura da
|
| 447 |
|
|
rede local:
|
| 448 |
faw-guest |
43078 |
|
| 449 |
|
|
<informalexample><screen>
|
| 450 |
|
|
auto url=<replaceable>http://192.168.1.2/path/to/mypreseed.file</replaceable>
|
| 451 |
|
|
</screen></informalexample>
|
| 452 |
|
|
|
| 453 |
|
|
A maneira como isso funciona é esta:
|
| 454 |
|
|
<itemizedlist spacing="compact">
|
| 455 |
|
|
<listitem><para>
|
| 456 |
|
|
se a URL não especificar um protocolo, http é assumido,
|
| 457 |
|
|
</para></listitem>
|
| 458 |
|
|
<listitem><para>
|
| 459 |
faw-guest |
43511 |
se a seção contendo o nome da máquina não tiver pontos, ela terá o domínio
|
| 460 |
faw-guest |
43078 |
derivado do DHCP anexado a ela, e
|
| 461 |
|
|
</para></listitem>
|
| 462 |
|
|
<listitem><para>
|
| 463 |
|
|
se não existir <literal>/</literal>'s após o nome da máquina, então o
|
| 464 |
|
|
o caminho padrão é adicionado.
|
| 465 |
|
|
</para></listitem>
|
| 466 |
|
|
</itemizedlist>
|
| 467 |
|
|
|
| 468 |
|
|
</para><para>
|
| 469 |
|
|
|
| 470 |
|
|
Adicionalmente ao especificar a url, você pode também especificar
|
| 471 |
|
|
configurações que não afetam diretamente o comportamento do &d-i;
|
| 472 |
faw-guest |
44299 |
em si, mas podem ser passadas através de scripts especificados
|
| 473 |
|
|
usando <literal>preseed/run</literal> no arquivo de pré-configuração
|
| 474 |
|
|
carregado. No momento, o único exemplo disso é
|
| 475 |
faw-guest |
43078 |
<literal>auto-install/classes</literal>, o qual tem um apelido
|
| 476 |
|
|
<literal>classes</literal>. Isso pode ser usado assim:
|
| 477 |
|
|
|
| 478 |
|
|
<informalexample><screen>
|
| 479 |
|
|
auto url=<replaceable>example.com</replaceable> classes=<replaceable>class_A;class_B</replaceable>
|
| 480 |
|
|
</screen></informalexample>
|
| 481 |
|
|
|
| 482 |
|
|
As classes poderiam, por exemplo, denotar o tipo de sistema a ser instalado,
|
| 483 |
|
|
ou a localização a ser usada.
|
| 484 |
|
|
|
| 485 |
|
|
</para><para>
|
| 486 |
|
|
|
| 487 |
|
|
Claro que é possível estender este conceito, e se você o fizer, é razoável
|
| 488 |
|
|
usar o <quote>auto-install namespace</quote> para isso. Então, alguém poderá
|
| 489 |
|
|
ter algo como <literal>auto-install/style</literal> o qual é então usado em
|
| 490 |
|
|
seus scripts. Se você achar necessário fazer isso, por favor mencione isso
|
| 491 |
faw-guest |
45684 |
(em inglês) na lista de e-mail <email>debian-boot@lists.debian.org</email>
|
| 492 |
faw-guest |
43078 |
para que nós possamos evitar conflitos de nomes, e talvez adicionar um
|
| 493 |
|
|
apelido para o parâmetro para você.
|
| 494 |
|
|
|
| 495 |
|
|
</para><para>
|
| 496 |
|
|
|
| 497 |
|
|
O rótulo de inicialização <literal>auto</literal> ainda não está definido
|
| 498 |
|
|
em todas as arquiteturas. O mesmo efeito pode ser alcançado simplesmente
|
| 499 |
|
|
adicionando os dois parâmetros <literal>auto=true priority=critical</literal>
|
| 500 |
|
|
à linha de comando do kernel. O parâmetro <literal>auto</literal> é um
|
| 501 |
fjp |
44897 |
apelido para <literal>auto-install/enable</literal> e controla o atraso
|
| 502 |
faw-guest |
43078 |
das questões sobre localização e teclado até após ter tido a chance de fazer
|
| 503 |
|
|
a pré-configuração deles, enquanto <literal>priority</literal> é um apelido
|
| 504 |
fjp |
45355 |
para <literal>debconf/priority</literal> e definindo isso para
|
| 505 |
faw-guest |
43078 |
<literal>critical</literal> evita quaisquer questões com uma baixa
|
| 506 |
|
|
prioridade de serem perguntadas.
|
| 507 |
|
|
|
| 508 |
|
|
</para><para>
|
| 509 |
|
|
|
| 510 |
|
|
Opções adicionais que possam ser de interesse durante a tentativa de
|
| 511 |
|
|
automatizar a instalação usando o DHCP são: <literal>interface=auto
|
| 512 |
|
|
netcfg/dhcp_timeout=60</literal> a qual faz com que a máquina escolha
|
| 513 |
|
|
a primeira interface de rede viável e seja mais paciente sobre ter uma
|
| 514 |
|
|
resposta para sua pesquisa DHCP.
|
| 515 |
|
|
|
| 516 |
|
|
</para>
|
| 517 |
faw-guest |
45684 |
<tip><para>
|
| 518 |
|
|
|
| 519 |
|
|
Um exemplo extenso de como usar este <quote>framework</quote>, incluindo
|
| 520 |
|
|
exemplos de scripts e classes, pode ser encontrado no
|
| 521 |
|
|
<ulink url="http://hands.com/d-i/">site web do desenvolvedor</ulink>. Os
|
| 522 |
|
|
exemplos disponíveis lá também mostram muitos outros efeitos legais que
|
| 523 |
|
|
podem ser alcançados através do uso criativo da pré-configuração.
|
| 524 |
|
|
|
| 525 |
|
|
</para></tip>
|
| 526 |
faw-guest |
43078 |
</sect2>
|
| 527 |
|
|
|
| 528 |
|
|
<sect2 id="preseed-aliases">
|
| 529 |
|
|
<title>Apelidos úteis para pré-configuração</title>
|
| 530 |
|
|
<para>
|
| 531 |
|
|
|
| 532 |
|
|
Os apelidos a seguir podem ser úteis ao usar (modo auto) pré-configuração.
|
| 533 |
|
|
|
| 534 |
|
|
</para>
|
| 535 |
|
|
|
| 536 |
|
|
<!-- Setting column width does not seem to work; use non-breaking spaces
|
| 537 |
|
|
to separate columns a bit -->
|
| 538 |
|
|
<informaltable frame="none">
|
| 539 |
|
|
<tgroup cols="2"><tbody>
|
| 540 |
fjp |
44897 |
<row><entry>auto</entry><entry>auto-install/enable</entry></row>
|
| 541 |
faw-guest |
43078 |
<row><entry>classes</entry><entry>auto-install/classes</entry></row>
|
| 542 |
|
|
<row><entry>fb</entry><entry>debian-installer/framebuffer</entry></row>
|
| 543 |
|
|
<row><entry>locale</entry><entry>debian-installer/locale</entry></row>
|
| 544 |
|
|
<row><entry>priority</entry><entry>debconf/priority</entry></row>
|
| 545 |
|
|
<row><entry>file</entry><entry>preseed/file</entry></row>
|
| 546 |
|
|
<row><entry>url</entry><entry>preseed/url</entry></row>
|
| 547 |
faw-guest |
44299 |
<row><entry>interface</entry><entry>netcfg/choose_interface</entry></row>
|
| 548 |
faw-guest |
43078 |
<row><entry>hostname </entry><entry>netcfg/get_hostname</entry></row>
|
| 549 |
|
|
<row><entry>domain</entry><entry>netcfg/get_domain</entry></row>
|
| 550 |
faw-guest |
44299 |
<row><entry>protocol</entry><entry>mirror/protocol</entry></row>
|
| 551 |
faw-guest |
43078 |
<row><entry>suite</entry><entry>mirror/suite</entry></row>
|
| 552 |
|
|
</tbody></tgroup>
|
| 553 |
|
|
</informaltable>
|
| 554 |
|
|
|
| 555 |
faw |
51225 |
</sect2>
|
| 556 |
faw-guest |
43078 |
|
| 557 |
faw |
51225 |
<sect2 id="preseed-dhcp">
|
| 558 |
faw-guest |
38115 |
<title>Usando um servidor DHCP para especificar arquivos de pré-configuração</title>
|
| 559 |
|
|
<para>
|
| 560 |
|
|
|
| 561 |
|
|
Também é possível usar DHCP para especificar um arquivo de pré-configuração a
|
| 562 |
|
|
ser baixado pela rede. O DHCP permite especificar um nome de arquivo.
|
| 563 |
|
|
Normalmente este é um arquivo para o boot de rede (<quote>netboot</quote>), mas
|
| 564 |
|
|
se ele se parece com uma URL então a mídia de instalação que suporta
|
| 565 |
|
|
pré-configuração pela rede, vai baixar o arquivo da URL e o utilizará como um
|
| 566 |
|
|
arquivo de pré-configuração. Aqui está um exemplo de como configurar isso no
|
| 567 |
|
|
dhcpd.conf para a versão 3 do servidor ISC DHCP (o pacote Debian dhcp3-server).
|
| 568 |
|
|
|
| 569 |
|
|
</para>
|
| 570 |
|
|
|
| 571 |
|
|
<informalexample><screen>
|
| 572 |
|
|
if substring (option vendor-class-identifier, 0, 3) = "d-i" {
|
| 573 |
|
|
filename "http://host/preseed.cfg";
|
| 574 |
|
|
}
|
| 575 |
|
|
</screen></informalexample>
|
| 576 |
|
|
|
| 577 |
|
|
<para>
|
| 578 |
|
|
|
| 579 |
|
|
Note que o exemplo acima limita o nome do arquivo para clientes DHCP que se
|
| 580 |
|
|
identificam como "d-i", portanto isto não afetará outros clientes DHCP,
|
| 581 |
|
|
afetando apenas o instalador. Você também pode por o texto numa instância para
|
| 582 |
|
|
apenas uma máquina em particular para evitar pré-configuração de todos as
|
| 583 |
|
|
instalações na sua rede.
|
| 584 |
|
|
|
| 585 |
|
|
</para><para>
|
| 586 |
|
|
|
| 587 |
|
|
Uma boa forma de usar a pré-configuração DHCP é pré-configurar apenas valores
|
| 588 |
|
|
específicos para a sua rede, como o espelho Debian a ser usado. Desta forma,
|
| 589 |
|
|
instalações na sua rede vão automaticamente pegar um bom espelho selecionado,
|
| 590 |
|
|
mas o resto da instalação pode ser realizada interativamente. Usando a
|
| 591 |
|
|
pré-configuração DHCP para automatizar totalmente as instalações de Debian
|
| 592 |
|
|
deve ser feita somente com cuidado.
|
| 593 |
|
|
|
| 594 |
|
|
</para>
|
| 595 |
|
|
</sect2>
|
| 596 |
faw-guest |
33371 |
</sect1>
|
| 597 |
|
|
|
| 598 |
faw |
51225 |
|
| 599 |
faw-guest |
38115 |
<sect1 id="preseed-creating">
|
| 600 |
faw-guest |
33592 |
<title>Criando um arquivo de pré-configuração</title>
|
| 601 |
faw-guest |
33371 |
<para>
|
| 602 |
|
|
|
| 603 |
faw-guest |
33592 |
O arquivo de pré-configuração tem o formato usado pelo comando
|
| 604 |
faw-guest |
38115 |
<command>debconf-set-selections</command>. O formato geral de uma linha
|
| 605 |
|
|
no arquivo de pré-configuração é:
|
| 606 |
faw-guest |
33371 |
|
| 607 |
faw-guest |
38115 |
<informalexample><screen>
|
| 608 |
|
|
<dono> <nome da pergunta> <tipo da pergunta> <valor>
|
| 609 |
|
|
</screen></informalexample>
|
| 610 |
|
|
|
| 611 |
|
|
</para><para>
|
| 612 |
|
|
|
| 613 |
|
|
Há algumas regras para manter em mente quando estiver escrevendo o arquivo de
|
| 614 |
|
|
pré-configuração.
|
| 615 |
|
|
|
| 616 |
faw-guest |
33371 |
</para>
|
| 617 |
|
|
|
| 618 |
|
|
<itemizedlist>
|
| 619 |
|
|
<listitem><para>
|
| 620 |
faw-guest |
38115 |
Coloque apenas um único espaço ou tabulação entre o tipo e o valor: qualquer
|
| 621 |
|
|
espaço em branco adicional será interpretado como pertencendo ao valor.
|
| 622 |
faw-guest |
33371 |
</para></listitem>
|
| 623 |
|
|
<listitem><para>
|
| 624 |
faw-guest |
38115 |
Uma linha pode ser dividida em múltiplas linhas adicionando uma barra
|
| 625 |
|
|
invertida (<quote><literal>\</literal></quote>) como o caracter de
|
| 626 |
|
|
continuação de linha. Um bom local para dividir a linha é após o nome
|
| 627 |
faw |
56619 |
da pergunta; um lugar ruim é entre o tipo e o valor. Múltiplas linhas
|
| 628 |
|
|
serão transformadas em uma única linha com todos os espaços em branco
|
| 629 |
|
|
entre o final de uma linha e o começo da outra sendo condensando em um
|
| 630 |
|
|
único espaço em branco.
|
| 631 |
faw-guest |
33371 |
</para></listitem>
|
| 632 |
|
|
<listitem><para>
|
| 633 |
faw |
53071 |
Para variáveis debconf (modelos) usadas no próprio instalador, o dono
|
| 634 |
|
|
deverá ser configurado como <quote>d-i</quote>; para pré-configurar
|
| 635 |
|
|
variáveis usadas no sistema instalado, o nome do pacote que contém o
|
| 636 |
|
|
modelo debconf correspondente deverá ser usado. Somente variáveis que
|
| 637 |
|
|
tem o dono configurado para algo diferente de <quote>d-i</quote> serão
|
| 638 |
|
|
propagadas para o banco de dados debconf do sistemas instalado.
|
| 639 |
|
|
</para></listitem>
|
| 640 |
|
|
<listitem><para>
|
| 641 |
faw-guest |
38115 |
A maioria das questões precisa ser pré-configurada usando os valores válidos
|
| 642 |
|
|
em inglês e não os valores traduzidos. No entanto, há algumas questões (por
|
| 643 |
faw-guest |
40794 |
exemplo em <classname>partman</classname>) onde os valores traduzidos precisam
|
| 644 |
faw-guest |
38115 |
ser usados.
|
| 645 |
faw-guest |
33371 |
</para></listitem>
|
| 646 |
|
|
<listitem><para>
|
| 647 |
faw-guest |
38115 |
Algumas questões consideram um código como valor ao invés do texto em inglês
|
| 648 |
|
|
que é exibido durante a instalação.
|
| 649 |
faw-guest |
33371 |
</para></listitem>
|
| 650 |
|
|
</itemizedlist>
|
| 651 |
|
|
|
| 652 |
|
|
<para>
|
| 653 |
|
|
|
| 654 |
faw-guest |
38115 |
A forma mais fácil de criar um arquivo de pré-configuração é usar o arquivo
|
| 655 |
|
|
de exemplo disponível em <xref linkend="preseed-contents"/> como base e
|
| 656 |
|
|
trabalhar a partir daí.
|
| 657 |
|
|
|
| 658 |
|
|
</para><para>
|
| 659 |
|
|
|
| 660 |
|
|
Um método alternativo é fazer uma instalação manual e então, após reiniciar,
|
| 661 |
|
|
usar <command>debconf-get-selections</command>, do pacote
|
| 662 |
|
|
<classname>debconf-utils</classname>, para obter tanto o banco de dados do
|
| 663 |
|
|
debconf como o banco de dados cdebconf do instalador num único arquivo:
|
| 664 |
|
|
|
| 665 |
|
|
<informalexample><screen>
|
| 666 |
|
|
$ debconf-get-selections --installer > <replaceable>arquivo</replaceable>
|
| 667 |
|
|
$ debconf-get-selections >> <replaceable>arquivo</replaceable>
|
| 668 |
|
|
</screen></informalexample>
|
| 669 |
|
|
|
| 670 |
|
|
</para><para>
|
| 671 |
|
|
|
| 672 |
|
|
No entanto, um arquivo gerado desta maneira terá alguns itens que poderão
|
| 673 |
|
|
não ser pré-configurados, e o arquivo de exemplo é um ponto de partida
|
| 674 |
|
|
melhor para a maioria dos usuários.
|
| 675 |
|
|
|
| 676 |
|
|
</para>
|
| 677 |
|
|
|
| 678 |
|
|
<note><para>
|
| 679 |
|
|
|
| 680 |
|
|
Este método baseia-se no fato que, ao final da instalação, o banco de dados
|
| 681 |
faw-guest |
44299 |
cdebconf do instalador é salvo no sistema instalado em
|
| 682 |
faw-guest |
38115 |
<filename>/var/log/installer/cdebconf</filename>. No entanto, como o banco de
|
| 683 |
|
|
dados pode conter informações sensíveis, por padrão, os arquivos só poderão ser
|
| 684 |
|
|
lidos pelo root.
|
| 685 |
|
|
|
| 686 |
|
|
</para><para>
|
| 687 |
|
|
|
| 688 |
|
|
O diretório <filename>/var/log/installer</filename> e todos os arquivos dentro
|
| 689 |
|
|
dele serão apagados do seu sistema se você expurgar o pacote
|
| 690 |
|
|
<classname>installation-report</classname>.
|
| 691 |
|
|
|
| 692 |
|
|
</para></note>
|
| 693 |
|
|
|
| 694 |
|
|
<para>
|
| 695 |
|
|
|
| 696 |
|
|
Para verificar possíveis valores para questões, você pode usar o
|
| 697 |
|
|
<command>nano</command> para examinar os arquivos em
|
| 698 |
|
|
<filename>/var/lib/cdebconf</filename> durante o progresso da instalação.
|
| 699 |
|
|
Veja <filename>templates.dat</filename> para os modelos no estado crú e
|
| 700 |
|
|
<filename>questions.dat</filename> para os valores atuais e para os valores
|
| 701 |
|
|
atribuídos para as variáveis.
|
| 702 |
|
|
|
| 703 |
|
|
</para><para>
|
| 704 |
|
|
|
| 705 |
faw-guest |
33592 |
Para verificar se o formato do seu arquivo de pré-configuração é válido antes de
|
| 706 |
|
|
fazer uma instalação, você pode usar o comando
|
| 707 |
|
|
<command>debconf-set-selections -c <replaceable>preseed.cfg</replaceable>
|
| 708 |
|
|
</command>.
|
| 709 |
faw-guest |
33371 |
|
| 710 |
|
|
</para>
|
| 711 |
|
|
</sect1>
|
| 712 |
|
|
|
| 713 |
faw-guest |
43078 |
|
| 714 |
faw-guest |
38115 |
<sect1 id="preseed-contents">
|
| 715 |
faw |
53071 |
<title>Conteúdo do arquivo de pré-configuração (para &releasename;)</title>
|
| 716 |
|
|
|
| 717 |
faw-guest |
33371 |
<para>
|
| 718 |
|
|
|
| 719 |
faw-guest |
33592 |
Os fragmentos de configuração usados neste apêndice estão também disponíveis
|
| 720 |
|
|
como exemplo de arquivo de pré-configuração em &urlset-example-preseed;.
|
| 721 |
faw-guest |
33371 |
|
| 722 |
|
|
</para><para>
|
| 723 |
|
|
|
| 724 |
faw-guest |
33592 |
Note que este exemplo é baseado em uma instalação para arquitetura Intel x86,
|
| 725 |
|
|
alguns exemplos (como seleção de teclado e instalação de bootloader) talvez não
|
| 726 |
|
|
sejam relevantes e deverão ser trocados pelas opções do debconf apropriadas para
|
| 727 |
|
|
a sua arquitetura.
|
| 728 |
faw-guest |
33371 |
|
| 729 |
|
|
</para>
|
| 730 |
faw-guest |
33592 |
|
| 731 |
faw-guest |
33371 |
<sect2 id="preseed-l10n">
|
| 732 |
faw-guest |
33592 |
<title>Localização</title>
|
| 733 |
faw-guest |
33371 |
<para>
|
| 734 |
|
|
|
| 735 |
faw-guest |
33592 |
Valores de opções de localização somente funcionarão se usar pré-configuração
|
| 736 |
|
|
initrd. Com todos os outros métodos o arquivo de pré-configuração somente pode
|
| 737 |
|
|
ser carregado após essas perguntas serem apresentadas.
|
| 738 |
faw-guest |
33371 |
|
| 739 |
|
|
</para><para>
|
| 740 |
|
|
|
| 741 |
faw-guest |
33592 |
O <quote>locale</quote> pode ser usado para especificar tanto o idioma quanto o
|
| 742 |
faw |
56619 |
país e pode ser qualquer combinação de idioma que o &d-i; dê suporte e um país
|
| 743 |
|
|
reconhecido. Se a combinação não formar um locale válido, o instalador
|
| 744 |
|
|
selecionará automaticamente um locale que seja valido para o idioma
|
| 745 |
|
|
selecionado.
|
| 746 |
|
|
Para especificar o <quote>locale</quote> como parâmetro de inicialização,
|
| 747 |
faw-guest |
38635 |
use <userinput>locale=<replaceable>pt_BR</replaceable></userinput>.
|
| 748 |
faw-guest |
33371 |
|
| 749 |
|
|
<informalexample role="example"><screen>
|
| 750 |
|
|
# Locale sets language and country.
|
| 751 |
faw-guest |
33592 |
d-i debian-installer/locale string pt_BR
|
| 752 |
faw-guest |
33371 |
</screen></informalexample>
|
| 753 |
|
|
|
| 754 |
|
|
</para><para>
|
| 755 |
|
|
|
| 756 |
faw-guest |
33592 |
A configuração de teclado consiste na seleção da arquitetura do teclado e do
|
| 757 |
|
|
mapa de teclas. Na maioria dos casos a arquitetura de teclado correta é
|
| 758 |
|
|
selecionada por padrão, então normalmente não é necessário pré-configurar. O
|
| 759 |
faw |
56619 |
mapa de teclas deve ser conhecido pelo &d-i; para a arquitetura de teclado
|
| 760 |
|
|
selecionada.
|
| 761 |
faw-guest |
33371 |
|
| 762 |
|
|
<informalexample role="example"><screen>
|
| 763 |
|
|
# Keyboard selection.
|
| 764 |
|
|
#d-i console-tools/archs select at
|
| 765 |
|
|
d-i console-keymaps-at/keymap select us
|
| 766 |
|
|
# Example for a different keyboard architecture
|
| 767 |
|
|
#d-i console-keymaps-usb/keymap select mac-usb-us
|
| 768 |
|
|
</screen></informalexample>
|
| 769 |
|
|
|
| 770 |
|
|
</para><para>
|
| 771 |
|
|
|
| 772 |
faw-guest |
38115 |
Para pular a pré-configuração de teclado, pré-configure
|
| 773 |
faw-guest |
33592 |
<classname>console-tools/archs</classname> com
|
| 774 |
faw-guest |
33371 |
<userinput>skip-config</userinput>.
|
| 775 |
faw-guest |
33592 |
Isto resultará em manter ativo o mapa de teclas do kernel
|
| 776 |
faw-guest |
33371 |
|
| 777 |
|
|
</para>
|
| 778 |
|
|
|
| 779 |
|
|
<note><para>
|
| 780 |
|
|
|
| 781 |
faw-guest |
33592 |
As mudanças na camada de entrada para os kernels 2.6 tornaram a arquitetura
|
| 782 |
|
|
de teclado virtualmente obsoleta. Para os kernels 2.6 normalmente o mapa de
|
| 783 |
|
|
teclas <quote>PC</quote> (<userinput>at</userinput>) pode ser selecionado.
|
| 784 |
faw-guest |
33371 |
|
| 785 |
|
|
</para></note>
|
| 786 |
|
|
</sect2>
|
| 787 |
|
|
|
| 788 |
|
|
<sect2 id="preseed-network">
|
| 789 |
faw-guest |
33592 |
<title>Configuração de rede</title>
|
| 790 |
faw-guest |
33371 |
<para>
|
| 791 |
|
|
|
| 792 |
faw-guest |
33592 |
É claro, pré-configurar a rede não funciona se seu arquivo de pré-configuração
|
| 793 |
|
|
for carregado pela rede. Mas é bom quando você inicializa através de CD ou USB
|
| 794 |
|
|
stick. Se você estiver carregando os arquivos de pré-configuração pela rede,
|
| 795 |
|
|
você pode passar os parâmetros da configuração de rede usando os parâmetros de
|
| 796 |
|
|
inicialização do kernel.
|
| 797 |
faw |
51225 |
|
| 798 |
faw-guest |
38115 |
</para><para>
|
| 799 |
faw-guest |
33371 |
|
| 800 |
faw-guest |
38115 |
Se você precisa escolher uma interface em particular quando estiver
|
| 801 |
|
|
inicializando pela rede antes de carregar um arquivo de pré-configuração
|
| 802 |
|
|
pela rede, use um parâmetro de inicialização como
|
| 803 |
faw-guest |
38635 |
<userinput>interface=<replaceable>eth1</replaceable></userinput>.
|
| 804 |
faw-guest |
38115 |
|
| 805 |
faw-guest |
38861 |
</para><para>
|
| 806 |
|
|
|
| 807 |
|
|
Embora pré-configurar a rede normalmente não seja possível quando
|
| 808 |
|
|
se está usando a pré-configuração pelo método network (usando
|
| 809 |
|
|
<quote>preseed/url</quote>), você pode usar o seguinte <quote>hack</quote>
|
| 810 |
|
|
para contornar esta situação, por exemplo, se você gostaria de definir um
|
| 811 |
|
|
endereço estático para a interface de rede. O <quote>hack</quote> é forçar a
|
| 812 |
|
|
configuração de rede a ser realizada novamente após o arquivo de
|
| 813 |
|
|
pré-configuração já ter sido carregado, isto é feito através da criação do
|
| 814 |
faw |
53071 |
script <quote>preseed/run</quote> contendo os seguintes comandos:
|
| 815 |
faw-guest |
38861 |
|
| 816 |
|
|
<informalexample><screen>
|
| 817 |
fjp |
52823 |
killall.sh; netcfg
|
| 818 |
faw-guest |
38861 |
</screen></informalexample>
|
| 819 |
|
|
|
| 820 |
faw |
53071 |
</para><para>
|
| 821 |
|
|
|
| 822 |
|
|
As seguintes variáveis debconf são relevantes para configuração de rede.
|
| 823 |
|
|
|
| 824 |
faw-guest |
33371 |
</para>
|
| 825 |
|
|
|
| 826 |
|
|
<informalexample role="example"><screen>
|
| 827 |
|
|
# netcfg will choose an interface that has link if possible. This makes it
|
| 828 |
|
|
# skip displaying a list if there is more than one interface.
|
| 829 |
|
|
d-i netcfg/choose_interface select auto
|
| 830 |
|
|
|
| 831 |
faw-guest |
38115 |
# To pick a particular interface instead:
|
| 832 |
|
|
#d-i netcfg/choose_interface select eth1
|
| 833 |
|
|
|
| 834 |
faw-guest |
33371 |
# If you have a slow dhcp server and the installer times out waiting for
|
| 835 |
|
|
# it, this might be useful.
|
| 836 |
|
|
#d-i netcfg/dhcp_timeout string 60
|
| 837 |
|
|
|
| 838 |
faw-guest |
38115 |
# If you prefer to configure the network manually, uncomment this line and
|
| 839 |
|
|
# the static network configuration below.
|
| 840 |
faw-guest |
33371 |
#d-i netcfg/disable_dhcp boolean true
|
| 841 |
faw-guest |
38115 |
|
| 842 |
|
|
# If you want the preconfiguration file to work on systems both with and
|
| 843 |
|
|
# without a dhcp server, uncomment these lines and the static network
|
| 844 |
|
|
# configuration below.
|
| 845 |
|
|
#d-i netcfg/dhcp_failed note
|
| 846 |
|
|
#d-i netcfg/dhcp_options select Configure network manually
|
| 847 |
|
|
|
| 848 |
|
|
# Static network configuration.
|
| 849 |
faw-guest |
33371 |
#d-i netcfg/get_nameservers string 192.168.1.1
|
| 850 |
|
|
#d-i netcfg/get_ipaddress string 192.168.1.42
|
| 851 |
|
|
#d-i netcfg/get_netmask string 255.255.255.0
|
| 852 |
|
|
#d-i netcfg/get_gateway string 192.168.1.1
|
| 853 |
|
|
#d-i netcfg/confirm_static boolean true
|
| 854 |
|
|
|
| 855 |
|
|
# Any hostname and domain names assigned from dhcp take precedence over
|
| 856 |
|
|
# values set here. However, setting the values still prevents the questions
|
| 857 |
|
|
# from being shown, even if values come from dhcp.
|
| 858 |
|
|
d-i netcfg/get_hostname string unassigned-hostname
|
| 859 |
|
|
d-i netcfg/get_domain string unassigned-domain
|
| 860 |
|
|
|
| 861 |
|
|
# Disable that annoying WEP key dialog.
|
| 862 |
|
|
d-i netcfg/wireless_wep string
|
| 863 |
|
|
# The wacky dhcp hostname that some ISPs use as a password of sorts.
|
| 864 |
|
|
#d-i netcfg/dhcp_hostname string radish
|
| 865 |
faw |
55302 |
|
| 866 |
|
|
# If non-free firmware is needed for the network or other hardware, you can
|
| 867 |
|
|
# configure the installer to always try to load it, without prompting. Or
|
| 868 |
|
|
# change to false to disable asking.
|
| 869 |
|
|
#d-i hw-detect/load_firmware boolean true
|
| 870 |
faw-guest |
33371 |
</screen></informalexample>
|
| 871 |
|
|
|
| 872 |
faw |
56619 |
<para>
|
| 873 |
|
|
|
| 874 |
|
|
Por favor, note que o <command>netcfg</command> determinará automaticamente
|
| 875 |
|
|
a máscara de rede se <classname>netcfg/get_netmask</classname> não for
|
| 876 |
|
|
pré-configurado. Neste caso, a variável tem que ser marcada como
|
| 877 |
|
|
<literal>seen</literal> para instalações automáticas. Similarmente, o
|
| 878 |
|
|
<command>netcfg</command> escolherá um endereço apropriado se
|
| 879 |
|
|
<classname>netcfg/get_gateway</classname> não for definido. Como um caso
|
| 880 |
|
|
especial, você pode definir <classname>netcfg/get_gateway</classname> como
|
| 881 |
|
|
<quote>none</quote> para especificar que nenhum gateway deveria ser usado.
|
| 882 |
|
|
|
| 883 |
|
|
</para>
|
| 884 |
|
|
|
| 885 |
faw-guest |
33371 |
</sect2>
|
| 886 |
|
|
|
| 887 |
|
|
<sect2 id="preseed-mirror">
|
| 888 |
faw-guest |
38115 |
<title>Definição do espelho</title>
|
| 889 |
faw-guest |
33371 |
<para>
|
| 890 |
|
|
|
| 891 |
faw-guest |
33592 |
Dependendo do método de instalação que você usar, um espelho pode ser usado
|
| 892 |
faw-guest |
44299 |
para baixar componentes adicionais para o instalador, instalar o sistema base
|
| 893 |
|
|
e para configurar o <filename>/etc/apt/sources.list</filename> para o sistema
|
| 894 |
faw-guest |
33592 |
instalado.
|
| 895 |
faw-guest |
33371 |
|
| 896 |
|
|
</para><para>
|
| 897 |
|
|
|
| 898 |
faw-guest |
33592 |
O parâmetro <classname>mirror/suite</classname> determina o conjunto para
|
| 899 |
|
|
o sistema instalado.
|
| 900 |
faw-guest |
33371 |
|
| 901 |
|
|
</para><para>
|
| 902 |
|
|
|
| 903 |
faw-guest |
33592 |
O parâmetro <classname>mirror/udeb/suite</classname> determina o conjunto para
|
| 904 |
|
|
componentes adicionais do instalador. Isto só é útil configurar se os
|
| 905 |
|
|
componentes são baixados pela rede e equivalem ao conjunto que é usado para
|
| 906 |
|
|
construir o initrd para o método de instalação usado para a instalação.
|
| 907 |
|
|
Por padrão o valor para <classname>mirror/udeb/suite</classname> é o mesmo que
|
| 908 |
|
|
<classname>mirror/suite</classname>.
|
| 909 |
faw-guest |
33371 |
|
| 910 |
|
|
</para>
|
| 911 |
|
|
|
| 912 |
|
|
<informalexample role="example"><screen>
|
| 913 |
faw-guest |
45684 |
# If you select ftp, the mirror/country string does not need to be set.
|
| 914 |
faw |
51225 |
#d-i mirror/protocol string ftp
|
| 915 |
|
|
d-i mirror/country string manual
|
| 916 |
faw-guest |
45684 |
d-i mirror/http/hostname string &archive-mirror;
|
| 917 |
faw-guest |
33371 |
d-i mirror/http/directory string /debian
|
| 918 |
|
|
d-i mirror/http/proxy string
|
| 919 |
|
|
|
| 920 |
|
|
# Suite to install.
|
| 921 |
|
|
#d-i mirror/suite string testing
|
| 922 |
|
|
# Suite to use for loading installer components (optional).
|
| 923 |
|
|
#d-i mirror/udeb/suite string testing
|
| 924 |
|
|
</screen></informalexample>
|
| 925 |
|
|
|
| 926 |
|
|
</sect2>
|
| 927 |
|
|
|
| 928 |
faw |
51225 |
<sect2 id="preseed-time">
|
| 929 |
|
|
<title>Configuração de relógio e fuso horário</title>
|
| 930 |
|
|
|
| 931 |
|
|
<informalexample role="example"><screen>
|
| 932 |
|
|
# Controls whether or not the hardware clock is set to UTC.
|
| 933 |
|
|
d-i clock-setup/utc boolean true
|
| 934 |
|
|
|
| 935 |
|
|
# You may set this to any valid setting for $TZ; see the contents of
|
| 936 |
|
|
# /usr/share/zoneinfo/ for valid values.
|
| 937 |
|
|
d-i time/zone string US/Eastern
|
| 938 |
|
|
|
| 939 |
|
|
# Controls whether to use NTP to set the clock during the install
|
| 940 |
|
|
d-i clock-setup/ntp boolean true
|
| 941 |
|
|
# NTP server to use. The default is almost always fine here.
|
| 942 |
|
|
#d-i clock-setup/ntp-server ntp.example.com
|
| 943 |
|
|
</screen></informalexample>
|
| 944 |
|
|
|
| 945 |
|
|
</sect2>
|
| 946 |
|
|
|
| 947 |
faw-guest |
33371 |
<sect2 id="preseed-partman">
|
| 948 |
faw-guest |
33592 |
<title>Particionando</title>
|
| 949 |
faw-guest |
33371 |
<para>
|
| 950 |
|
|
|
| 951 |
faw-guest |
33592 |
Usar pré-configuração para particionar o disco rígido é muito limitado pelo que
|
| 952 |
|
|
é suportado pelo<classname>partman-auto</classname>. Você pode escolher tanto
|
| 953 |
|
|
particionar um espaço existente no disco ou o disco inteiro. O layout do disco
|
| 954 |
|
|
pode ser determinado por uma receita pré-definida, uma receita modificada de um
|
| 955 |
|
|
arquivo de receita ou uma receita incluída no arquivo de pré-configuração.
|
| 956 |
faw-guest |
43078 |
Atualmente não é possível particionar múltiplos discos usando pré-configuração.
|
| 957 |
faw-guest |
33371 |
|
| 958 |
|
|
</para>
|
| 959 |
|
|
|
| 960 |
|
|
<warning><para>
|
| 961 |
|
|
|
| 962 |
faw-guest |
33592 |
A identificação dos discos é dependente da ordem em que os drivers são
|
| 963 |
|
|
carregados. Se houverem múltiplos discos no sistema, tenha certeza de que
|
| 964 |
|
|
o correto será selecionado antes de usar a pré-configuração.
|
| 965 |
faw-guest |
33371 |
|
| 966 |
|
|
</para></warning>
|
| 967 |
|
|
|
| 968 |
|
|
<informalexample role="example"><screen>
|
| 969 |
|
|
# If the system has free space you can choose to only partition that space.
|
| 970 |
faw |
56619 |
#d-i partman-auto/init_automatically_partition select biggest_free
|
| 971 |
faw-guest |
33371 |
|
| 972 |
faw |
48784 |
# Alternatively, you can specify a disk to partition. The device name must
|
| 973 |
|
|
# be given in traditional non-devfs format.
|
| 974 |
faw |
54424 |
# Note: A disk must be specified, unless the system has only one disk.
|
| 975 |
faw |
56619 |
# For example, to use the first SCSI/SATA hard disk:
|
| 976 |
faw |
54424 |
#d-i partman-auto/disk string /dev/sda
|
| 977 |
faw-guest |
40794 |
# In addition, you'll need to specify the method to use.
|
| 978 |
|
|
# The presently available methods are: "regular", "lvm" and "crypto"
|
| 979 |
|
|
d-i partman-auto/method string lvm
|
| 980 |
faw-guest |
33371 |
|
| 981 |
faw-guest |
40794 |
# If one of the disks that are going to be automatically partitioned
|
| 982 |
|
|
# contains an old LVM configuration, the user will normally receive a
|
| 983 |
|
|
# warning. This can be preseeded away...
|
| 984 |
fjp |
52904 |
d-i partman-lvm/device_remove_lvm boolean true
|
| 985 |
faw |
56619 |
# The same applies to pre-existing software RAID array:
|
| 986 |
|
|
d-i parman-md/device_remove_md boolean true
|
| 987 |
faw-guest |
41901 |
# And the same goes for the confirmation to write the lvm partitions.
|
| 988 |
|
|
d-i partman-lvm/confirm boolean true
|
| 989 |
faw-guest |
40794 |
|
| 990 |
faw |
56619 |
# You can choose one of the three predefined partitioning recipes:
|
| 991 |
|
|
# - atomic: all files in one partition
|
| 992 |
|
|
# - home: separate /home partition
|
| 993 |
|
|
# - multi: separate /home, /usr, /var, and /tmp partitions
|
| 994 |
|
|
d-i partman-auto/choose_recipe select atomic
|
| 995 |
faw-guest |
33371 |
|
| 996 |
|
|
# Or provide a recipe of your own...
|
| 997 |
|
|
# The recipe format is documented in the file devel/partman-auto-recipe.txt.
|
| 998 |
|
|
# If you have a way to get a recipe file into the d-i environment, you can
|
| 999 |
|
|
# just point at it.
|
| 1000 |
|
|
#d-i partman-auto/expert_recipe_file string /hd-media/recipe
|
| 1001 |
|
|
|
| 1002 |
faw-guest |
42209 |
# If not, you can put an entire recipe into the preconfiguration file in one
|
| 1003 |
faw-guest |
38115 |
# (logical) line. This example creates a small /boot partition, suitable
|
| 1004 |
|
|
# swap, and uses the rest of the space for the root partition:
|
| 1005 |
faw-guest |
33371 |
#d-i partman-auto/expert_recipe string \
|
| 1006 |
|
|
# boot-root :: \
|
| 1007 |
|
|
# 40 50 100 ext3 \
|
| 1008 |
|
|
# $primary{ } $bootable{ } \
|
| 1009 |
|
|
# method{ format } format{ } \
|
| 1010 |
|
|
# use_filesystem{ } filesystem{ ext3 } \
|
| 1011 |
|
|
# mountpoint{ /boot } \
|
| 1012 |
|
|
# . \
|
| 1013 |
|
|
# 500 10000 1000000000 ext3 \
|
| 1014 |
|
|
# method{ format } format{ } \
|
| 1015 |
|
|
# use_filesystem{ } filesystem{ ext3 } \
|
| 1016 |
|
|
# mountpoint{ / } \
|
| 1017 |
|
|
# . \
|
| 1018 |
|
|
# 64 512 300% linux-swap \
|
| 1019 |
|
|
# method{ swap } format{ } \
|
| 1020 |
|
|
# .
|
| 1021 |
|
|
|
| 1022 |
faw |
51225 |
# This makes partman automatically partition without confirmation, provided
|
| 1023 |
|
|
# that you told it what to do using one of the methods above.
|
| 1024 |
faw-guest |
33371 |
d-i partman/confirm_write_new_label boolean true
|
| 1025 |
faw |
56619 |
d-i partman/choose_partition select finish
|
| 1026 |
faw-guest |
33371 |
d-i partman/confirm boolean true
|
| 1027 |
|
|
</screen></informalexample>
|
| 1028 |
|
|
|
| 1029 |
|
|
</sect2>
|
| 1030 |
|
|
|
| 1031 |
faw-guest |
41901 |
<sect2 id="preseed-partman-raid">
|
| 1032 |
|
|
<title>Particionando usando RAID</title>
|
| 1033 |
|
|
<para>
|
| 1034 |
|
|
|
| 1035 |
|
|
Você também pode usar pré-configuração para configurar <quote>arrays</quote>
|
| 1036 |
faw |
56619 |
RAID via software. Há suporte para os níveis de RAID 0, 1, 5, 6 e 10,
|
| 1037 |
|
|
criação de <quote>arrays</quote> degradados e especificação de dispositivos
|
| 1038 |
faw-guest |
41901 |
<quote>spare</quote>.
|
| 1039 |
faw-guest |
42062 |
Se você estiver usando RAID 1, você pode pré-configurar o grub para ser
|
| 1040 |
faw-guest |
41901 |
instalado em todos os dispositivos usando no <quote>array</quote>; veja
|
| 1041 |
|
|
<xref linkend="preseed-bootloader"/>.
|
| 1042 |
|
|
|
| 1043 |
|
|
</para>
|
| 1044 |
|
|
|
| 1045 |
|
|
<warning><para>
|
| 1046 |
|
|
|
| 1047 |
faw |
56619 |
Este tipo de particionamento automático é fácil de errar. E é uma
|
| 1048 |
|
|
funcionalidade que, relativamente, é pouco testada pelos desenvolvedores do
|
| 1049 |
|
|
&d-i;. A responsabilidade de entender as várias receitas de forma correta
|
| 1050 |
|
|
(de forma que elas tenham sentido e não conflitem) recai sobre o usuário.
|
| 1051 |
faw-guest |
41901 |
Verifique <filename>/var/log/syslog</filename> se você tiver problemas.
|
| 1052 |
|
|
|
| 1053 |
|
|
</para></warning>
|
| 1054 |
|
|
|
| 1055 |
|
|
<informalexample><screen>
|
| 1056 |
|
|
# NOTE: this option is of beta release quality and should be used carefully
|
| 1057 |
|
|
|
| 1058 |
|
|
# The method should be set to "raid".
|
| 1059 |
|
|
#d-i partman-auto/method string raid
|
| 1060 |
|
|
# Specify the disks to be partitioned. They will all get the same layout,
|
| 1061 |
|
|
# so this will only work if the disks are the same size.
|
| 1062 |
|
|
#d-i partman-auto/disk string /dev/discs/disc0/disc /dev/discs/disc1/disc
|
| 1063 |
|
|
|
| 1064 |
|
|
# Next you need to specify the physical partitions that will be used.
|
| 1065 |
|
|
#d-i partman-auto/expert_recipe string \
|
| 1066 |
|
|
# multiraid :: \
|
| 1067 |
|
|
# 1000 5000 4000 raid \
|
| 1068 |
|
|
# $primary{ } method{ raid } \
|
| 1069 |
|
|
# . \
|
| 1070 |
|
|
# 64 512 300% raid \
|
| 1071 |
|
|
# method{ raid } \
|
| 1072 |
|
|
# . \
|
| 1073 |
|
|
# 500 10000 1000000000 raid \
|
| 1074 |
|
|
# method{ raid } \
|
| 1075 |
|
|
# .
|
| 1076 |
|
|
|
| 1077 |
|
|
# Last you need to specify how the previously defined partitions will be
|
| 1078 |
|
|
# used in the RAID setup. Remember to use the correct partition numbers
|
| 1079 |
|
|
# for logical partitions.
|
| 1080 |
|
|
# Parameters are:
|
| 1081 |
|
|
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
|
| 1082 |
|
|
# <devices> <sparedevices>
|
| 1083 |
faw |
56619 |
# RAID levels 0, 1, 5, 6 and 10 are supported; devices are separated using "#"
|
| 1084 |
faw-guest |
41901 |
#d-i partman-auto-raid/recipe string \
|
| 1085 |
|
|
# 1 2 0 ext3 / \
|
| 1086 |
|
|
# /dev/discs/disc0/part1#/dev/discs/disc1/part1 \
|
| 1087 |
|
|
# . \
|
| 1088 |
|
|
# 1 2 0 swap - \
|
| 1089 |
|
|
# /dev/discs/disc0/part5#/dev/discs/disc1/part5 \
|
| 1090 |
|
|
# . \
|
| 1091 |
|
|
# 0 2 0 ext3 /home \
|
| 1092 |
|
|
# /dev/discs/disc0/part6#/dev/discs/disc1/part6 \
|
| 1093 |
|
|
# .
|
| 1094 |
|
|
|
| 1095 |
|
|
# This makes partman automatically partition without confirmation.
|
| 1096 |
|
|
d-i partman-md/confirm boolean true
|
| 1097 |
|
|
d-i partman/confirm_write_new_label boolean true
|
| 1098 |
faw |
56619 |
d-i partman/choose_partition select finish
|
| 1099 |
faw-guest |
41901 |
d-i partman/confirm boolean true
|
| 1100 |
|
|
</screen></informalexample>
|
| 1101 |
|
|
|
| 1102 |
|
|
</sect2>
|
| 1103 |
|
|
|
| 1104 |
faw |
51225 |
<sect2 id="preseed-base-installer">
|
| 1105 |
|
|
<title>Instalação do sistema básico</title>
|
| 1106 |
|
|
<para>
|
| 1107 |
faw-guest |
33371 |
|
| 1108 |
faw |
51225 |
Atualmente, não há muito que possa ser pré-configurado neste estágio da
|
| 1109 |
|
|
instalação. As únicas questões feitas referem-se à instalação do kernel.
|
| 1110 |
faw-guest |
33371 |
|
| 1111 |
faw |
51225 |
</para>
|
| 1112 |
faw |
48784 |
|
| 1113 |
faw |
51225 |
<informalexample role="example"><screen>
|
| 1114 |
|
|
# Select the initramfs generator used to generate the initrd for 2.6 kernels.
|
| 1115 |
|
|
#d-i base-installer/kernel/linux/initramfs-generators string yaird
|
| 1116 |
|
|
|
| 1117 |
|
|
# The kernel image (meta) package to be installed; "none" can be used if no
|
| 1118 |
|
|
# kernel is to be installed.
|
| 1119 |
fjp |
52425 |
#d-i base-installer/kernel/image string linux-image-2.6-486
|
| 1120 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1121 |
|
|
|
| 1122 |
|
|
</sect2>
|
| 1123 |
|
|
|
| 1124 |
|
|
<sect2 id="preseed-account">
|
| 1125 |
faw-guest |
33592 |
<title>Configurar contas</title>
|
| 1126 |
faw-guest |
33371 |
<para>
|
| 1127 |
|
|
|
| 1128 |
faw-guest |
33592 |
A senha para a conta root e o nome e senha para a primeira conta de usuário
|
| 1129 |
|
|
regular podem ser pré-configuradas. Para senhas você pode usar tanto texto
|
| 1130 |
|
|
plano quanto <emphasis>hashes</emphasis> MD5.
|
| 1131 |
faw-guest |
33371 |
|
| 1132 |
|
|
</para>
|
| 1133 |
|
|
<warning><para>
|
| 1134 |
|
|
|
| 1135 |
faw-guest |
33592 |
Fique avisado que pré-configurar senhas não é completamente seguro já que
|
| 1136 |
|
|
qualquer um com acesso ao arquivo de pré-configuração terá conhecimento destas
|
| 1137 |
|
|
senhas. Usar hashes MD5 é considerado um pouco melhor em termos de segurança,
|
| 1138 |
|
|
mas isso pode dar uma falsa sensação de segurança já que o acesso ao hash MD5
|
| 1139 |
|
|
permite ataques de força bruta.
|
| 1140 |
faw-guest |
33371 |
|
| 1141 |
|
|
</para></warning>
|
| 1142 |
|
|
|
| 1143 |
|
|
<informalexample role="example"><screen>
|
| 1144 |
faw-guest |
38115 |
# Skip creation of a root account (normal user account will be able to
|
| 1145 |
|
|
# use sudo).
|
| 1146 |
|
|
#d-i passwd/root-login boolean false
|
| 1147 |
|
|
# Alternatively, to skip creation of a normal user account.
|
| 1148 |
|
|
#d-i passwd/make-user boolean false
|
| 1149 |
|
|
|
| 1150 |
faw-guest |
33371 |
# Root password, either in clear text
|
| 1151 |
faw-guest |
38115 |
#d-i passwd/root-password password r00tme
|
| 1152 |
|
|
#d-i passwd/root-password-again password r00tme
|
| 1153 |
faw-guest |
33371 |
# or encrypted using an MD5 hash.
|
| 1154 |
faw-guest |
38115 |
#d-i passwd/root-password-crypted password [MD5 hash]
|
| 1155 |
faw-guest |
33371 |
|
| 1156 |
faw-guest |
38115 |
# To create a normal user account.
|
| 1157 |
|
|
#d-i passwd/user-fullname string Debian User
|
| 1158 |
|
|
#d-i passwd/username string debian
|
| 1159 |
faw-guest |
33371 |
# Normal user's password, either in clear text
|
| 1160 |
faw-guest |
38115 |
#d-i passwd/user-password password insecure
|
| 1161 |
|
|
#d-i passwd/user-password-again password insecure
|
| 1162 |
faw-guest |
33371 |
# or encrypted using an MD5 hash.
|
| 1163 |
faw-guest |
38115 |
#d-i passwd/user-password-crypted password [MD5 hash]
|
| 1164 |
faw |
48784 |
# Create the first user with the specified UID instead of the default.
|
| 1165 |
faw |
51225 |
#d-i passwd/user-uid string 1010
|
| 1166 |
faw |
48784 |
|
| 1167 |
|
|
# The user account will be added to some standard initial groups. To
|
| 1168 |
|
|
# override that, use this.
|
| 1169 |
faw |
51225 |
#d-i passwd/user-default-groups string audio cdrom video
|
| 1170 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1171 |
|
|
|
| 1172 |
|
|
<para>
|
| 1173 |
|
|
|
| 1174 |
faw-guest |
33592 |
As variáves <classname>passwd/root-password-crypted</classname> e
|
| 1175 |
|
|
<classname>passwd/user-password-crypted</classname> também podem ser usadas com
|
| 1176 |
|
|
<quote>!</quote> como valor. Neste caso, a conta correspondente é desabilitada.
|
| 1177 |
|
|
Isto é conveniente para a conta root, prevendo é claro um método alternativo
|
| 1178 |
|
|
para permitir atividades administrativas ou login do root (por enquanto usando
|
| 1179 |
faw-guest |
38115 |
chave SSH ou <command>sudo</command>).
|
| 1180 |
faw-guest |
33371 |
|
| 1181 |
|
|
</para><para>
|
| 1182 |
|
|
|
| 1183 |
faw |
53071 |
O seguinte comando pode ser usado para gerar um hash MD5 para uma senha:
|
| 1184 |
faw-guest |
33371 |
|
| 1185 |
|
|
<informalexample><screen>
|
| 1186 |
fjp |
52906 |
$ echo "r00tme" | mkpasswd -s -m md5
|
| 1187 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1188 |
|
|
|
| 1189 |
|
|
</para>
|
| 1190 |
|
|
</sect2>
|
| 1191 |
|
|
|
| 1192 |
faw |
47021 |
<sect2 id="preseed-apt">
|
| 1193 |
faw |
51225 |
<title>Configuração do apt</title>
|
| 1194 |
faw |
47021 |
<para>
|
| 1195 |
faw-guest |
33371 |
|
| 1196 |
faw |
47021 |
Configurar o <filename>/etc/apt/sources.list</filename> e as opções básicas de
|
| 1197 |
|
|
configuração é totalmente automatizada baseado no seu método de instalação e
|
| 1198 |
|
|
nas respostas das últimas questões. Você pode, opcionalmente, adicionar outros
|
| 1199 |
|
|
repositórios (locais).
|
| 1200 |
|
|
|
| 1201 |
|
|
</para>
|
| 1202 |
|
|
|
| 1203 |
faw-guest |
33371 |
<informalexample role="example"><screen>
|
| 1204 |
faw |
47021 |
# You can choose to install non-free and contrib software.
|
| 1205 |
|
|
#d-i apt-setup/non-free boolean true
|
| 1206 |
|
|
#d-i apt-setup/contrib boolean true
|
| 1207 |
|
|
# Uncomment this if you don't want to use a network mirror.
|
| 1208 |
faw |
51225 |
#d-i apt-setup/use_mirror boolean false
|
| 1209 |
faw |
49174 |
# Select which update services to use; define the mirrors to be used.
|
| 1210 |
|
|
# Values shown below are the normal defaults.
|
| 1211 |
faw |
52659 |
#d-i apt-setup/services-select multiselect security, volatile
|
| 1212 |
faw |
49174 |
#d-i apt-setup/security_host string security.debian.org
|
| 1213 |
faw |
51225 |
#d-i apt-setup/volatile_host string volatile.debian.org
|
| 1214 |
faw-guest |
33371 |
|
| 1215 |
faw |
47021 |
# Additional repositories, local[0-9] available
|
| 1216 |
|
|
#d-i apt-setup/local0/repository string \
|
| 1217 |
|
|
# http://local.server/debian stable main
|
| 1218 |
|
|
#d-i apt-setup/local0/comment string local server
|
| 1219 |
|
|
# Enable deb-src lines
|
| 1220 |
|
|
#d-i apt-setup/local0/source boolean true
|
| 1221 |
|
|
# URL to the public key of the local repository; you must provide a key or
|
| 1222 |
|
|
# apt will complain about the unauthenticated repository and so the
|
| 1223 |
|
|
# sources.list line will be left commented out
|
| 1224 |
|
|
#d-i apt-setup/local0/key string http://local.server/key
|
| 1225 |
faw-guest |
33371 |
|
| 1226 |
faw |
47021 |
# By default the installer requires that repositories be authenticated
|
| 1227 |
|
|
# using a known gpg key. This setting can be used to disable that
|
| 1228 |
|
|
# authentication. Warning: Insecure, not recommended.
|
| 1229 |
|
|
#d-i debian-installer/allow_unauthenticated string true
|
| 1230 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1231 |
|
|
|
| 1232 |
|
|
</sect2>
|
| 1233 |
|
|
|
| 1234 |
faw-guest |
38115 |
<sect2 id="preseed-pkgsel">
|
| 1235 |
faw-guest |
33592 |
<title>Seleção de pacotes</title>
|
| 1236 |
faw-guest |
33371 |
<para>
|
| 1237 |
|
|
|
| 1238 |
faw-guest |
33592 |
Você pode escolher qualquer combinação de tarefas disponíveis.
|
| 1239 |
faw-guest |
44299 |
Tarefas disponíveis enquanto isto é escrito incluem:
|
| 1240 |
faw-guest |
33371 |
|
| 1241 |
|
|
</para>
|
| 1242 |
|
|
|
| 1243 |
|
|
<itemizedlist>
|
| 1244 |
|
|
<listitem><para>
|
| 1245 |
faw-guest |
38115 |
<userinput>standard</userinput>
|
| 1246 |
faw-guest |
33371 |
</para></listitem>
|
| 1247 |
|
|
<listitem><para>
|
| 1248 |
faw-guest |
38115 |
<userinput>desktop</userinput>
|
| 1249 |
faw-guest |
33371 |
</para></listitem>
|
| 1250 |
|
|
<listitem><para>
|
| 1251 |
faw-guest |
38115 |
<userinput>gnome-desktop</userinput>
|
| 1252 |
faw-guest |
33371 |
</para></listitem>
|
| 1253 |
|
|
<listitem><para>
|
| 1254 |
faw-guest |
38115 |
<userinput>kde-desktop</userinput>
|
| 1255 |
faw-guest |
33371 |
</para></listitem>
|
| 1256 |
|
|
<listitem><para>
|
| 1257 |
faw-guest |
38115 |
<userinput>web-server</userinput>
|
| 1258 |
faw-guest |
33371 |
</para></listitem>
|
| 1259 |
|
|
<listitem><para>
|
| 1260 |
faw-guest |
38115 |
<userinput>print-server</userinput>
|
| 1261 |
faw-guest |
33371 |
</para></listitem>
|
| 1262 |
|
|
<listitem><para>
|
| 1263 |
faw-guest |
38115 |
<userinput>dns-server</userinput>
|
| 1264 |
faw-guest |
33371 |
</para></listitem>
|
| 1265 |
|
|
<listitem><para>
|
| 1266 |
faw-guest |
38115 |
<userinput>file-server</userinput>
|
| 1267 |
faw-guest |
33371 |
</para></listitem>
|
| 1268 |
|
|
<listitem><para>
|
| 1269 |
faw-guest |
38115 |
<userinput>mail-server</userinput>
|
| 1270 |
faw-guest |
33371 |
</para></listitem>
|
| 1271 |
|
|
<listitem><para>
|
| 1272 |
faw-guest |
38115 |
<userinput>sql-database</userinput>
|
| 1273 |
faw-guest |
33371 |
</para></listitem>
|
| 1274 |
faw-guest |
38115 |
<listitem><para>
|
| 1275 |
|
|
<userinput>laptop</userinput>
|
| 1276 |
|
|
</para></listitem>
|
| 1277 |
faw-guest |
33371 |
</itemizedlist>
|
| 1278 |
|
|
|
| 1279 |
|
|
<para>
|
| 1280 |
|
|
|
| 1281 |
faw-guest |
38115 |
Você pode também escolher não instalar nenhuma tarefa, e forçar a instalação
|
| 1282 |
|
|
de um conjunto de pacotes de algum outro modo. Nós recomendamos sempre incluir
|
| 1283 |
|
|
a tarefa <userinput>standard</userinput>.
|
| 1284 |
|
|
|
| 1285 |
faw-guest |
40169 |
</para><para>
|
| 1286 |
|
|
|
| 1287 |
|
|
Se você quiser instalar alguns pacotes individuais em adição aos pacotes
|
| 1288 |
|
|
instalados pelas tarefas (<quote>tasks</quote>), você pode usar o parâmetro
|
| 1289 |
|
|
<classname>pkgsel/include</classname>. O valor deste parâmetro pode ser
|
| 1290 |
faw-guest |
44299 |
uma lista de pacotes separada por vírgulas ou espaços, permitindo que também
|
| 1291 |
|
|
seja facilmente usado na linha de comando do kernel.
|
| 1292 |
faw-guest |
40169 |
|
| 1293 |
faw-guest |
33371 |
</para>
|
| 1294 |
|
|
|
| 1295 |
|
|
<informalexample role="example"><screen>
|
| 1296 |
faw |
51225 |
#tasksel tasksel/first multiselect standard, web-server
|
| 1297 |
faw |
47021 |
# If the desktop task is selected, install the kde and xfce desktops
|
| 1298 |
|
|
# instead of the default gnome desktop.
|
| 1299 |
faw |
51225 |
#tasksel tasksel/desktop multiselect kde, xfce
|
| 1300 |
faw-guest |
38115 |
|
| 1301 |
faw-guest |
40169 |
# Individual additional packages to install
|
| 1302 |
|
|
#d-i pkgsel/include string openssh-server build-essential
|
| 1303 |
faw |
54424 |
# Whether to upgrade packages after debootstrap.
|
| 1304 |
|
|
# Allowed values: none, safe-upgrade, full-upgrade
|
| 1305 |
|
|
#d-i pkgsel/upgrade select none
|
| 1306 |
faw-guest |
40169 |
|
| 1307 |
faw-guest |
38115 |
# Some versions of the installer can report back on what software you have
|
| 1308 |
|
|
# installed, and what software you use. The default is not to report back,
|
| 1309 |
|
|
# but sending reports helps the project determine what software is most
|
| 1310 |
|
|
# popular and include it on CDs.
|
| 1311 |
|
|
#popularity-contest popularity-contest/participate boolean false
|
| 1312 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1313 |
|
|
|
| 1314 |
|
|
</sect2>
|
| 1315 |
|
|
|
| 1316 |
faw |
47021 |
<sect2 id="preseed-bootloader">
|
| 1317 |
|
|
<title>Instalação do carregador de inicialização</title>
|
| 1318 |
|
|
|
| 1319 |
|
|
<informalexample role="example"><screen>
|
| 1320 |
|
|
# Grub is the default boot loader (for x86). If you want lilo installed
|
| 1321 |
|
|
# instead, uncomment this:
|
| 1322 |
faw |
51225 |
#d-i grub-installer/skip boolean true
|
| 1323 |
faw |
47021 |
# To also skip installing lilo, and install no bootloader, uncomment this
|
| 1324 |
|
|
# too:
|
| 1325 |
faw |
51225 |
#d-i lilo-installer/skip boolean true
|
| 1326 |
faw |
47021 |
|
| 1327 |
|
|
# This is fairly safe to set, it makes grub install automatically to the MBR
|
| 1328 |
|
|
# if no other operating system is detected on the machine.
|
| 1329 |
|
|
d-i grub-installer/only_debian boolean true
|
| 1330 |
|
|
|
| 1331 |
|
|
# This one makes grub-installer install to the MBR if it also finds some other
|
| 1332 |
|
|
# OS, which is less safe as it might not be able to boot that other OS.
|
| 1333 |
|
|
d-i grub-installer/with_other_os boolean true
|
| 1334 |
|
|
|
| 1335 |
|
|
# Alternatively, if you want to install to a location other than the mbr,
|
| 1336 |
|
|
# uncomment and edit these lines:
|
| 1337 |
|
|
#d-i grub-installer/only_debian boolean false
|
| 1338 |
|
|
#d-i grub-installer/with_other_os boolean false
|
| 1339 |
|
|
#d-i grub-installer/bootdev string (hd0,0)
|
| 1340 |
|
|
# To install grub to multiple disks:
|
| 1341 |
|
|
#d-i grub-installer/bootdev string (hd0,0) (hd1,0) (hd2,0)
|
| 1342 |
faw |
53071 |
|
| 1343 |
|
|
# Optional password for grub, either in clear text
|
| 1344 |
|
|
#d-i grub-installer/password password r00tme
|
| 1345 |
|
|
#d-i grub-installer/password-again password r00tme
|
| 1346 |
|
|
# or encrypted using an MD5 hash, see grub-md5-crypt(8).
|
| 1347 |
|
|
#d-i grub-installer/password-crypted password [MD5 hash]
|
| 1348 |
faw |
47021 |
</screen></informalexample>
|
| 1349 |
|
|
|
| 1350 |
faw |
53071 |
<para>
|
| 1351 |
|
|
|
| 1352 |
|
|
Um hash MD5 para uma senha para o <classname>grub</classname> pode ser
|
| 1353 |
|
|
gerado usando <command>grub-md5-crypt</command>, ou usando o comando a
|
| 1354 |
|
|
partir do exemplo em <xref linkend="preseed-account"/>.
|
| 1355 |
|
|
|
| 1356 |
|
|
</para>
|
| 1357 |
faw |
47021 |
</sect2>
|
| 1358 |
|
|
|
| 1359 |
faw-guest |
38115 |
<sect2 id="preseed-finish">
|
| 1360 |
faw |
51225 |
<title>Finalizando a instalação</title>
|
| 1361 |
faw-guest |
38115 |
|
| 1362 |
|
|
<informalexample role="example"><screen>
|
| 1363 |
faw |
53323 |
# During installations from serial console, the regular virtual consoles
|
| 1364 |
|
|
# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
|
| 1365 |
|
|
# line to prevent this.
|
| 1366 |
|
|
#d-i finish-install/keep-consoles boolean true
|
| 1367 |
|
|
|
| 1368 |
faw-guest |
38115 |
# Avoid that last message about the install being complete.
|
| 1369 |
|
|
d-i finish-install/reboot_in_progress note
|
| 1370 |
|
|
|
| 1371 |
|
|
# This will prevent the installer from ejecting the CD during the reboot,
|
| 1372 |
|
|
# which is useful in some situations.
|
| 1373 |
|
|
#d-i cdrom-detect/eject boolean false
|
| 1374 |
faw |
51225 |
|
| 1375 |
|
|
# This is how to make the installer shutdown when finished, but not
|
| 1376 |
|
|
# reboot into the installed system.
|
| 1377 |
|
|
#d-i debian-installer/exit/halt boolean true
|
| 1378 |
faw |
55302 |
# This will power off the machine instead of just halting it.
|
| 1379 |
|
|
#d-i debian-installer/exit/poweroff boolean true
|
| 1380 |
faw-guest |
38115 |
</screen></informalexample>
|
| 1381 |
|
|
|
| 1382 |
|
|
</sect2>
|
| 1383 |
|
|
|
| 1384 |
faw-guest |
33371 |
<sect2 id="preseed-other">
|
| 1385 |
faw-guest |
33592 |
<title>Pré-configurando outros pacotes</title>
|
| 1386 |
faw-guest |
33371 |
|
| 1387 |
|
|
<informalexample role="example"><screen>
|
| 1388 |
|
|
# Depending on what software you choose to install, or if things go wrong
|
| 1389 |
|
|
# during the installation process, it's possible that other questions may
|
| 1390 |
|
|
# be asked. You can preseed those too, of course. To get a list of every
|
| 1391 |
|
|
# possible question that could be asked during an install, do an
|
| 1392 |
|
|
# installation, and then run these commands:
|
| 1393 |
|
|
# debconf-get-selections --installer > file
|
| 1394 |
|
|
# debconf-get-selections >> file
|
| 1395 |
|
|
</screen></informalexample>
|
| 1396 |
|
|
|
| 1397 |
|
|
</sect2>
|
| 1398 |
|
|
</sect1>
|
| 1399 |
|
|
|
| 1400 |
faw-guest |
43078 |
|
| 1401 |
faw-guest |
33371 |
<sect1 id="preseed-advanced">
|
| 1402 |
faw-guest |
33592 |
<title>Opções avançadas</title>
|
| 1403 |
faw-guest |
33371 |
|
| 1404 |
faw-guest |
43078 |
<sect2 id="preseed-hooks">
|
| 1405 |
|
|
<title>Execuntando comandos personalizados durante a instalação</title>
|
| 1406 |
|
|
<para>
|
| 1407 |
faw-guest |
33371 |
|
| 1408 |
faw-guest |
43078 |
Uma poderosa e flexível opção oferecida pelas ferramentas de pré-configuração
|
| 1409 |
|
|
é a opção de executar comandos ou scripts em certos pontos da instalação.
|
| 1410 |
|
|
|
| 1411 |
|
|
</para>
|
| 1412 |
|
|
|
| 1413 |
faw-guest |
33371 |
<informalexample role="example"><screen>
|
| 1414 |
|
|
# d-i preseeding is inherently not secure. Nothing in the installer checks
|
| 1415 |
|
|
# for attempts at buffer overflows or other exploits of the values of a
|
| 1416 |
faw-guest |
38115 |
# preconfiguration file like this one. Only use preconfiguration files from
|
| 1417 |
|
|
# trusted locations! To drive that home, and because it's generally useful,
|
| 1418 |
|
|
# here's a way to run any shell command you'd like inside the installer,
|
| 1419 |
faw-guest |
33371 |
# automatically.
|
| 1420 |
|
|
|
| 1421 |
|
|
# This first command is run as early as possible, just after
|
| 1422 |
|
|
# preseeding is read.
|
| 1423 |
|
|
#d-i preseed/early_command string anna-install some-udeb
|
| 1424 |
|
|
|
| 1425 |
|
|
# This command is run just before the install finishes, but when there is
|
| 1426 |
faw-guest |
38115 |
# still a usable /target directory. You can chroot to /target and use it
|
| 1427 |
|
|
# directly, or use the apt-install and in-target commands to easily install
|
| 1428 |
|
|
# packages and run commands in the target system.
|
| 1429 |
|
|
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
|
| 1430 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1431 |
|
|
|
| 1432 |
|
|
</sect2>
|
| 1433 |
|
|
|
| 1434 |
faw-guest |
43078 |
<sect2 id="preseed-seenflag">
|
| 1435 |
|
|
<title>Usando a pré-configuração para mudar valores padrão</title>
|
| 1436 |
|
|
<para>
|
| 1437 |
|
|
|
| 1438 |
|
|
É possível usar a pré-configuração para mudar a resposta padrão para uma
|
| 1439 |
|
|
questão, mas ainda ter a pergunta sendo feita. Para fazer isso a
|
| 1440 |
|
|
<quote>flag</quote> <firstterm>seen</firstterm> deve ser alterada para
|
| 1441 |
|
|
<quote>false</quote> após definir um valor para a questão.
|
| 1442 |
|
|
|
| 1443 |
|
|
<informalexample><screen>
|
| 1444 |
|
|
d-i foo/bar string value
|
| 1445 |
|
|
d-i foo/bar seen false
|
| 1446 |
|
|
</screen></informalexample>
|
| 1447 |
|
|
|
| 1448 |
faw-guest |
45684 |
O mesmo efeito pode ser alcançado para <emphasis>todas</emphasis> as
|
| 1449 |
|
|
perguntas definindo o parâmetro
|
| 1450 |
|
|
<classname>preseed/interactive=true</classname> pela linha de comando
|
| 1451 |
|
|
na inicialização. Isso também pode ser útil para testar ou depurar seu
|
| 1452 |
|
|
arquivo de pré-configuração.
|
| 1453 |
|
|
|
| 1454 |
faw |
48784 |
</para><para>
|
| 1455 |
|
|
|
| 1456 |
faw-guest |
45684 |
Se você está fazendo a pré-configuração pelos parâmetros na inicialização,
|
| 1457 |
|
|
você pode fazer com que o instalador faça a pergunta correspondente usando o
|
| 1458 |
|
|
operador <quote>?=</quote>, i.e. <userinput><replaceable>foo</replaceable>/<replaceable>bar</replaceable>?=<replaceable>value</replaceable></userinput>.
|
| 1459 |
|
|
Isso, claro, irá apenas ter efeito para parâmetros que correspondem às
|
| 1460 |
|
|
perguntas que são realmente exibidas durante uma instalação e não para
|
| 1461 |
|
|
parâmetros <quote>internos</quote>.
|
| 1462 |
|
|
|
| 1463 |
|
|
</para><para>
|
| 1464 |
|
|
|
| 1465 |
|
|
</para>
|
| 1466 |
faw-guest |
43078 |
</sect2>
|
| 1467 |
|
|
|
| 1468 |
faw-guest |
33371 |
<sect2 id="preseed-chainload">
|
| 1469 |
faw-guest |
38115 |
<title>Carregando arquivos de pré-configuração em cadeia</title>
|
| 1470 |
faw-guest |
33371 |
<para>
|
| 1471 |
|
|
|
| 1472 |
faw |
51225 |
É possível incluir outros arquivos de pré-configuração a partir de um arquivo
|
| 1473 |
faw-guest |
38115 |
de pré-configuração. Quaisquer configurações nesses arquivos irão sobrescrever
|
| 1474 |
|
|
configurações pré-existentes nos arquivos lidos anteriormente. Isto torna
|
| 1475 |
|
|
possível colocar, por exemplo, configurações gerais de rede para o seu local
|
| 1476 |
|
|
em um arquivo e configurações mais específicas em outro arquivo.
|
| 1477 |
faw-guest |
33371 |
|
| 1478 |
|
|
</para>
|
| 1479 |
|
|
|
| 1480 |
|
|
<informalexample><screen>
|
| 1481 |
faw-guest |
43078 |
# More than one file can be listed, separated by spaces; all will be
|
| 1482 |
faw-guest |
33371 |
# loaded. The included files can have preseed/include directives of their
|
| 1483 |
|
|
# own as well. Note that if the filenames are relative, they are taken from
|
| 1484 |
faw-guest |
38115 |
# the same directory as the preconfiguration file that includes them.
|
| 1485 |
faw-guest |
33371 |
#d-i preseed/include string x.cfg
|
| 1486 |
|
|
|
| 1487 |
faw-guest |
38115 |
# The installer can optionally verify checksums of preconfiguration files
|
| 1488 |
|
|
# before using them. Currently only md5sums are supported, list the md5sums
|
| 1489 |
faw-guest |
33371 |
# in the same order as the list of files to include.
|
| 1490 |
|
|
#d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d
|
| 1491 |
|
|
|
| 1492 |
|
|
# More flexibly, this runs a shell command and if it outputs the names of
|
| 1493 |
faw-guest |
38115 |
# preconfiguration files, includes those files.
|
| 1494 |
faw-guest |
33371 |
#d-i preseed/include_command \
|
| 1495 |
faw |
48784 |
# string if [ "`hostname`" = bob ]; then echo bob.cfg; fi
|
| 1496 |
faw-guest |
38115 |
|
| 1497 |
|
|
# Most flexibly of all, this downloads a program and runs it. The program
|
| 1498 |
fjp |
39349 |
# can use commands such as debconf-set to manipulate the debconf database.
|
| 1499 |
faw-guest |
44299 |
# More than one script can be listed, separated by spaces.
|
| 1500 |
faw-guest |
38115 |
# Note that if the filenames are relative, they are taken from the same
|
| 1501 |
|
|
# directory as the preconfiguration file that runs them.
|
| 1502 |
faw-guest |
44299 |
#d-i preseed/run string foo.sh
|
| 1503 |
faw-guest |
33371 |
</screen></informalexample>
|
| 1504 |
|
|
|
| 1505 |
faw-guest |
43078 |
<para>
|
| 1506 |
|
|
|
| 1507 |
|
|
Também é possível inicializar a partir das fases initrd ou arquivo de
|
| 1508 |
|
|
pré-configuração, na pré-configuração da rede, definindo preseed/url nos
|
| 1509 |
|
|
arquivos anteriores. Isso fará com que a pré-configuração de rede seja
|
| 1510 |
|
|
executada quando a rede subir. Você precisa ser cuidadoso ao fazer
|
| 1511 |
|
|
isso, já que haverá duas execuções distintas na pré-configuração, o que
|
| 1512 |
|
|
significa por exemplo que você tem outra chance de executar o comando
|
| 1513 |
|
|
preseed/early, a segunda acontecendo após a rede subir.
|
| 1514 |
|
|
|
| 1515 |
|
|
</para>
|
| 1516 |
|
|
|
| 1517 |
faw-guest |
33371 |
</sect2>
|
| 1518 |
|
|
</sect1>
|
| 1519 |
|
|
</appendix>
|