¡Esta es una revisión vieja del documento!
Tabla de Contenidos
Configuración de una opción de inicio de recuperación
Descripción general y propósito
Actualmente, la mayoría de las distribuciones basadas en Linux instalan una opción de recuperación/seguridad y una opción de prueba de memoria en el cargador de arranque predeterminado. Si bien Slackware no instala estas opciones de forma predeterminada, se pueden agregar fácilmente a cualquier sistema.
El prompt de recuperación que se instalará en este tutorial será una opción en el disco para ingresar la usbboot image de Slackware. Esta imagen actualmente incluye un modo de línea de comando básico que se usa para solucionar problemas de arranque, la capacidad de ejecutar la aplicación de configuración para nuevas instalaciones de Slackware y el acceso a la aplicación memtest86.
Preparación del archivo
- Antes de comenzar a realizar cambios en su sistema, deberá obtener el archivo
usb-and-pxe-installers /usbboot.img
, esta ubicación se encuentra en la raíz de todos los medios de instalación o espejos de distribución. Se recomienda colocar el archivo en el directorio/tmp
para que sea fácil de ubicar. - Ingrese a la solicitud de raíz emitiendo el comando su o iniciando sesión en el sistema como usuario root.
- Monte el archivo
usbboot.img
usando la opción loopback en un directorio no utilizado como/mnt/tmp
con el comandomount -o loop /tmp/usbboot.img /mnt/tmp
- Cree un directorio separado en su directorio
/ boot
para contener los archivos necesarios como/ boot / recovery
con el comandomkdir /boot/recovery
- Copie los archivos del directorio montado
usbboot.img
en el directorio de recuperación recién creado con el comando cp comocp -rv /mnt/tmp/* /boot/recovery/
- Desmonte el archivo usbboot.img montado con el comando
umount /mnt/tmp
lilo Configuration
In those cases you can either upgrade lilo (which may not be possible) or enter the standard prompt from within an installation CD, DVD or USB stick.
Before we begin modifying the lilo configuration you must first understand why the various options are being used.
- image points to the kernel image which will be booted.
- For 32-bit Slackware the options are hugesmp.s and huge.s.
- For 64-bit Slackware the only option is huge.s.
- label lists the label that will be presented for the option in the bootloader menu.
- initrd lists the initial RAM disk that is used to load the temporary file system.
- password, no explanation needed, enter the password that you wish to use to lock down entry into the boot option.
- read-only is used to tell the system to mount the file system as read-only.
Using your favorite text editor modify the /etc/lilo.conf
file to include the entry as shown below:
image = /boot/recovery/huge.s label = slackware-recovery initrd = /boot/recovery/initrd.img password = newpassword read-only
Once the new entry has been applied and saved in lilo.conf
you will issue the command lilo, upon completion you will see an output similar to the following which will show that the new option has been successfully applied to the bootloader:
root@darkstar:~# lilo Added linux * Added recovery
Since passwords are being applied within the /etc/lilo.conf
file, it is recommended to modify the permissions of the file so that only root can read the contents. You can apply the recommended permissions by issuing the following command:
chmod 600 /etc/lilo.conf
Adding a memtest Option
The memtest option can currently be executed through the recovery command line prompt by issuing the command memtest
, but to decrease the memory footprint of the loaded system we will setup a bootloader option to boot directly into the memtest application.
We will assume that you have already followed the instructions above to create a recovery option, if the instructions were not followed you can follow the basic steps above but only copy the file called memtest
from the usbboot.img
file into the recovery directory.
If you followed the recovery option instructions above, the memtest
binary will already be present in the /boot/recovery
directory.
The file memtest will be referenced as the image for a new lilo entry as shown below.
image = /boot/recovery/memtest label = memtest password = newpassword read-only
Once the new lilo entry has been saved and the lilo command has been run you will see see an output like the following confirming that the new option is available.
root@darkstar:~# lilo Added linux * Added recovery Added memtest