[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting up UEFI boot



Stefan Monnier a écrit :
>> How can I set up a machine to boot in UEFI mode when the running kernel was
>> booted in legacy mode?
> 
> AFAIK it goes something like this:
> - Use a GPT partition table, rather than MBR (you can usually convert
>   from one to the other without reformatting, but that can require tricky
>   fiddling, so if you can reformat go for it), with an appropriate EFI
>   system partition mounted to /boot/efi.

I confirm that gdisk can convert a disk from MBR/MSDOS to GPT from
within a system running on the disk. However some details can be tricky
indeed.

Anyway, unless the UEFI firmware is broken, you can boot in UEFI mode
from an MSDOS partitionned disk, provided that you can create a small
FAT32 EFI system partition (a few MB IIRC).

> - Install grub-efi-amd64 (or grub-efi-i386, of course), and
>   "grub-install /dev/sda"
> - reboot
> 
> You may need extra steps to convince your system to boot from Debian's
> grub-efi,

Not "may", "must".
Unless the system was booted in UEFI mode, the default GRUB EFI
installation process will fail.

> e.g. copying /boot/efi/efi/debian/grubx64.efi to
> /boot/efi/efi/boot/bootx64.efi

IMO a more elegant way is to install GRUB with the following options :

grub-install --target=x86_64-efi --removable
(or --target=i386-efi depending on the firmware flavour)

It does not require access to any EFI boot variable and will install
GRUB in the default EFI path.


Reply to: