[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:set_up_syslinux_as_boot_loader_on_uefi_based_hardware [2019/02/03 21:06 (UTC)] – creado slackwarespanoles:howtos:slackware_admin:set_up_syslinux_as_boot_loader_on_uefi_based_hardware [2019/02/06 04:06 (UTC)] (actual) – [Configure SYSLINUX como cargador de arranque en hardware basado en UEFI] ak3.devel
Línea 1: Línea 1:
 +
 +
 +
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
-====== Set up SYSLINUX as boot loader on UEFI based hardware ====== +====== Configure SYSLINUX como cargador de arranque en hardware basado en UEFI ====== 
-SYSLINUX is a boot loader that loads Linux (among other thingsfrom FAT filesystem. [[http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project | The Syslinux Project]], of which SYSLINUX the boot loader is a partcontains also ISOLINUX, EXTLINUX and PXELINUX, basically its variants to boot from optical media, ext2/3/4, Btrfs, XFS, UFS/FFS and NTFS or from network.+SYSLINUX es un cargador de arranque que carga Linux (entre otras cosasdesde el sistema de archivos FAT. [[http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project | The Syslinux Project]], del cual forma parte SYSLINUX, el cargador de arranque, también contiene ISOLINUX, EXTLINUX PXELINUX, básicamente sus variantes para arrancar desde medios ópticos, ext2 / 3 / 4, Btrfs, XFS, UFS / FFS NTFS o desde red.
  
-UEFI support seems to have been added in version of SYSLINUX, while Slackware comes with version 4, which means it can not be set up during Slackware installationunless one prepares SYSLINUX files on another machine.+El soporte de UEFI parece haberse agregado en la versión de SYSLINUX, mientras que Slackware viene con la versión 4, lo que significa que no se puede configurar durante la instalación de Slackware, a menos que uno prepare los archivos SYSLINUX en otra máquina.
  
  
-===== Why SYSLINUX ===== +===== Por qué SYSLINUX ===== 
-That being saidwhy bother with SYSLINUX? A couple of reasons:+Dicho esto¿por qué molestarse con SYSLINUX? Un par de razones:
  
-  * LILO/ELILO is reportedly no longer maintainedthe time may come we will have to switch to something else+  * Se informa que LILO / ELILO ya no se mantienepuede que llegue el momento en que tendremos que cambiar a otra cosa
-  * Learning SYSLINUX may be worthwhilebecause aside from serving as LILO/ELILO replacementit can do many other things (e.g. PXE) +  * El aprendizaje de SYSLINUX puede valer la penaya que además de servir como reemplazo de LILO / ELILO, puede hacer muchas otras cosas (por ejemplo, PXE) 
-  * Compared to GRUB, it iswellless humongous and intimidatingAfter allconfiguration files resemble those of LILO/ELILO.+  * Comparado con GRUB, esbuenomenos humilde e intimidanteDespués de todolos archivos de configuración se parecen a los de LILO / ELILO.
  
  
-===== Why UEFI ===== +===== Por qué UEFI ===== 
-It is not as though there is some choicemachines nowadays //are// UEFI. One can, howeverchoose to set UEFI to so called "CSM" or sometimes "Legacy" modeIn this mode, UEFI acts as BIOS, i.e. reads the first sector (MBR) of a hard drive and loads and executes non-UEFI boot loader such as LILO from thereAs opposed to UEFI insay, UEFI modewhen it readsloads and executes UEFI-aware boot loader from //EFI boot partition//.+No es como si hubiera alguna opciónLas máquinas hoy en día son UEFI. Sin embargose puede optar por configurar UEFI en el llamado modo "CSM" o, a veces, en "Legacy"En este modo, UEFI actúa como BIOS, es decir, lee el primer sector (MBR) de un disco duro y carga y ejecuta desde allí el cargador de arranque no UEFI, como LILO. A diferencia de UEFI endigamosel modo UEFI, cuando leecarga y ejecuta el cargador de arranque compatible con UEFI desde // partición de arranque EFI //.
  
-Franklythere are no compelling reasons not to use CSM (note that it is possible to use [[http://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi | GPT partitions without UEFI]])On the contrarythere are reasons to avoid UEFI bootingbecause:+Francamente, no hay razones de peso para no usar CSM (tenga en cuenta que es posible usar [[http://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi | GPT partitions without UEFI]]. Por el contrariohay razones para evitar el arranque UEFI, porque:
  
-  * On some machinesit is not possible to turn off secure boot without also turning off UEFI booting (i.e. without turning on CSM). +  * En algunas máquinasno es posible desactivar el inicio seguro sin desactivar también el inicio UEFI (es decir, sin activar CSM). 
-  * On some machinesit is possible to turn off secure bootbut anything but what came with the machine will not boot anyway+  * En algunas máquinases posible desactivar el arranque seguropero todo lo que venga con la máquina no se iniciará de todos modos
-  * On some machines, UEFI tries really hard to boot Windows and ignores or resets boot order+  * En algunas máquinas, UEFI intenta realmente iniciar Windows e ignora o restablece el orden de inicio
-  * On some machinesinstalling Linux in UEFI mode may brick the machine.+  * En algunas máquinasla instalación de Linux en modo UEFI puede bloquear la máquina.
  
-Butas with LILO, the day may come we will need to move on.+Peroal igual que con LILO, puede que llegue el día en que tengamos que seguir adelante.
  
  
-===== Installation ===== +===== Instalación ===== 
-There are basically two stepsfirstpreferably before you even install Slackware, partition the disk using [[https://en.wikipedia.org/wiki/GUID_Partition_Table | GPT]] and create EFI boot partition, second, compile and install SYSLINUX.+Básicamente, hay dos pasosprimeropreferiblemente incluso antes de instalar Slackware, particione el disco usando [[https://en.wikipedia.org/wiki/GUID_Partition_Table | GPT]] y cree una partición de arranque EFI, luego compile e instale SYSLINUX.
  
-But before you begin+Pero antes de empezar
-  * back up your dataif you have anything of value on any of drives in the machine +  * haga una copia de seguridad de sus datossi tiene algo de valor en cualquiera de las unidades en la máquina 
-  * boot to UEFI setup ("BIOS"and verify that boot method is set to "UEFI", not "CMS" or "Legacy" +  * inicie con la configuración de UEFI ("BIOS"y verifique que el método de inicio esté establecido en "UEFI", no en "CMS" "Legacy" 
-  * and also that Secure Boot is turned off+  * y también que el arranque seguro está desactivado
  
-==== Create EFI Boot Partition ==== +==== Crear partición de arranque EFI ==== 
-It is the place where UEFI will look for a boot loaderSeveral tools can be used to partition a drive and create EFI boot partition,: +Es el lugar donde UEFI buscará un cargador de arranqueSe pueden usar varias herramientas para particionar una unidad y crear una partición de arranque EFI,: 
-  * cfdisk (new versionsolder do just DOS partitions+  * cfdisk (nuevas versionesviejas hacen solo particiones DOS) 
-  * gdisk, an interactive tool and GPT counterpart to fdisk +  * gdisk, Una herramienta interactiva y contraparte de GPT para fdisk. 
-  * cgdisk, a menu-based tool and GPT counterpart to cfdisk +  * cgdisk, una herramienta basada en menú y GPT equivalente a cfdisk 
-  * sgdisk, apparently scriptable version of gdisk+  * sgdisk, versión aparentemente programable de gdisk
  
-Let's assume you have empty 10GB drive /dev/sda.+Supongamos que tienes 10 GB de disco vacío /dev/sda.
  
-  * Just in caseerase all previous MBR or GPT partitions.+  * Por si acasoborre todas las particiones anteriores de MBR GPT.
 <code> <code>
 # sgdisk -Z /dev/sda # sgdisk -Z /dev/sda
 </code> </code>
  
-  * Verify the drive is clean.+  * Verifique que la unidad esté limpia.
 <code> <code>
 # gdisk -l /dev/sda # gdisk -l /dev/sda
Línea 72: Línea 75:
 </code> </code>
  
-  * Partition the drive (using sgdisk or any above mentioned tool). Three partitions will be createdone for EFI, one for data and one for swap.+  * Particione la unidad (utilizando sgdisk o cualquier herramienta mencionada anteriormente). Se crearán tres particionesuna para EFI, una para datos y otra para intercambio.
 <code> <code>
 # sgdisk -n 1:0:+512M /dev/sda # sgdisk -n 1:0:+512M /dev/sda
Línea 79: Línea 82:
 </code> </code>
  
-  * Do not forget to set correct partition codes. EFI boot partitions has code 'ef00'.+  * No te olvides de configurar los códigos de partición correctosParticiones de arranque EFI tiene código 'ef00'.
 <code> <code>
 # sgdisk -t 1:ef00 /dev/sda # sgdisk -t 1:ef00 /dev/sda
Línea 86: Línea 89:
 </code> </code>
  
-  * Verify layout.+  * Verificar diseño.
 <code> <code>
 # gdisk -l /dev/sda # gdisk -l /dev/sda
Línea 112: Línea 115:
 </code> </code>
  
-  * Create FAT32 filesystem on EFI boot partition.+  * Crear un sistema de archivos FAT32 en la partición de arranque EFI.
 <code> <code>
 # mkfs.vfat -F 32 /dev/sda1 # mkfs.vfat -F 32 /dev/sda1
 </code> </code>
  
-That is pretty much it for EFI boot partitionYou can do whatever you like with /dev/sda2 (RAID, LUKS, LVM, any filesystemand install Slackware therebut leave EFI partition alonethat partition needs to be unencrypted and FAT32 formatted.+Eso es más o menos para la partición de arranque EFI. Puede hacer lo que quiera con /dev/sda2 (RAID, LUKS, LVM, cualquier sistema de archivose instalar Slackware allípero deje la partición EFI solaesa partición debe estar sin cifrar y el formato FAT32.
  
  
-==== Set up SYSLINUX ==== +==== Preparar SYSLINUX ==== 
-=== Compilation === +=== Compilación === 
-Download [[https://www.kernel.org/pub/linux/utils/boot/syslinux/ | sources]] and compile.+Descarguelo desde [[https://www.kernel.org/pub/linux/utils/boot/syslinux/ | sources]] compile.
  
 <code> <code>
Línea 132: Línea 135:
  
  
-=== Set up boot loader === +=== Configurar el cargador de arranque === 
-Now copy the boot loader and a few modulesas well as kernel and initrd to EFI boot partition created earlierLet's asssume /dev/sda1 is mounted as /boot/efi.+Ahora copie el cargador de arranque y algunos módulosasí como el kernel initrd a la partición de arranque EFI creada anteriormenteSupongamos que /dev/sda1 está montado como /boot/efi.
  
-  * Copy the boot loader and a module for loading Linux. That is the bare minimumAnd double check you are copying efi64 files.+  * Copie el cargador de arranque y un módulo para cargar Linux. Eso es lo mínimoY vuelve a comprobar que estás copiando archivos efi64.
 <code> <code>
 # cd /boot/efi # cd /boot/efi
Línea 145: Línea 148:
 </code> </code>
  
-  * Copy some other modulese.gfor creating cute boot menu. For full list of modules and dependenciessee [[http://www.syslinux.org/wiki/index.php?title=Library_modules | the list]].+  * Copia algunos otros módulospor ejpara crear un lindo menú de arranquePara ver la lista completa de módulos y dependenciasconsulte [[http://www.syslinux.org/wiki/index.php?title=Library_modules | the list]].
 <code> <code>
 # cp /some/where/usr/share/syslinux/efi64/libutil.c32 .  # cp /some/where/usr/share/syslinux/efi64/libutil.c32 . 
Línea 151: Línea 154:
 </code> </code>
  
-  * Create configuration file /boot/efi/EFI/SYSLINUX/syslinux.cfg. Bellow is an example of simple boot menu with two items+  * Cree el archivo de configuración /boot/efi/EFI/SYSLINUX/syslinux.cfg. A continuación se muestra un ejemplo de menú de arranque simple con dos elementos
-    * ''TIMEOUT 100'' tells the boot loader to wait 100 hundredths of secondi.e. 10 seconds for user input+    * ''TIMEOUT 100'' le dice al cargador de arranque que espere 100 centésimas de segundo, es decir, 10 segundos para la entrada del usuario
-    * If user selects nothing within 10 secondswhatever is set as ''DEFAULT'' will be launched+    * Si el usuario no selecciona nada en 10 segundoslo que esté configurado como ''DEFAULT'' se pondrá en marcha
-    * The first menu entry is Slackware 14.2. +    * La primera entrada del menú es Slackware 14.2.
-      * ''LABEL'' is a name that can be used for ''DEFAULT''+      * ''LABEL'' es un nombre que puede ser usado para ''DEFAULT''
-      * ''MENU LABEL'' is a description+      * ''MENU LABEL'' es una descripción
-      * ''LINUX vmlinuz-huge-4.4.14'' tells the boot loader to boot kernel vmlinuz-4.4.14 from the same directory (i.e. EFI\SYSLINUX\vmlinuz-4.4.14) +      * ''LINUX vmlinuz-huge-4.4.14'' le dice al cargador de arranque que arranque el kernel vmlinuz-4.4.14 desde el mismo directorio (es decir, EFI\SYSLINUX\vmlinuz-4.4.14) 
-      * ''APPEND /dev/vgroot/V_ROOT 4'' is kernel command line telling the kernel to mount /dev/vgroot/V_ROOT as / (root). Obviously that is a logical volume in this casebut it could be e.g. plain /dev/sda2. The second argument, '4', will be in fact passed by kernel to init, which will start to runlevel instead of default 3 (as per /etc/inittab), i.e. will start to graphical multi-user mode with window system+      * ''APPEND /dev/vgroot/V_ROOT 4'' es la línea de comando del kernel que le dice al kernel que monte /dev/vgroot/V_ROOT como / (root). Obviamente, este es un volumen lógico en este caso, pero podría ser, por ejemplo, /dev/sda2. El segundo argumento, '4', de hecho pasará de kernel init, que comenzará a ejecutar el nivel de ejecución en lugar del predeterminado 3 (según /etc/inittab), es decir, comenzará al modo multiusuario gráfico con el sistema de ventanas X . 
-      * ''INITRD initrd.gz-4.4.14'' is an initrd image that is mounted as temporary before the final is mountedTypicallyan initrd is needed if kernel has to load some additional modules to access the root deviceor has to perform some actions to make it accessible (think of RAID, LUKS, LVM). If you do not need initrd, simply delete this line+      * ''INITRD initrd.gz-4.4.14'' es una imagen initrd que se monta como temporal antes de que se monte finalNormalmentese necesita un initrd si el kernel tiene que cargar algunos módulos adicionales para acceder al dispositivo raízo tiene que realizar algunas acciones para hacerlo accesible (piense en RAID, LUKS, LVM). Si no necesita initrd, simplemente elimine esta línea
-    * The second menu entry is largely the sameexcept that there is no '4' in ''APPEND /dev/vgroot/V_ROOT''Simply putthis is non-graphical safe modeIf window system fails to start for whatever reasonyou may end up with not only black screenbut also blocked keyboard and mouse and therefore unable to fix the causeSo it is a good idea to have this option prepared beforehand (another method to use otherwise unusable machine with broken is to SSH-inthough it is a less reliable method).+    * TLa segunda entrada del menú es prácticamente la mismaexcepto que no hay '4' en '' APPEND /dev/vgroot/V_ROOT ''En pocas palabraseste es un modo seguro no gráficoSi el sistema de ventanas no se inicia por cualquier motivopuede terminar no solo con la pantalla negrasino también con el teclado y el mouse bloqueados y, por lo tanto, no puede arreglar la causaPor lo tanto, es una buena idea tener esta opción preparada de antemano (otro método para usar una máquina inutilizable con una rota es la entrada SSH, aunque es un método menos confiable)
 <file - /boot/efi/EFI/SYSLINUX/syslinux.cfg> <file - /boot/efi/EFI/SYSLINUX/syslinux.cfg>
 UI menu.c32 UI menu.c32
Línea 182: Línea 185:
 </file> </file>
  
-  * Still in /boot/efi/EFI/SYSLINUX, copy kernel here. Huge is the safer optionGeneric may require initrd and more modules in itIf you do not know which they arethe machine might not bootso go with the huge.+  * Aún en /boot/efi/EFI/SYSLINUX, copie el kernel aquí. Huge es la opción más seguraEl genérico puede requerir initrd y más módulos en élSi no sabe cuáles sones posible que la máquina no arranqueasí que vaya con la huge.
 <code> <code>
 # cp /boot/vmlinuz-huge-4.4.14 . # cp /boot/vmlinuz-huge-4.4.14 .
 </code> </code>
  
-  * Create initrd if needed and copy here tooMan for optionsbut basically the command bellow creates an initrd that will contain some USB-related modules to enable keyboard input (because /dev/sda2 is encrypted (LUKS) and user will have to type in a passphrase).+  * Cree initrd si es necesario y copie aquí tambiénejecute man para las opcionespero básicamente el siguiente comando crea un initrd que contendrá algunos módulos relacionados con USB para habilitar la entrada del teclado (porque /dev/sda2 está cifrado (LUKS) y el usuario tendrá que escribir una frase de contraseña).
 <code> <code>
 # mkinitrd -c -k 4.4.14 -C /dev/sda2 -L -R -f xfs -m xfs:hid:hid-generic:usbhid:xhci-hcd:xhci-pci:ehci-hcd:ehci-pci:ohci-hcd:ohci-pci:uhci-hcd:uhci-pci:usb-storage -r /dev/vgroot/V_ROOT -o /boot/initrd.gz-4.4.14 # mkinitrd -c -k 4.4.14 -C /dev/sda2 -L -R -f xfs -m xfs:hid:hid-generic:usbhid:xhci-hcd:xhci-pci:ehci-hcd:ehci-pci:ohci-hcd:ohci-pci:uhci-hcd:uhci-pci:usb-storage -r /dev/vgroot/V_ROOT -o /boot/initrd.gz-4.4.14
Línea 193: Línea 196:
 </code> </code>
  
-  * Finallyadd SYSLINUX to UEFI boot menuNote that there will be in fact two boot menusThe first is UEFI boot menu that will typically onyl show up if you press some key (e.g. F12 on Dell, F9 on HP, F11 with AsRock mainboardoften just Esc) and will present you with a list of devices or boot loaders to bootDepending on how crappy your UEFI is, SYSLINUX may or may not show up there+  * Finalmenteagregue SYSLINUX al menú de arranque de UEFI. Tenga en cuenta que de hecho habrá dos menús de arranqueEl primero es el menú de arranque UEFI que normalmente se mostrará solo si presiona alguna tecla (por ejemplo, F12 en Dell, F9 en HP, F11 con la placa base AsRock, a menudo solo Esc) y le presentará una lista de dispositivos o cargadores de arranque para que arranque Dependiendo de qué tan malo sea tu UEFI, SYSLINUX puede o no aparecer allí
-The second boot menu is that of SYSLINUX, i.e. what you typed to syslinux.cfg and will show up either if you do not tigger UEFI boot menu or trigger it and then select either SYSLINUX or device (hard driveit is on.+El segundo menú de inicio es el de SYSLINUX, es decir, lo que escribió en syslinux.cfg y aparecerá si no activa el menú de inicio de UEFI o lo activa y luego selecciona SYSLINUX o dispositivo (disco duroen el que está activado.
 <code> <code>
 # efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\SYSLINUX\\syslinux.efi -L "SYSLINUX" # efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\SYSLINUX\\syslinux.efi -L "SYSLINUX"
Línea 204: Línea 207:
 </code> </code>
  
-  * Syslinux has been added with code 0000 (Boot0000) and is 1st in boot orderIf it was notorder would have to changed:+  * Syslinux se ha agregado con el código 0000 (Boot0000) y es el primero en el orden de arranqueSi no fuera asíhabría que cambiar el orden:
 <code> <code>
 # efibootmgr -o 0000,0001,0002 # efibootmgr -o 0000,0001,0002
 </code> </code>
  
-  * On some machinesit may be possible to change order also in UEFI (meaning its GUI/setup utility).+  * En algunas máquinaspuede ser posible cambiar el orden también en UEFI (es decir, su GUI / utilidad de configuración).
  
  
-==== Troubleshooting ==== +==== Solución de problemas ==== 
-If your machine complains it has nothing to bootthat may indicate efibootmgr command was incorrect or somehow did not registerYou may then try to force it to boot SYSLINUX by moving and renaming it to EFI\Boot\bootx64.efi, which is kind of fallback optionthe machine will try to boot that at some point.+Si su máquina se quejano tiene nada que arrancar, eso puede indicar que el comando efibootmgr fue incorrecto o de alguna manera no se registróLuego, puede intentar forzarlo para que inicie SYSLINUX moviéndolo y cambiándolo de nombre a EFI \ Boot \ bootx64.efi, que es una opción alternativaLa máquina intentará arrancar eso en algún momento.
  
 <code> <code>
 es:howtos:slackware_admin:set_up_syslinux_as_boot_loader_on_uefi_based_hardware ()