Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

doc:tec:sis:gnu:automatizar_debian:preseed:inicio [2024/10/09 07:44] – creado - editor externo 127.0.0.1doc:tec:sis:gnu:automatizar_debian:preseed:inicio [Fecha desconocida] (actual) – editor externo (Fecha desconocida) 127.0.0.1
Línea 1: Línea 1:
 +====== Fichero para instalación desatendida de Debian 12 ======
 +
 +En estos ficheros ejemplo se crea en la instalación un usuario ''root'' con contraseña ''cinco'' y un usuario ''sti1301a'' con contraseña ''sti1301a''.
 +
 +<WRAP center round tip 80%>
 +
 +**Ejemplo de uso**
 +
 +  * **Ruta fichero**. Si el fichero ''pc1301_uefi.cfg'' se guarda en la ruta ''boot/pcs'' dentro de la carpeta origen de un servidor web con IP ''192.168.0.1'', cuando el instalador pregunte por su ubicación deberemos responder con la ruta: ''192.168.0.1/boot/pcs/pc1301_uefi.cfg''.
 +
 +  * **Teclado americano**. Si tenemos en cuenta que disponemos de configuración de teclado americano en esos instantes, el guión bajo ''_'' del nombre del fichero de configuración se imprimirá con <key>Shift-?</key> desde un teclado español y la barra inclinada ''/'' con la tecla de división desde el teclado numérico, por ejemplo.
 +
 +</WRAP>
 +
 +
 +===== Fichero preseed para MBR, pc1301 =====
 +
 +<code file pc1301_mbr.cfg>
 +### Fichero para instalación por red y PXE de Debian 12 en todo el disco duro
 +
 +### Localizacion... OK
 +# Configuración de localización para el idioma, país y local.
 +d-i debian-installer/locale string es_ES
 +# Optionally specify additional locales to be generated.
 +d-i localechooser/supported-locales es_ES.UTF-8
 +
 +### Selección del teclado... OK
 +d-i keyboard-configuration/xkb-keymap select es
 +
 +### Configuracion de red... OK
 +d-i netcfg/choose_interface select auto
 +
 +### Asignación del nombre de host... OK
 +# Volvemos a solicitar al DHCP para cambiar "debian" como nombre del host
 +d-i preseed/early_command string kill-all-dhcp; netcfg
 +# Establecemos hostname y dominio vacíos
 +d-i netcfg/get_hostname string unassigned-hostname
 +d-i netcfg/get_domain string unassigned-domain
 +# Establecemos nuestro hostname propio
 +d-i netcfg/hostname string pc1301
 +
 +### Mirror settings... OK (supongo)
 +# If you select ftp, the mirror/country string does not need to be set.
 +d-i mirror/country string manual
 +d-i mirror/http/hostname string ftp.es.debian.org
 +d-i mirror/http/directory string /debian
 +d-i mirror/http/proxy string
 +
 +### Fecha y hora...
 +d-i clock-setup/utc boolean true
 +d-i time/zone string Europe/Madrid
 +# Controls whether to use NTP to set the clock during the install
 +d-i clock-setup/ntp boolean true
 +# La siguiente línea aún NO funciona pues no está instalado NTP...
 +d-i clock-setup/ntp-server string hora.roa.es
 +
 +### Particionado y formato MBR... OK
 +# Seleccionamos el modo regular y atomic. Indicamos aquí que tome todo el disco, y haga las particiones
 +# comunes para el funcionamiento del sistema utilizando todo el espacio disponible en el disco duro.
 +## Partitioning example
 +# If the system has free space you can choose to only partition that space.
 +# This is only honoured if partman-auto/method (below) is not set.
 +# Alternatives: custom, some_device, some_device_crypto, some_device_lvm.
 +d-i partman-auto/init_automatically_partition select biggest_free
 +# Alternatively, you may specify a disk to partition. If the system has only
 +# one disk the installer will default to using that, but otherwise the device
 +# name must be given in traditional, non-devfs format (so e.g. /dev/hda or
 +# /dev/sda, and not e.g. /dev/discs/disc0/disc).
 +# For example, to use the first SCSI/SATA hard disk:
 +# In addition, you’ll need to specify the method to use.
 +# The presently available methods are:
 +# – regular: use the usual partition types for your architecture
 +# – lvm:     use LVM to partition the disk
 +# – crypto:  use LVM within an encrypted partition
 +d-i partman-auto/method string regular
 +# You can choose one of the three predefined partitioning recipes:
 +# – atomic: all files in one partition
 +# – home:   separate /home partition
 +# – multi:  separate /home, /usr, /var, and /tmp partitions
 +d-i partman-auto/choose_recipe select atomic
 +# This makes partman automatically partition without confirmation, provided
 +# that you told it what to do using one of the methods above.
 +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
 +# This makes partman automatically partition without confirmation.
 +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
 +d-i passwd/root-password password cinco
 +d-i passwd/root-password-again password cinco
 +popularity-contest popularity-contest/participate boolean false
 +
 +### Cuenta de usuario normal y su contraseña... OK
 +d-i passwd/user-fullname string sti1301a
 +d-i passwd/username string sti1301a
 +d-i passwd/user-password password sti1301a
 +d-i passwd/user-password-again password sti1301a
 +# Selecionaremos true si queremos que encripte la carpeta de usuario
 +d-i user-setup/encrypt-home boolean false
 +
 +### Seleccion de paquetes para escritorio LXDE... OK
 +tasksel tasksel/desktop multiselect lxde-desktop
 +d-i tasksel-desktop/confirm boolean true
 +d-i tasksel/confirm boolean true
 +# Paquetes individuales a instalar
 +d-i pkgsel/include string openssh-server aptitude gparted mc gcc make build-essential linux-headers-amd64 firmware-linux
 +
 +### Instalación del gestor de arranque... OK
 +d-i grub-installer/only_debian boolean true
 +d-i grub-installer/bootdev string default
 +
 +### Finalizar la instalación... OK
 +# Linea para saltarse el aviso de que la instalación esta completa y que va a reiniciar.
 +d-i finish-install/reboot_in_progress note
 +# Monitor autodetection is recommended.
 +xserver-xorg xserver-xorg/autodetect_monitor boolean true
 +# Uncomment if you have an LCD display.
 +#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
 +# X has three configuration paths for the monitor. Here’s how to preseed
 +# the «medium» path, which is always available. The «simple» path may not
 +# be available, and the «advanced» path asks too many questions.
 +xserver-xorg xserver-xorg/config/monitor/selection-method \
 +       select medium
 +xserver-xorg xserver-xorg/config/monitor/mode-list \
 +       select 1024×768 @ 60 Hz
 +
 +</code>
 +
 +
 +===== Fichero preseed para UEFI, pc1301 =====
 +
 +<code file pc1301_uefi.cfg>
 +### Fichero para instalación por red y iPXE de Debian 12 en todo el disco duro UEFI GPT
 +
 +### Localizacion... OK
 +# Configuración de localización para el idioma, país y local.
 +d-i debian-installer/locale string es_ES
 +# Optionally specify additional locales to be generated.
 +d-i localechooser/supported-locales es_ES.UTF-8
 +
 +### Selección del teclado... OK
 +d-i keyboard-configuration/xkb-keymap select es
 +
 +### Configuracion de red... OK
 +d-i netcfg/choose_interface select auto
 +
 +### Asignación del nombre de host... OK
 +# Volvemos a solicitar al DHCP para cambiar "debian" como nombre del host
 +d-i preseed/early_command string kill-all-dhcp; netcfg
 +# Establecemos hostname y dominio vacíos
 +d-i netcfg/get_hostname string unassigned-hostname
 +d-i netcfg/get_domain string unassigned-domain
 +# Establecemos nuestro hostname propio
 +d-i netcfg/hostname string pc1301
 +
 +### Mirror settings... OK (supongo)
 +# If you select ftp, the mirror/country string does not need to be set.
 +d-i mirror/country string manual
 +d-i mirror/http/hostname string ftp.es.debian.org
 +d-i mirror/http/directory string /debian
 +d-i mirror/http/proxy string
 +
 +### Fecha y hora...
 +d-i clock-setup/utc boolean true
 +d-i time/zone string Europe/Madrid
 +# Controls whether to use NTP to set the clock during the install
 +d-i clock-setup/ntp boolean true
 +# La siguiente línea aún NO funciona pues no está instalado NTP...
 +d-i clock-setup/ntp-server string hora.roa.es
 +
 +### Particionado y formato en GPT... OK
 +# IMPORTANTE: Partir de un disco GPT sin particiones o con una única ocupando todo
 +# Force UEFI booting ('BIOS compatibility' will be lost). Default: false.
 +d-i partman-efi/non_efi_system boolean false
 +# Ensure the partition table is GPT - this is required for EFI
 +d-i partman-basicfilesystems/choose_label string gpt
 +d-i partman-basicfilesystems/default_label string gpt
 +d-i partman-partitioning/choose_label string gpt
 +d-i partman-partitioning/default_label string gpt
 +d-i partman/choose_label string gpt
 +d-i partman/default_label string gpt
 +# Seleccionamos el modo regular y atomic. Indicamos aquí que tome todo el disco, y haga las particiones
 +# comunes para el funcionamiento del sistema utilizando todo el espacio disponible en el disco duro.
 +## Partitioning example
 +# If the system has free space you can choose to only partition that space.
 +# This is only honoured if partman-auto/method (below) is not set.
 +# Alternatives: custom, some_device, some_device_crypto, some_device_lvm.
 +d-i partman-auto/init_automatically_partition select biggest_free
 +# Alternatively, you may specify a disk to partition. If the system has only
 +# one disk the installer will default to using that, but otherwise the device
 +# name must be given in traditional, non-devfs format (so e.g. /dev/hda or
 +# /dev/sda, and not e.g. /dev/discs/disc0/disc).
 +# For example, to use the first SCSI/SATA hard disk:
 +# In addition, you’ll need to specify the method to use.
 +# The presently available methods are:
 +# – regular: use the usual partition types for your architecture
 +# – lvm:     use LVM to partition the disk
 +# – crypto:  use LVM within an encrypted partition
 +d-i partman-auto/method string regular
 +# You can choose one of the three predefined partitioning recipes:
 +# – atomic: all files in one partition
 +# – home:   separate /home partition
 +# – multi:  separate /home, /usr, /var, and /tmp partitions
 +d-i partman-auto/choose_recipe select atomic
 +# This makes partman automatically partition without confirmation, provided
 +# that you told it what to do using one of the methods above.
 +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
 +# This makes partman automatically partition without confirmation.
 +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
 +
 +d-i passwd/root-password password cinco
 +d-i passwd/root-password-again password cinco
 +popularity-contest popularity-contest/participate boolean false
 +
 +### Cuenta de usuario normal y su contraseña... OK
 +d-i passwd/user-fullname string sti1301a
 +d-i passwd/username string sti1301a
 +d-i passwd/user-password password sti1301a
 +d-i passwd/user-password-again password sti1301a
 +# Selecionaremos true si queremos que encripte la carpeta de usuario
 +d-i user-setup/encrypt-home boolean false
 +
 +### Seleccion de paquetes para escritorio LXDE... OK
 +tasksel tasksel/desktop multiselect lxde-desktop
 +d-i tasksel-desktop/confirm boolean true
 +d-i tasksel/confirm boolean true
 +# Paquetes individuales a instalar
 +d-i pkgsel/include string openssh-server aptitude gparted mc gcc make build-essential linux-headers-amd64 firmware-linux
 +
 +### Instalación del gestor de arranque... OK
 +d-i grub-installer/only_debian boolean true
 +d-i grub-installer/bootdev string default
 +
 +### Finalizar la instalación... OK
 +# Linea para saltarse el aviso de que la instalación esta completa y que va a reiniciar.
 +d-i finish-install/reboot_in_progress note
 +# Monitor autodetection is recommended.
 +xserver-xorg xserver-xorg/autodetect_monitor boolean true
 +# Uncomment if you have an LCD display.
 +#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
 +# X has three configuration paths for the monitor. Here’s how to preseed
 +# the «medium» path, which is always available. The «simple» path may not
 +# be available, and the «advanced» path asks too many questions.
 +xserver-xorg xserver-xorg/config/monitor/selection-method \
 +       select medium
 +xserver-xorg xserver-xorg/config/monitor/mode-list \
 +       select 1024×768 @ 60 Hz
 +</code>