.\" -*- coding: UTF-8 -*- .\" This man-page is Copyright (C) 1997 John S. Kallal .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and author(s) of this work. .\" %%%LICENSE_END .\" .\" If the you wish to distribute versions of this work under other .\" conditions than the above, please contact the author(s) at the following .\" for permission: .\" .\" John S. Kallal - .\" email: .\" mail: 518 Kerfoot Farm RD, Wilmington, DE 19803-2444, USA .\" phone: (302)654-5478 .\" .\" $Id: initrd.4,v 0.9 1997/11/07 05:05:32 kallal Exp kallal $ .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH INITRD 4 "6 Marzo 2019" Linux "Manual del Programador de Linux" .SH NOMBRE initrd \- disco\-RAM inicializado por el gestor de arranque .SH CONFIGURACIÓN \fI/dev/initrd\fP is a read\-only block device assigned major number 1 and minor number 250. Typically \fI/dev/initrd\fP is owned by root:disk with mode 0400 (read access by root only). If the Linux system does not have \fI/dev/initrd\fP already created, it can be created with the following commands: .PP .in +4n .EX mknod \-m 400 /dev/initrd b 1 250 chown root:disk /dev/initrd .EE .in .PP .\" .\" .\" Also, support for both "RAM disk" and "Initial RAM disk" (e.g., \fBCONFIG_BLK_DEV_RAM=y\fP and \fBCONFIG_BLK_DEV_INITRD=y\fP) must be compiled directly into the Linux kernel to use \fI/dev/initrd\fP. When using \fI/dev/initrd\fP, the RAM disk driver cannot be loaded as a module. .SH DESCRIPCIÓN The special file \fI/dev/initrd\fP is a read\-only block device. This device is a RAM disk that is initialized (e.g., loaded) by the boot loader before the kernel is started. The kernel then can use \fI/dev/initrd\fP's contents for a two\-phase system boot\-up. .PP .\" .\" .\" In the first boot\-up phase, the kernel starts up and mounts an initial root filesystem from the contents of \fI/dev/initrd\fP (e.g., RAM disk initialized by the boot loader). In the second phase, additional drivers or other modules are loaded from the initial root device's contents. After loading the additional modules, a new root filesystem (i.e., the normal root filesystem) is mounted from a different device. .SS "Boot\-up operation" Cuando se arranca el sistema con \fBinitrd\fP, ocurre lo siguiente: .IP 1. 3 El gestor de arranque ('boot loader') carga el núcleo y el contenido de \fI/dev/initrd\fP en memoria. .IP 2. En la puesta en marcha del núcleo, éste descomprime y copia el contenido del dispositivo \fI/dev/initrd\fP en el dispositivo \fI/dev/ram0\fP y a continuación libera la memoria utilizada por \fI/dev/initrd\fP. .IP 3. Seguidamente, el núcleo monta el dispositivo \fI/dev/ram0\fP en modo lectura/escritura como el sistema de ficheros raíz inicial. .IP 4. Si el sistema de ficheros raíz habitual indicado coincide con el sistema de ficheros raíz inicial (por ejemplo, \fI/dev/ram0\fP) entonces el núcleo salta directamente al último paso para la secuencia de arranque habitual. .IP 5. Si el fichero ejecutable \fI/linuxrc\fP está presente en el sistema de ficheros raíz inicial, se ejecuta con UID (identificador de usuario) 0. (El fichero \fI/linuxrc\fP debe tener permiso de ejecución. El fichero \fI/linuxrc\fP puede ser cualquier ejecutable válido, incluyendo los guiones de cualquier procesador de órdenes \-'shell scripts'.) .IP 6. Si no se ejecuta \fI/linuxrc\fP o cuando \fI/linuxrc\fP termina, se monta el sistema de ficheros raíz habitual. (Si \fI/linuxrc\fP termina con algún sistema de ficheros montado en el raíz inicial, entonces el comportamiento del núcleo es \fBINDETERMINADO\fP. (Vea la sección OBSERVACIONES para consultar el comportamiento actual del núcleo.) .IP 7. Si el sistema de ficheros 'habitual' contiene el directorio \fI/initrd\fP, el dispositivo \fI/dev/ram0\fP se mueve desde \fI/\fP a \fI/initrd\fP. En otro caso, si el directorio \fI/initrd\fP no existe, el dispositivo \fI/dev/ram0\fP se desmonta. (Cuando es movido desde \fI/\fP a \fI/initrd\fP, \fI/dev/ram0\fP no se desmonta, y por tanto los procesos pueden permanecer funcionando desde \fI/dev/ram0\fP. Si el directorio \fI/initrd\fP no existe en el sistema de ficheros raíz habitual y queda algún proceso en funcionamiento sobre \fI/dev/ram0\fP cuando \fI/linuxrc\fP termina, el comportamiento del núcleo es \fBINDETERMINADO\fP. Vea la sección de OBSERVACIONES para consultar el comportamiento actual del núcleo.) .IP 8. .\" .\" .\" La secuencia de arranque/inicio habitual (por ejemplo, la ejecución de \fI/sbin/init\fP) se realiza en el sistema de ficheros habitual. .SS Opciones Las siguientes opciones del gestor de arranque, cuando se utilizan con \fBinitrd\fP, alteran el proceso de puesta en marcha del núcleo: .TP \fBinitrd=\fP\fInombre_de_fichero\fP Especifica el fichero a cargar como el contenido de \fI/dev/initrd\fP. Para \fBLOADLIN\fP esta es una opción de línea de órdenes. Para \fBLILO\fP tiene que utilizar este orden en el fichero de configuración de \fBLILO\fP, \fI/etc/lilo.config\fP. El nombre de fichero indicado con esta opción será normalmente una imagen del sistema de ficheros comprimida con GZip. .TP \fBnoinitrd\fP Esta opción de arranque deshabilita la operación de arranque en dos fases. El núcleo realiza la secuencia de arranque habitual como si \fI/dev/initrd\fP no hubiera sido inicializado. Con esta opción, cualquier contenido de \fI/dev/initrd\fP cargado en la memoria por el 'boot loader' es preservado. Esta opción permite que \fI/dev/initrd\fP contenga cualquier clase de datos y no esté limitado a una imagen de sist. de ficheros. De todas formas, el dispositivo \fI/dev/initrd\fP es de sólo\-lectura y puede ser leído sólo una vez tras la puesta en marcha del sistema. .TP \fBroot=\fP\fInombre\-de\-dispositivo\fP .\" .\" .\" Especifica el dispositivo que será utilizado como sistema de ficheros normal (raíz). Para \fBLOADLIN\fP esta es una opción de línea de órdenes. Para \fBLILO\fP esta es una opción para el momento de arranque o puede utilizarse como línea de opción en el fichero de configuración de \fBLILO\fP, \fI/etc/lilo.config\fP. El dispositivo indicado por la opción debe ser un dispositivo 'montable', y contener un sistema de ficheros raíz adecuado. .SS "Changing the normal root filesystem" .\" commit dc7a08166f3a5f23e79e839a8a88849bd3397c32 By default, the kernel's settings (e.g., set in the kernel file with \fBrdev\fP(8) or compiled into the kernel file), or the boot loader option setting is used for the normal root filesystems. For an NFS\-mounted normal root filesystem, one has to use the \fBnfs_root_name\fP and \fBnfs_root_addrs\fP boot options to give the NFS settings. For more information on NFS\-mounted root see the kernel documentation file \fIDocumentation/filesystems/nfs/nfsroot.txt\fP (or \fIDocumentation/filesystems/nfsroot.txt\fP before Linux 2.6.33). For more information on setting the root filesystem see also the \fBLILO\fP and \fBLOADLIN\fP documentation. .PP It is also possible for the \fI/linuxrc\fP executable to change the normal root device. For \fI/linuxrc\fP to change the normal root device, \fI/proc\fP must be mounted. After mounting \fI/proc\fP, \fI/linuxrc\fP changes the normal root device by writing into the proc files \fI/proc/sys/kernel/real\-root\-dev\fP, \fI/proc/sys/kernel/nfs\-root\-name\fP, and \fI/proc/sys/kernel/nfs\-root\-addrs\fP. For a physical root device, the root device is changed by having \fI/linuxrc\fP write the new root filesystem device number into \fI/proc/sys/kernel/real\-root\-dev\fP. For an NFS root filesystem, the root device is changed by having \fI/linuxrc\fP write the NFS setting into files \fI/proc/sys/kernel/nfs\-root\-name\fP and \fI/proc/sys/kernel/nfs\-root\-addrs\fP and then writing 0xff (e.g., the pseudo\-NFS\-device number) into file \fI/proc/sys/kernel/real\-root\-dev\fP. For example, the following shell command line would change the normal root device to \fI/dev/hdb1\fP: .PP .in +4n .EX echo 0x365 >/proc/sys/kernel/real\-root\-dev .EE .in .PP Como ejemplo para sistemas NFS, las siguientes líneas de órdenes cambiarían el dispositivo raíz al directorio NFS \fI/var/nfsroot\fP en un servidor NFS local con dirección IP 193.8.232.7 para un sistema con dirección 193.8.232.2 llamado 'idefix': .PP .in +4n .EX echo /var/nfsroot >/proc/sys/kernel/nfs\-root\-name echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \e >/proc/sys/kernel/nfs\-root\-addrs echo 255 >/proc/sys/kernel/real\-root\-dev .EE .in .PP .\" commit 9d85025b0418163fae079c9ba8f8445212de8568 .\" FIXME . Should this manual page describe the pivot_root mechanism? .\" .\" .\" \fBNote\fP: The use of \fI/proc/sys/kernel/real\-root\-dev\fP to change the root filesystem is obsolete. See the Linux kernel source file \fIDocumentation/admin\-guide/initrd.rst\fP (or \fIDocumentation/initrd.txt\fP before Linux 4.10) as well as \fBpivot_root\fP(2) and \fBpivot_root\fP(8) for information on the modern method of changing the root filesystem. .SS "Modo de empleo" La principal motivación para implementar \fBinitrd\fP fue la de permitir una configuración modular del núcleo en el momento de la instalación. .PP Aquí se describe un posible escenario de la instalación del sistema: .IP 1. 3 El programa cargador arranca desde disquete u otro medio con un núcleo mínimo(p.ej. con soporte para \fI/dev/ram\fP, \fI/dev/initrd\fP, y el sistema de ficheros ext2) y carga \fI/dev/initrd\fP con una versión comprimida (con gzip) del sistema de ficheros inicial. .IP 2. El ejecutable \fI/linuxrc\fP determina lo que se necesita para montar, \fBmount\fP(1), el sistema de ficheros raíz normal (p.ej. tipo de dispositivo, controladores, sistema de ficheros) y (2) el formato 'de distribución' (p.ej. CD\-ROM, red, cinta, ...). Esto se puede hacer preguntando al usuario, tanteando/probando automáticamente, o mediante una aproximación mixta. .IP 3. El ejecutable \fI/linuxrc\fP carga los módulos necesarios desde el sistema de ficheros inicial. .IP 4. El ejecutable \fI/linuxrc\fP crea y 'expande' el sistema de ficheros raíz. (En esta etapa, el sistema raíz no tiene por qué ser aún un sistema completo.) .IP 5. El ejecutable \fI/linuxrc\fP establece \fI/proc/sys/kernel/real\-root\-dev,\fP desmonta \fI/proc\fP, el sistema de ficheros raíz y cualquier otro sist. de ficheros que hubiese montado, y entonces termina. .IP 6. El núcleo entonces monta el sistema de ficheros definitivo. .IP 7. Ahora que el sist. de ficheros está accesible e intacto, el gestor de arranque puede ser instalado. .IP 8. El gestor de arranque está configurado para cargarse en \fI/dev/initrd\fP, un sistema de ficheros con el conjunto de módulos que fue utilizado para poner en marcha el sistema. (p.ej. El dispositivo \fI/dev/ram0\fP puede ser modificado, después desmontado, y finalmente, la imagen es escrita desde \fI/dev/ram0\fP a un fichero.) .IP 9. El sistema es ahora capaz de arrancar, y se pueden abordar nuevas tareas de la instalación. .PP El papel clave de \fI/dev/initrd\fP en el proceso es el de reutilizar los datos de configuración durante el funcionamiento habitual del sistema sin que se requiera una selección inicial del núcleo, o un núcleo genérico demasiado grande, o recompilarlo. .PP Un segundo escenario se presenta para instalaciones en las que Linux corre en sistemas con diferentes configuraciones 'hardware' en una misma red. En estos casos, puede ser deseable utilizar sólo un pequeño conjunto de núcleos (idealmente, uno) y mantener la parte específica de la configuración de cada sistema tan pequeña como sea posible. En este caso, se crea un fichero común con todos los módulos requeridos.Entonces, sólo el fichero \fI/linuxrc\fP o un fichero ejecutado por \fI/linuxrc\fP sería diferente. .PP Un tercer ejemplo es más conveniente para discos 'de rescate'. Debido a que cierta información como la localización de la partición del sistema de ficheros raíz no se necesita en el momento del arranque, el sistema cargado desde \fI/dev/initrd\fP puede utilizar un diálogo y/o autodetección seguido posiblemente de un chequeo a este sistema de ficheros. .PP .\" .\" .\" Por último, pero no menos importante, las distribuciones de Linux en CD\-ROM pueden utilizar \fBinitrd\fP para facilitar la instalación desde el CD\-ROM. La distribución puede utilizar \fBLOADLIN\fP para cargar directamente \fI/dev/initrd\fP desde el CD\-ROM sin necesitar ningún disquete. La distribución podría también utilizar un disco de arranque con \fBLILO\fP y después cargar un disco\-RAM más grande a través de \fI/dev/initrd\fP desde el CD\-ROM. .SH ARCHIVOS \fI/dev/initrd\fP .br \fI/dev/ram0\fP .br \fI/linuxrc\fP .br .\" .\" .\" \fI/initrd\fP .SH NOTAS .IP 1. 3 Con el núcleo actual, cualquier sistema de ficheros que permanezca montado cuando \fI/dev/ram0\fP es movido desde \fI/\fP a \fI/initrd\fP continúa siendo accesible. Sin embargo, la información en \fI/proc/mounts\fP no es actualizada. .IP 2. Con el núcleo actual, si el directorio \fB/initrd\fP no existe, entonces \fI/dev/ram0\fP no será completamente desmontado si \fI/dev/ram0\fP está siendo utilizado por algún proceso o mantiene algún sistema de ficheros montado en él. Si no se desmonta completamente \fI/dev/ram0\fP, entonces \fI/dev/ram0\fP permanecerá en memoria. .IP 3. .\" .\" .\" .\" .SH AUTHORS .\" The kernel code for device .\" .BR initrd .\" was written by Werner Almesberger and .\" Hans Lermen . .\" The code for .\" .BR initrd .\" was added to the baseline Linux kernel in development version 1.3.73. Los usuarios de \fI/dev/initrd\fP no deberían depender del comportamiento indicado en las notas anteriores. Este comportamiento puede cambiar en futuras versiones del núcleo de Linux. .SH "VÉASE TAMBIÉN" \fBchown\fP(1), \fBmknod\fP(1), \fBram\fP(4), \fBfreeramdisk\fP(8), \fBrdev\fP(8) .PP .\" commit 9d85025b0418163fae079c9ba8f8445212de8568 \fIDocumentation/admin\-guide/initrd.rst\fP (or \fIDocumentation/initrd.txt\fP before Linux 4.10) in the Linux kernel source tree, the LILO documentation, the LOADLIN documentation, the SYSLINUX documentation .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Julio González Durán y Juan Piernas . Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org>. .ME .