Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente |
es:howtos:slackware_admin:hibernation [2019/02/05 11:06 (UTC)] – [Bootloader configuration] slackwarespanol | es:howtos:slackware_admin:hibernation [2019/04/05 01:03 (UTC)] – [Con pm-utils] antares_alf |
---|
<note warning>En proceso de traducción. Victor</note> | |
====== Hibernación ====== | ====== Hibernación ====== |
La hibernación (también conocida como suspensión en disco) es un método utilizado para apagar una computadora y preservar el estado del sistema operativo. Una vez encendido, el sistema operativo estará en el estado exacto tal como estaba en el momento de la hibernación. | La hibernación (también conocida como suspensión en disco) es un método utilizado para apagar una computadora y preservar el estado del sistema operativo. Una vez encendido, el sistema operativo estará en el estado exacto tal como estaba en el momento de la hibernación. |
===== Configuración del Bootloader ===== | ===== Configuración del Bootloader ===== |
| |
==== Booting from LVM ==== | ==== Arranque desde LVM ==== |
| |
LILO doesn't support booting from LVM, therefore you have to create initial ramdisk (initrd). You need one even though your kernel has build-in support for LVM. | LILO no admite el arranque desde LVM, por lo tanto, tiene que crear el ramdisk inicial (initrd). Necesitas uno aunque tu kernel tenga soporte incorporado para LVM. |
| |
You don't have to specially adjust ''lilo.conf'' because you can set everything resume-related in initrd. | No tiene que ajustar especialmente '' lilo.conf '' porque puede configurar todo lo relacionado en resume-related initrd. |
<code> | <code> |
mkinitrd -c -k <kernel-version> -f <fs_type> -m <modules_required_to_boot> -r <root_partition> -h /dev/volumegroup/swap -L | mkinitrd -c -k <kernel-version> -f <fs_type> -m <modules_required_to_boot> -r <root_partition> -h /dev/volumegroup/swap -L |
</code> | </code> |
* -h set your hibernation/swap logical volume | * -h configura tu hibernación /swap volumen lógico |
* -L activate LVM | * -L activar LVM |
| ==== Configuración de LILO ==== |
| |
==== LILO configuration ==== | El siguiente paso es asegurarse de que su '' lilo.conf '' contiene el siguiente fragmento de código |
| |
Next step is to make sure your ''lilo.conf'' contains following snippet | |
<code> | <code> |
image = /boot/vmlinuz | image = /boot/vmlinuz |
</code> | </code> |
| |
If you don't use LVM, you can simply tell kernel where to resume from by adding append line: | Si no usa LVM, simplemente puede decirle al kernel de dónde reanudar agregando la línea adjunta: |
<code> | <code> |
append="resume=/dev/sdaX" | append="resume=/dev/sdaX" |
</code> | </code> |
Replace ''/dev/sdaX'' with your actual swap partition. | Reemplace '' /dev/sdaX '' con su partición de intercambio real. |
| |
Afterwards, run ''lilo'' to save changes. | Luego, ejecute '' lilo '' para guardar los cambios. |
<code> | <code> |
$ lilo | $ lilo |
</code> | </code> |
| |
===== Lock your computer upon resuming ===== | ===== Bloquea tu computadora al reanudar ===== |
| |
You may have noticed that when your computer resumes, there is no protection to ensure no one can use your computer. As ''pm-hibernate'' must be run as root, any user that powers up your computer will be granted a root terminal! I'll show you some tricks to ensure a proper lock of the system. | Es posible que haya notado que cuando su computadora se reanuda, no hay protección para garantizar que nadie pueda usarla. Como '' pm-hibernate '' debe ejecutarse como root, a cualquier usuario que encienda su computadora se le otorgará un terminal de root. Te mostraré algunos trucos para asegurar un correcto bloqueo del sistema. |
<note warning>Security warning: whether you are using the trick from the command-line or from an X session, don't forget to logout from all other ttys! None of them will get locked, so people issuing <key>CTRL+ALT+F1</key> (ar any Fx key) upon resuming will be able to access them, rendering the lock trick totally useless!</note> | <note warning>Advertencia de seguridad: si está utilizando el truco desde la línea de comandos o desde una sesión de X, ¡no olvide cerrar la sesión de todos los demás ttys! Ninguno de ellos se bloqueará, por lo que las personas que emitan <key> CTRL + ALT + F1 </key> (con cualquier tecla de Fx) al reanudar el acceso podrán acceder a ellos, haciendo que el truco de bloqueo sea totalmente inútil.</note> |
| |
==== With pm-utils ==== | ==== Con pm-utils ==== |
| |
=== From the command line === | === Desde la línea de comando === |
If you dont have an X session open, the only way to lock your computer is to logout from your session before hibernation. You can use the following command: | Si no tiene una sesión X abierta, la única manera de bloquear su computadora es cerrar la sesión de su sesión antes de la hibernación. Puedes usar el siguiente comando: |
<code>pm-hibernate & logout (OR pm-hibernate & exit)</code> | <code>pm-hibernate & logout (OR pm-hibernate & exit)</code> |
It's important to logout from every tty prior to hibernation! ''logout'' will only log you out from the terminal from where you launched the command. Please read the warning in the following section. | ¡Es importante cerrar sesión en cada tty antes de la hibernación! ''logout'' solo lo desconectará de la terminal desde donde ejecutó el comando. Por favor lea la advertencia en la siguiente sección. |
<note>This trick may not work on fast systems, as ''logout'' may not have enough time to complete. You may think that using '';'' instead of ''&'' could do the trick (as it will log out the user //after// resuming), but it allows the user doing a <key>CTRL+C</key> upon resuming, killing the ''logout'' command.</note> | <note>Es posible que este truco no funcione en sistemas rápidos, ya que el "cierre de sesión" puede no tener suficiente tiempo para completarse. Puede pensar que usar '';'' en lugar de ''&'' podría hacer el truco (ya que desconectará al usuario // después de // reanudar), pero le permite al usuario hacer una <clave> CTRL + C </key> al reanudar, matar el comando ''cerrar sesión''.</note> |
| |
=== From an X session === | === De una sesión X === |
If you want to lock the computer prior hibernation, you can issue the following command (as root of course):\\ | Si desea bloquear el equipo antes de la hibernación, puede usar el siguiente comando (como root, por supuesto): \\ |
<code># xlock & sleep 5 ; pm-hibernate</code> | <code># xlock & sleep 5 ; pm-hibernate</code> |
You can also create the following script:\\ | También puede crear el siguiente script: \\ |
<code bash>#!/bin/bash | <code bash>#!/bin/bash |
echo 'Hibernating in 5 seconds' | echo 'Hibernating in 5 seconds' |
sleep 5 | sleep 5 |
pm-hibernate</code> | pm-hibernate</code> |
''xlock'' is a command that locks your X session. Upon rebooting, you will be asked for the //root// password. The ''sleep'' command may be omitted, but I think it's safer to leave it, so you are sure that ''xlock'' has enough time to run properly. You don't have to use ''exit'' (or ''logout'') at the end of the command or the script, as it has no use concerning security. You may want to use it though to automatically close the xterm on resuming. | ''xlock'' es un comando que bloquea tu sesión X. Al reiniciar, se le pedirá la contraseña de //root//. El comando "sleep" puede omitirse, pero creo que es más seguro dejarlo, por lo que está seguro de que "xlock" tiene suficiente tiempo para ejecutarse correctamente. No tiene que usar ''exit'' (o ''logout'') al final del comando o la secuencia de comandos, ya que no tiene ningún uso con respecto a la seguridad. Es posible que desee utilizarlo para cerrar automáticamente el xterm al reanudar. |
<note warning>Security warning: this "trick" will only lock the X system! If you are logged on as root in any of the other ttys, ''xlock'' can be killed, leaving full access to the X session.\\ For people using init3 (no automatic X startup), remember to also logout from the tty from where you launched the X system with ''startx'': hit <key>CTRL+Z</key> (to suspend the task), then ''bg'' (to resume the task in the background), then <key>CTRL+D</key> (or ''logout'') to logout.</note> | |
| <note warning>Advertencia de seguridad: ¡este "truco" solo bloqueará el sistema X! Si ha iniciado sesión como root en cualquiera de los otros ttys, ''xlock'' puede eliminarse, dejando acceso completo a la sesión de X. \\ Para las personas que usan init3 (sin inicio automático de X), recuerde también cerrar la sesión desde tty desde donde lanzó el sistema X con ''startx'': presione <clave> CTRL + Z </key> (para suspender la tarea), luego ''bg'' (para reanudar la tarea en segundo plano), luego <key> CTRL + D </key> (o ''logout'') para cerrar sesión.</note> |
| |
=== An alternate === | === Una alternativa === |
| |
If one is a sudoer, ie, can use sudo, then the following can also be used: | Si estás usando sudo, entonces también se puede usar lo siguiente: |
| |
<code bash>sudo /usr/sbin/pm-hibernate</code> | <code bash>sudo /usr/sbin/pm-hibernate</code> |
| |
| |
===== Further reading ===== | ===== Lectura adicional ===== |
| |
* Hibernate to encrypted swap - [[http://slackware.osuosl.org/slackware-13.37/README_CRYPT.TXT|README_CRYPT.TXT]] | * Hibernar a swap cifrado. [[http://slackware.osuosl.org/slackware-13.37/README_CRYPT.TXT|README_CRYPT.TXT]] |
| |
===== Sources ===== | ===== Fuentes ===== |
* Original source: [[http://www.slackwiki.com/Hibernate]] | * Fuente original:[[http://www.slackwiki.com/Hibernate]] |
* Original author unknown - original submissions [[http://www.slackwiki.com/index.php?title=Hibernate&oldid=366|1]],[[http://www.slackwiki.com/index.php?title=Hibernate&oldid=368|2]] | * Autor original desconocido - presentaciones originales[[http://www.slackwiki.com/index.php?title=Hibernate&oldid=366|1]],[[http://www.slackwiki.com/index.php?title=Hibernate&oldid=368|2]] |
* Otherwise [[http://www.slackwiki.com/index.php?title=Hibernate&action=history|rewritten]] by [[wiki:user:yenn|Martin Matějek]] (also on Slackwiki) | * De otra manera [[http://www.slackwiki.com/index.php?title=Hibernate&action=history|rewritten]] por [[wiki:user:yenn|Martin Matějek]] (también en Slackwiki) |
* Hibernate trick by [[wiki:user:zithro|zithro]] | * Truco de hibernación por [[wiki:user:zithro|zithro]] |
| * Traducido por: [[wiki:user: slackwarespanol | Victor]] 2019/02/05 11:40 (UTC) |
| |
{{tag>howtos hardware hibernation power_saving author_yenn author_zithro}} | {{tag>howtos hardware hibernation power_saving author_yenn author_zithro}} |