[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

¡Esta es una revisión vieja del documento!


En proceso de traducción. Victor

Opciones del kernel de Linux para UEFI y ELILO

El propósito de este artículo es informar al usuario sobre las opciones de kernel necesarias para el arranque desde UEFI, y cierta información sobre cómo funcionan ELILO y quizás otros cargadores de arranque EFI, ya que actualmente es difícil de encontrar y entender en línea.

Opciones de kernel requeridas para el soporte UEFI

Las siguientes opciones son necesarias para arrancar un kernel desde UEFI. Estos ya están establecidos en los núcleos de Slackware.

El arranque desde UEFI requiere que el kernel tenga los mismos bits que el firmware UEFI. Por lo general, esto significa 64 bits, con la excepción del nuevo Intel Atom System-on-Chip (2013), los Apple Mac más antiguos (anteriores a 2008) y las placas Intel para servidores que utilizan EFI v1.10 en modo de 32 bits, y algunos Intel Cloverfield ultrabooks. Sin embargo, aún puede habilitar la emulación de 32 bits en el kernel y ejecutar programas de 32 bits en Linux usando multilib.
  • Enable the block layer
    • Partition Types
      • Advanced partition selection
        • EFI GUID Partition support (CONFIG_EFI_PARTITION [=y])
  • Processor type and features
    • EFI runtime service support (CONFIG_EFI [=y])
    • EFI stub support (CONFIG_EFI_STUB [=y])
    • Build a relocatable kernel (CONFIG_RELOCATABLE [=y])
  • Device Drivers
    • Graphics support
      • Support for frame buffer devices (CONFIG_FB [=y])
        • EFI-based Framebuffer Support (CONFIG_FB_EFI [=y])
  • File systems
    • Miscellaneous filesystems
      • EFI Variable filesystem (CONFIG_EFIVAR_FS [=y])
Usted debe DESACTIVAR la antigua interfaz de sysfs de efivars encontrada en:
  • Firmware Drivers
    • EFI (Extensible Firmware Interface) Support
      • EFI Variable Support via sysfs (CONFIG_EFI_VARS [=n])

ya que está en desuso a favor de CONFIG_EFIVAR_FS, porque tiene un límite de tamaño de variable de 1024 bytes, y porque puede causar problemas de inconsistencia de datos. Sin embargo, si lo deshabilita, necesitará un enlace del programa efibootmgr que admite el nuevo sistema de archivos Variable EFI.

Usando el nuevo sistema de archivos variable EFI

Para utilizar la nueva interfaz del sistema de archivos de variables EFI, debe eliminar el antiguo programa “efibootmgr” y reemplazarlo por uno nuevo que admita el sistema de archivos de variables EFI.

  1. Correr:
    modprobe efivarfs
    mount -t efivarfs efivarfs /sys/firmware/efi/efivars
    efibootmgr

La partición del sistema EFI (ESP)

Para arrancar desde UEFI, debe crear una partición del sistema EFI (ESP) utilizando gdisk o cgdisk en lugar del antiguo fdisk y cfdisk . El Slackware README_UEFI.TXT recomienda un tamaño de 100M, que también es el tamaño de partición mínimo (excepto para unidades 4K nativas, donde es 260M). También debe configurar el código hexadecimal de partición en EF00 , que lo identifica como el ESP.

UEFI y ELILO

Durante el procedimiento de instalación de Slackware 14.1 para ELILO (la secuencia de comandos eliloconfig ), ocurre lo siguiente y es necesario para el arranque desde UEFI utilizando ELILO.

- La partición del sistema EFI (ESP) está ubicada y montada. En un sistema en ejecución, normalmente se encuentra ya montado en /boot/efi . Esta es una partición FAT especial que básicamente es el reemplazo del firmware UEFI de lo que el MBR era para BIOS. Sin embargo, no solo puede contener un gestor de arranque (todo lo que el MBR era capaz de hacer), sino también los archivos de configuración, el kernel y otras cosas a las que tal vez quiera acceder utilizando el firmware UEFI.

  1. Los tres elementos requeridos por ELILO (y otros cargadores de arranque) se copian en el ESP a /boot/efi/EFI/Slackware . Éstos incluyen:
    1. El gestor de arranque. En el caso de ELILO es elilo.efi .
    2. El archivo de configuración. En el caso de ELILO es elilo.conf .
    3. El núcleo, usualmente titulado vmlinuz
  2. Una variable de entrada de inicio se registra en el firmware UEFI utilizando efibootmgr . El comando exacto que se ejecuta es
    EFI_DEVICE=$(mount | grep vfat | grep -w /boot/efi | cut -b 1-8)
    EFI_PARTITION=$(mount | grep vfat | grep -w /boot/efi | cut -f 1 -d ' ' | cut -b 9-)
    efibootmgr -q -c -d $EFI_DEVICE -p $EFI_PARTITION -l "\\EFI\\Slackware\\elilo.efi" -L "Slackware"

    si sale mount

    /dev/sda1 on /boot/efi type vfat (rw)

    EFI_DEVICE sería /dev/sda and EFI_PARTITION would be 1, cada componente de /dev/sda1 , que es el ESP.

Si por alguna razón no puede registrar una entrada de arranque con el firmware UEFI, debe colocar el cargador de arranque en /EFI/boot/bootx64.efi . Esta ubicación especial permite que el firmware UEFI ejecute el cargador de arranque sin ninguna entrada de arranque.

Upgrading your kernel

This task is now much easier than it used to be. All you really need to do is copy vmlinuz onto the ESP on top of the old kernel. No need to edit any configs or add any boot entries, unless you want to. Note that you can edit the config in place and ELILO will pick up the changes on next boot, no need to run any commands like with the old lilo.

Updating your UEFI firmware

As all UEFI firmware has a flashing utility built-in, it is now much easier to update the firmware. All you have to do is copy the new firmware onto the ESP and the UEFI firmware should recognize it when you go to the flashing utility menu. However, remember that flashing the firmware can still potentially brick the system, especially if it is interrupted during the flashing process.

Updating your UEFI firmware may reset your settings and prevent you from booting unless you plan ahead.

My UEFI settings were reset and I can't boot, or planning ahead to avoid surprises

This can happen either after updating the UEFI firmware or after replacing the CMOS battery. There are three main ways to fix it:

  1. Probably the easiest and most convenient way is to use the default boot location. Note that some UEFI firmwares do NOT support the default boot location, so this will not work. However, if it does, you won't have to worry about the system not booting again. To do this you can boot into the Slackware install DVD, mount the ESP and copy the files to the following places:
    1. elilo.efi/EFI/boot/bootx64.efi
    2. elilo.conf/EFI/boot/elilo.conf
    3. vmlinuz/EFI/boot/vmlinuz
  2. You can boot into the Slackware install DVD, run through the menus, and reinstall elilo.
  3. You can download and install one of the following EFI shells to the root directory of your ESP (that is / NOT /EFI).
    1. Boot into the shell and run:
      bcfg boot add 0 fs0:\EFI\Slackware\elilo.efi Slackware

Sources

 es:howtos:slackware_admin:linux_kernel_options_for_uefi_and_elilo ()
Esta traducción es más antigua que la página original y podría estar obsoleta. Ver lo que ha cambiado.