[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

Це стара версія документу!


Йде переклад, зачекайте...

Встановлення завантажувача Grub на UEFI обладнання

Встановлення та запуск Slackware на комп’ютер який використовує (Уніфікований Розширювальний Інтерфейс Прошивок Unified Extensible Firmware Interface (UEFI)) складніше, ніж це робиться на традиційному BIOS комп'ютері. Не можливо завантажити офіційний диск встановлювача напряму через UEFI, так як той не містить завантажувача UEFI.

Процес встановлення Slackware на систему з UEFI, описано на сторінці http://docs.slackware.com/howtos:slackware_admin:installing_on_uefi_hardware На тій сторінці описано процес створення USB носія, який буде у в змозі завантажити slackware.

На цій сторінці описано встановлення завантажувача Grub2 для систем базованих на UEFI. Grub2 має перевагу, так як може показувати меню, яке надає можливість зробити подвійне завантаження (dual boot) з Windows. Передбачається, що Slackware встановлена та завантажується на системі базованій на UEFI.

Наступна послідовність складається з

  1. Встановлення Grub2-efi на завантажувальну USB флешку (Цей крок можна пропустити, але безпечніше перевірити спочатку встановлення на флешку)
  2. Як тільки завантаження з USB флешки працює, Grub2-efi встановлюється на жорсткий диск
  3. Модифікація завантажувального меню UEFI

Встановлення Grub2-efi

Встановіть grub2 використовуючи slackbuild, але відредагуйте налаштування додавши

--with-platform=efi \ 

у ./configure

Потім дотримуйтесь інструкції з https://wiki.archlinux.org/index.php/Grub#UEFI_systems_2

Починаючи з монтування USB флеш носія у /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

Налаштуйте grub.cfg командою

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

Цей процес повинен створити файл на USB носії

/EFI/grub/grubx64.efi.

З цієї миті рекомендовано перевірити, чи можливо завантажити USB флеш носій з grubx64.efi. Якщо система UEFI не бачить ії, скопіюйте файл у /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

 uk:howtos:slackware_admin:set_up_grub_as_boot_loader_on_uefi_based_hardware ()
Цей переклад старіший ніж оригінальна сторінка і може бути не актуальним. Дивіться що було змінено.
Переклад цієї сторінки?: