Español
Recientemente, escribí un post sobre mi experiencia con Debian Testing (“Review: Debian GNU/Linux bookworm/sid en un SSD comprado en AliExpress”). En esa oportunidad mencioné que había instalado Debian completamente en un nuevo SSD SATA, incluyendo la raíz “/” y la memoria de intercambio “swap”. Sin embargo, también tenía un disco sólido NVMe M.2 de 16 GB que quería utilizar de manera práctica. Tuve dos opciones: usarlo como almacenamiento adicional o trasladar la partición swap a ese disco. Opté por la segunda opción para aprovechar la velocidad de este tipo de discos y mejorar el rendimiento, ya que mi equipo solo tiene 4 GB de memoria RAM.
Borré la partición de intercambio “swap” del disco SSD y redimensioné la partición "/" para que ocupara todo el espacio del disco. Luego, le di formato "swap" al disco NVMe, ocupando los 16 GB de manera provisional, con el fin de realizar las pruebas pertinentes. Al principio, todo funcionó a la perfección. Sin embargo, después de reiniciar el equipo, la memoria de intercambio se encontraba desactivada y tuve que activarla manualmente desde el Gestor de particiones de KDE.
Después de hacer una consulta en Twitter, recibí respuestas oportunas de varios usuarios. Me guiaron para encontrar la solución y los comandos necesarios para que la partición de intercambio se monte automáticamente cada vez que se inicie el sistema operativo.
La solución es agregar o modificar una línea en el archivo de configuración /etc/fstab para que la partición de intercambio "swap" se monte automáticamente cada vez que se inicia el sistema. Para hacer esto, debes seguir los siguientes pasos:
1-. Abre una terminal y ejecuta el siguiente comando para identificar el UUID de tu partición de intercambio:
sudo blkid
Este comando mostrará el código de información único (UUID) de cada partición identificada por el sistema. Necesitamos copiar todo texto dentro de las comilla "", ejemplo: UUID="2b0ab7dd-e3b5-4ce7-8f24-d6f6a52578654".
2-. Abre el archivo /etc/fstab con un editor de texto con permisos de administrador, por ejemplo:
sudo nano /etc/fstab
3-. Agrega o actualizar una nueva línea al final del archivo, con la siguiente información:
UUID="UUID de la partición de intercambio" none swap defaults 0 0
Reemplaza "UUID de la partición de intercambio" (omitir las comillas) con el UUID de tu partición de intercambio obtenido en el paso 1.
Muchas gracias a todos los que me orientaron a encontrar la solución, estaré publicando este post en twitter y mencionando a cada uno que dejó su comentario en mi tweet. Con estos 3 simples pasos queda solucionado. ¿Crees que es buena idea usar la memoria Nvme para montar la partición swap?. Me gustaría leer sus comentarios. Un abrazo.
English
Recently, I wrote a post about my experience with Debian Testing ("Review: Debian GNU/Linux bookworm/sid on a SSD bought at AliExpress"). At that time I mentioned that I had installed Debian completely on a new SATA SSD, including the root "/" and swap memory. However, I also had a 16GB NVMe M.2 solid-state drive that I wanted to use in a practical way. I had two options: use it as additional storage or move the swap partition to that disk. I opted for the second option to take advantage of the speed of this type of disk and improve performance, since my computer only has 4 GB of RAM.
I deleted the "swap" swap partition from the SSD disk and resized the "/" partition to take up all the disk space. Then, I formatted the NVMe disk "swap", occupying the 16 GB temporarily, in order to perform the relevant tests. At first, everything worked perfectly. However, after rebooting the computer, the swap memory was disabled and I had to enable it manually from the KDE Partition Manager.
After making a query on Twitter, I received timely responses from several users. They guided me to find the solution and the necessary commands to make the swap partition mount automatically every time the operating system boots.
The solution is to add or modify a line in the /etc/fstab configuration file so that the swap partition is automatically mounted every time the system boots. To do this, you must follow the steps below:
1-. Open a terminal and run the following command to identify the UUID of your swap partition:
sudo blkid
This command will display the unique information code (UUID) of each partition identified by the system. We need to copy all text inside the quotes "", example: UUID="2b0ab7dd-e3b5-4ce7-8f24-d6f6a52578654".
2-. Open the /etc/fstab file with a text editor with administrator permissions, for example:
sudo nano /etc/fstab
3-. Add or update a new line at the end of the file, with the following information:
UUID="UUID of the exchange partition" none swap defaults 0 0
Replace "swap partition UUID" (omit the quotes) with the UUID of your swap partition obtained in step 1.
Thank you very much to everyone who guided me to find the solution, I will be publishing this post on twitter and mentioning everyone who left a comment on my tweet. With these 3 simple steps it's solved, do you think it's a good idea to use Nvme memory to mount the swap partition. I would like to read your comments. Best regards.
Translated with www.DeepL.com/Translator (free version)
Images are my own or screenshots taken by me, unless outside sources are indicated.
Discord: alberto0607#6813
Follow me on: Twitter