[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

Configure Grub como gestor de arranque en el hardware UEFI

La instalación y ejecución de Slackware en computadoras que utilizan la Interfaz de firmware extensible unificada (UEFI) en lugar de la BIOS tradicional plantea problemas. Puede que sea imposible arrancar directamente los medios de instalación oficiales a través de UEFI y los discos de instalación no incluyen un cargador de arranque UEFI.

La instalación de Slackware en sistemas UEFI se describe en la página http://docs.slackware.com/howtos:slackware_admin:installing_on_uefi_hardware

Esa página describe la creación un dispositivo de arranque USB que puede usarse para iniciar slackware.

Esta página describe la instalación de Grub2 como gestor de arranque para sistemas basados en UEFI. Grub2 tiene la ventaja de que abre un menú en el arranque y es posible usar el menú para arranque dual con Windows. Se supone que Slackware se ha instalado y se está iniciando a través de un sistema basado en UEFI.

La secuencia seguida es la de

- Instalación de Grub2-efi en un dispositivo de arranque USB (esta etapa se puede omitir, pero puede ser más seguro verificar la instalación en un dispositivo USB primero)

  1. Una vez que el arranque desde la memoria USB funciona, Grub2-efi está instalado en el disco duro
  2. Modificación del menú de arranque UEFI.

Install Grub2-efi

Install grub2 using the slackbuild but modifying it by adding

--with-platform=efi \ 

to ./configure

Then follow some of the instructions at https://wiki.archlinux.org/index.php/Grub#UEFI_systems_2

starting with mounting the usb stick at /boot/efi

#mount /dev/sdc1 -t vfat /boot/efi (where sdc1 is your USB stick)
#modprobe dm-mod
#grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
#mkdir -p /boot/grub/locale
#cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Configure grub.cfg with

#grub-mkconfig -o /boot/grub/grub.cfg

This process should have created a file on the USB stick

/EFI/grub/grubx64.efi.

At this point it is advisable that to check that it is possible to boot from the USB stick with grubx64.efi. If the UEFI system does not see it copy it to /EFI/BOOT/bootx64.efi

Installation of grubx64.efi to the hard drive

The EFI partition on the hard drive should be mounted. The partition will have a structure like this:

/EFI/Boot/bootx64.efi

There may be a folder /EFI/Microsoft/Boot and the efi file booting windows may be bootmgr.efi

The safest way of proceeding at this stage is to create a new folder, for example /EFI/Linux/ and place grubx64.EFI in there.

At this point it may be worth testing if the UEFI system is able to see the new Linux boot option or not, usually by pressing F8 on booting the computer. If it does then it should be straightforward to set this as a default option. It is also likely that it is not seen. If that is the case the choice it to either replace the working .efi (for example /EFI/Boot/bootx64.efi or /EFI/Microsoft/Bootbootmgr.efi) or to modify the UEFI boot menu. Replacing the existing file is likely to make it impossible to boot into Windows. If the intention is to set up a dual boot system then the UEFI boot menu has to be modified.

Modifying the UEFI boot menu

Download efibootmger from http://linux.dell.com/efibootmgr/

untar it, change into the folder and run make

Copy src/efibootmgr/efibootmgr into /usr/sbin and chown it to root.

Mount the efi partition of the hard drive to /boot/efi

# mount /dev/sdXy -t vfat /boot/efi 
where X = drive and y = partition
# modprobe efivars
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Linux" -l '\EFI\Linux\bootx64.efi' 
assuming that the grubx64.efi file had been copied to \EFI\Linux\bootx64.efi

On next reboot Linux with Grub comes up as an option on the boot menu.

Sources

* Originally written by arubin

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