UEFI Boot'a Geçiş

Eğer bir UEFI özelliğine sahip anakartınız varsa Debian sisteminizi UEFI ile nasıl başlatacağınızı anlatan bir makale.

UEFI Boot'a Geçiş

Esaslar

UEFI is a specification for motherboard's firmwares which is replacing the old BIOS. For now, UEFI motherboards still include a BIOS compatibility layer.

The UEFI boot process is quite different from the BIOS one. It involves one specific piece of the motherboard's firmware, the UEFI Boot Manager, which is able to load boot loaders from FAT file systems on specially-typed partitions. It can offer a boot menu (boot: Debian from HDD, Windows from HDD, USB stick, DVD?), which can be configured from a running operating system.

So, basically, to boot a system with UEFI, you need two things:

  • to install an UEFI boot loader on a FAT-formated EFI System Partition;
  • to tell the UEFI Boot Manager to create an entry for that boot loader.

2  Installation or preparation

If you are installing a new Debian system, read the first part. If you already have a BIOS-bootable Debian system installed, read the second one.

In both cases you will have to use Debian testing, because stable's GRUB has problems with UEFI. You can also use Debian stable while taking only GRUB from testing though.

2.1  Installation of a new Debian system

There is no installer image for UEFI, so you can either:

  • make your own, by installing an UEFI boot loader to an USB stick, which will load a regular installer kernel and initrd;
  • use a regular BIOS installer image, using the compatibility mode of your motherboard.

The installer does not provide a convenient way to install an UEFI boot loader, so you are going to install a regular BIOS boot loader at first, and switch to UEFI later.

Use the expert mode and format your hard drive with a GUID Partition Table (GPT). Create a small partition (1 MiB would be far enough), type it as a BIOS Boot Partition (this is the untitled flag above the “bootable” one in Partman), do not format it and do not mount it: this will be needed for BIOS booting. Create another small partition (same kind of size), type it as an EFI System Partition (this is the“bootable” flag), format it as FAT and mount it on /boot/efi: this will be needed for UEFI booting.

Finish the installation as usual, installing GRUB for BIOS, and boot your new system.

2.2  Mevcut Debian Sisteminizi UEFI ile Kullanmak İçin:

Harddiskinizde GUID Partition tablosuna sahip olmalısınız. Eğer MBR kullanıyorsanız UEFI kullanamazsınız. GPT ye çevirmek için gdisk gibi bir program kullanabilirsiniz.

Eğer diskinizde hiç yer yoksa Debian Live ile biraz yer açabilirsiniz.

Küçük bir pattion oluşturun. (1MB yeterlidir aslında), EFI System Partition olarak tanımlayın, FAT olarak formatlayın ve /boot/efi klasörüne mount edin. (fstab kullanabilirsiniz.)  /boot/efi klasörü yoktur, öncelikle onu oluşturmalısınız.

EFI System Partition Özellikleri

  • Bağlantı (Mount) noktası: /boot/efi
  • 100MB ile 250MB boyutlarında
  • Tipi: FAT32
  • Boot Flag'a sahip ve GPT-Partition üzerinde

UEFI Boot'a Geçiş

/dev/sda5 bu özelliklere göre tanımlanmış.

SuperGrubDisk veya Rescatux ile sisteminizi başlatın.

grub-efi-amd64 paketini sistemimize yükleyelim.

apt-get install grub-efi-amd64 efibootmgr

yukardada belirttiğimiz gibi eğer yoksa /boot/efi/efi/debian/ klasörlerini oluşturalım

mkdir /boot/efi/EFI/debian/

Bazen aşağıdaki komutuda kullanmak zorunda kalabilirsiniz:

mkdir /boot/efi/EFI/boot
cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/boot/bootx64.efi

 

UEFI Boot'a Geçiş

  daha önce hazırladığımız UEFI boot partitionunu buraya bağlayalım (mount edelim) sda5 sizde farklı olabilir. blkid komutu ilede öğrenebilirsiniz.

mount /dev/sda5 /boot/efi

  Aşağıdaki komutlarıda vererek grub güncellememizi yapıyoruz.

modprobe efivars
grub-install /dev/sda
update-grub
UEFI Boot'a Geçiş
Aşağıdaki komut ile boot menünüzü görebilirsiniz
 
sudo efibootmgr --verbose
   
# grub-install /dev/sda diyerek şunları yapmış olduk:
  1. Bir GRUB image oluşturduk;
  2. install it to the EFI partition at efi/debian/grubx64.efi (relatively to this filesystem's root, which means /boot/efi/efi/debian/grubx64.efi in absolute);
  3. try to configure the UEFI Boot Manager (the motherboard's boot menu) to load it on start-up

That last step will fail. This is expected, because the UEFI Boot Manager can only be configured from an operating system that was started from UEFI. So if you stop here, you get an unbootable system.

Now, copy (a symlink would be relevant here, but that cannot be done on a FAT file system!) the GRUB image to that other path on the EFI System Partition: efi/boot/bootx64.efi (again, relatively to the ESP filesystem's root, which means /boot/efi/efi/boot/bootx64.efi in absolute). This is where the UEFI firmware looks for a boot loader when it has not been configured for a specific path, typically on removable media. Reboot to check that…

If that trick worked, you are now on UEFI-booted system. Run grub-install again, which should now succeed to configure the UEFI Boot Manager. Reboot to check that you get a “debian” entry on the motherboard's boot menu, and remove efi/boot/bootx64.efi which is no longer needed.

Eğer yinede sorunlar yaşarsanız aşağıdaki adresteki kurtarma CDsi ile sistemi düzeltme şansınız var.

http://sourceforge.net/projects/boot-repair-cd/

Kaynak

 

Yorumunuzu Ekleyin

Wine ile Directx Kurulumu
Yükleniyor...