[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Diferencias

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

Enlace a la vista de comparación

Próxima revisión
Revisión previa
es:howtos:slackware_admin:how_to_chroot_from_media [2019/02/03 20:59 (UTC)] – creado slackwarespanoles:howtos:slackware_admin:how_to_chroot_from_media [2019/04/07 21:13 (UTC)] (actual) – [Montaje de volumen] antares_alf
Línea 1: Línea 1:
-<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> +====== Chroot de los medios de instalacion ======
-====== Chroot From Installation Media ====== +
-Slackware is full of tools that can help when the system becomes unstable and cannot boot. One example is upgrading the kernel image and forgetting to run lilo afterwards.+
  
-In order to gain access to your system without booting directly to it, it is possible to use an installation media such as Slackware CD1 or the DVDOnce the installation media loads and starts, you can change the media's root directory into a mounted hard-disk partition and use it as the root directory, thus running commands directly from it and affecting it.+Slackware está lleno de herramientas que pueden ayudar cuando el sistema se vuelve inestable y no se puede iniciarUn ejemplo es actualizar la imagen del kernel y luego olvidar ejecutar lilo.
  
-===== Volume Preparation ===== +Para poder acceder su sistema sin iniciarlo directamente, es posible utilizar un medio de instalación como el CD1 de Slackware o el DVDUna vez que los medios de instalación se carguen y comiencen, puede cambiar el directorio raíz de los medios una partición de disco duro montada y usarlo como directorio raízejecutando así los comandos directamente y afectándolos.
-<note important>The examples here are very basic and expect that the entire system is located in single partitionIf you have different partition tableplease make sure that you mount all the needed partitions with care.</note>+
  
-In the simplest of examples, a single hard disk was partitioned locally, normally and it is not encrypted in any wayIn this caseall you need to do is to make sure what is the partition's 'name' is and continue to the mounting section.+===== Preparación del volumen ===== 
 +<note important>Los ejemplos aquí son muy básicos y esperan que todo el sistema esté ubicado en una sola particiónSi tiene una tabla de particiones diferenteasegúrese de montar todas las particiones necesarias con cuidado.</note>
  
-If this is not the caseand you are using LVM/EVMS or an encrypted volume you will need to prepare the volumes before you can mount and chroot into them:+En el ejemplo más simpleun solo disco duro se particionó localmente, normalmente y no está cifrado de ninguna manera. En este caso, todo lo que debe hacer es asegurarse de cuál es el 'nombre' de la partición y continuar en la sección de montaje.
  
-To unlock your LUKS partitionyou will need to 'open' it and give it a name with this command (sdxn as example)+Si este no es el casoy está utilizando LVM/EVMS o un volumen encriptado, deberá preparar los volúmenes antes de poder montarlos y ponerles chroot:
  
-<code>cryptsetup luksOpen /dev/sdxn crypted (any name will do)</code> +Para desbloquear la partición LUKS, deberá 'abrirla' y darle un nombre con este comando (sdxn como ejemplo)
  
-At this point you will be prompted to insert the pass-phrase to unlock the volume. This partition will be mapped to '/dev/mapper/crypted'.+<code>cryptsetup luksOpen /dev/sdxn crypted (cualquier nombre servirá)</code> 
  
-For LVM volumes you need to make sure that the system can recognize and activate the volumeThis is done by running the commands: +En este punto, se le solicitará que inserte la frase de contraseña para desbloquear el volumenEsta partición se asignará a '/dev/mapper/crypted'.
-  * ''vgscan %%--%%mknodes''    // : searches for logical volumes, this might take while// +
-  * ''vgchange -ay''    // : activates the found volumes//\\ +
-  * If more than one group was found, you can select which one to activate with ''vgchange -ay groupName''+
  
-===== Volume Mounting ===== +Para los volúmenes LVM, debe asegurarse de que el sistema pueda reconocer y activar el volumen. Esto se hace ejecutando los comandos: 
-After the preparation stage we can continue to mount the volume(s). You can use ''/mnt'' as it is only needed if you are planning to run the setup program.+  * ''vgscan %%--%%mknodes''    // : busca volúmenes lógicos, esto puede llevar un tiempo// 
 +  * ''vgchange -ay''    // : activa los volúmenes encontrados//\\ 
 +  * Si se encontró más de un grupo, puede seleccionar cuál activar con ''vgchange -ay groupName'' 
 + 
 +===== Montaje de volumen ===== 
 + 
 +Después de la etapa de preparación podemos continuar montando el (los) volumen (s). Puede usar ''/mnt'', ya que solo es necesario si planea ejecutar el programa de instalación.
      
-After we make sure which partitions are neededwe need to mount them:  +Después de asegurarnos de que particiones son necesariasnecesitamos montarlas:  
  
 <code>mount /dev/<location> /mnt</code> <code>mount /dev/<location> /mnt</code>
-Here are common examples+Aquí hay ejemplos comunes
  
-1. The first is just a simple installation with everything installed under mounted under /dev/sda1. No LVM or additional drives.+1. La primera es solo una instalación simple con todo instalado bajo montado bajo /dev/sda1. Sin LVM o unidades adicionales.
  
 <code>mount /dev/sda1 /mnt</code> <code>mount /dev/sda1 /mnt</code>
  
-2. In the next example we have two drivesThe user has set up his or her Slackware system to use /dev/sdb1 for /home and /dev/sda1 for everything else.+2. En el siguiente ejemplo tenemos dos unidadesEl usuario ha configurado su sistema Slackware para usar /dev/sdb1 para /home /dev/sda1 para todo lo demás.
  
-<code>mkdir /mnt/home # We need a directory to mount which needs to be under the directory we intend to chroot into.+<code>mkdir /mnt/home # Necesitamos un directorio para montar, que debe estar debajo del directorio que intentamos chroot.
 mount /dev/sda1 /mnt mount /dev/sda1 /mnt
 mount /dev/sdb1 /mnt/home</code> mount /dev/sdb1 /mnt/home</code>
  
-3. For the third example the user has used LVM and has already made their volume group known to the kernel. The user is using the logical volumes "root, usr, home, opt, var, srv" all under one volume group labeled "myvg"In additionthis user has used LUKS encryption and therefore has placed a small /boot under /dev/sda1.+3. Para el tercer ejemplo, el usuario ha utilizado LVM y ya ha dado a conocer su grupo de volúmenes al kernel. El usuario está utilizando los volúmenes lógicos "root, usr, home, opt, var, srv" todos en un grupo de volúmenes etiquetado como "myvg"Ademáseste usuario ha utilizado el cifrado LUKS y, por lo tanto, ha colocado un pequeño /boot en /dev/sda1.
  
-<code>mkdir /mnt/{boot,usr,home,opt,var,srv} # Create the necessary directories.+<code>mkdir /mnt/{boot,usr,home,opt,var,srv} # Crea los directorios necesarios..
 mount /dev/sda1 /mnt/boot mount /dev/sda1 /mnt/boot
 mount /dev/myvg/root /mnt mount /dev/myvg/root /mnt
Línea 52: Línea 53:
 mount /dev/myvg/srv /mnt/srv</code> mount /dev/myvg/srv /mnt/srv</code>
  
-We could have also used a for loop for everything except /boot (/dev/sda1) and / (/dev/myvg/root) in this example:+Podríamos haber usado también un bucle for para todo excepto /boot (/dev/sda1) / (/dev/myvg/root) en este ejemplo:
 <code>for dir in usr home opt var srv <code>for dir in usr home opt var srv
 do do
Línea 59: Línea 60:
 </code> </code>
  
-Nextwe need to prepare three virtual directories to be used by the environmentThose are ''/dev'', a directory with virtual files that represent hardware devices, ''/proc'', a directory with virtual files that represent processes and ''/sys'' which contains the kernel and other system files:+A continuacióndebemos preparar tres directorios virtuales para que sean utilizados por el entornoEsos son '' /dev '', un directorio con archivos virtuales que representan dispositivos de hardware, '' /proc '', un directorio con archivos virtuales que representan procesos y '' /sys '' que contiene el kernel y otros archivos de sistema:
  
 <code>mount -o bind /dev /mnt/dev <code>mount -o bind /dev /mnt/dev
Línea 66: Línea 67:
  
 ===== Chrooting ===== ===== Chrooting =====
-Once the partition is mountedwe can chroot to it:+Una vez que la partición está montadapodemos hacerle chroot:
      
 <code>chroot /mnt /bin/bash</code> <code>chroot /mnt /bin/bash</code>
      
-<note important>If LVM preparation was involved it might be necessary to re-run ''vgscan %%--%%mknodes'' and ''vgchange -ay'' as they were created inside the installation media'ramdisk and not in the mounted partition.</note>+<note important>Si la preparación de LVM estuvo involucrada, podría ser necesario volver a ejecutar ''vgscan %%--%%mknodes'' '' vgchange -ay '', ya que se crearon dentro del ramdisk del medio de instalación y no en la partición montada.</note>
      
-The bash prompt that you see here is a bash prompt started on your systemYou can now work on this environment naturallyFor example editing ''/etc/lilo.conf'' and executing ''/sbin/lilo'' will happen on your systemnot from the installation media.+El indicador de bash que ve aquí es un aviso de bash iniciado en su sistemaAhora puedes trabajar en este entorno de forma naturalPor ejemplo editando ''/etc/lilo.conf'' y ejecutando ''/sbin/lilo'' ocurrirá en su sistemay no desde los medios de instalación. 
 ====== Sources ====== ====== Sources ======
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->
 es:howtos:slackware_admin:how_to_chroot_from_media ()