From Mageia wiki
(Redirected from UEFI how-to)
Jump to: navigation, search


This page is a draft. It requires improvements.

If you want to improve it, simply log in and click on the edit tab.
Please remove this {{Draft}} template, when you're sure the page is complete and correct.

View the other draft pages

View all other pages to improve and maintain.


This page will give you indications on how to install Mageia 4 with UEFI. This is useful is you want to keep a Windows 8 or later OS on you computer.

For Mageia 5 and later releases, see Installing on systems with UEFI firmware

Notepad.png
Please note!

You will occasionally, after updating your system, find that you can no longer boot into Mageia. That is a known bug.

That bug got solved, but it is still interesting to read how to solve such a problem: EFI: can no longer boot into Mageia


Installing from USB

If you want to install from USB stick there is only this:

1. the stick must be formatted FAT32

  • you can use the isodumper package to do that easily, it is in the Mageia repositories:

Isodumper.png

    • Device to work on: choose your USB stick to format
    • Click on Format the device
    • Enter the label and select FAT 32 (Windows)
    • Click on Execute

2a. for classical installer we do not care about label anymore
2b. for live installer you must label the stick MGALIVE
3. copy the contents of the DVD to the stick
4. boot from it

Mageia 4 instructions

In general

The most important one to remember: UEFI (Unified Extensible Firmware Interface) support in mga4 is experimental and will get proper integration only for mga5 so there are some known facts / restrictions and issues:

  • secure boot must be disabled
  • the x86_64 classical boot(-nonfree).iso and Mageia-4-x86_64-DVD and the x86_64 liveDVDs are capable of booting in UEFI mode directly if burned to CD or DVD
  • if you need/want to boot from USB, copy the contents of the isos to a FAT32 formatted stick (UEFI spec does not require iso9660 boot detection)
  • for classic installs the label does not matter, but for live medias you must label it MGALIVE so draklive module will pick it up when you use the menu options that are marked (usb boot)
  • the harddisk needs to already have a gpt partition table, otherwise partitioning fails
  • you need a fat32 formatted 100M+ partition type ef (efi boot)
    • (for dual booters with efi system this is already the case)

Preparation of USB stick

Prepare a USB stick big enough for the ISO, labelled MGALIVE and formatted FAT32. For example, in command line, if your USB device is /dev/sdf (replace 'f' in /dev/sdf with the real letter):

 # parted -s /dev/sdf mklabel msdos mkpart primary fat32 0% 100%
 # mkfs.vfat -n MGALIVE /dev/sdf1

If you run a Mageia5 cauldron: for many using isodumper to do the formatting will be easier, see the instructions here: UEFI how-to#Installing from_USB)

Another option is to use Gparted:

  1. Install gparted
  2. insert the USB key you want to write the iso to
  3. run dmesg to see whether it's sdb, sdc, sdd etc.
  4. start gparted as root
  5. select the correct device in the drop down list in the upper right of the gparted screen
  6. Click on "Device" (in the menu bar) - Create Partition Table
  7. Select new partition table type: msdos
  8. Click on "Apply"
  9. Click on "Partition" - "New"
  10. (In cauldron, the defaults are "Create as: Primary Partition" and "Align to: MiB", if that's different in Mga4, then we should tell the users to set it to those values)
  11. For cheap flash drives: Change "Free space preceding (MiB):" to "4"
  12. Change "File system:" to "fat32"
  13. Insert "MGALIVE" after "Label:" for a Live iso
  14. Click on "+ Add"
  15. Click on the green "V" in the menu bar to apply the chosen operations

Then copy the contents of the iso to the USB stick. For example (all as root):

#mount -t iso9660 <iso-image> <a-mount-point>
#cp -a <iso-mount-point/*> <path-to-USB-stick/>
#umount <iso-mount-point>
#sync

The copy can be done from a file manager like Dolphin.

It is normal to get very many

 "cp: failed to preserve ownership for ‘/run/media/<you>/MGALIVE/*/*/*’: Operation not permitted"

-like errors, because FAT32 does not support ACLs


Classical install

  • boot from the image. This can be a challenge, according to which BIOS manage the boot of you computer. You will find hereunder explanation for specific hardware.
  • when you boot from USB and you get a list of entries in correspondence with Mageia, choose the entry ending with "usb".
  • the classic installer (stage2) X server will crash with "no display found" when uefi hands over the console, as uefi does not support/provide vesa as such,
    • but here is the fun part... just wait... you will see repeated "X server is slow to start" and in 15-60 seconds it will get started back up and the install will start.
  • when you come to partitioning, see the help for the partioning step:
    • choose "Custom disk partitioning"
    • and then set the mount point of the EFI partition as /boot/EFI,
  • and when you get to the summary screen:
    • set bootloader to grub2, and it will install grub2-efi and add it as primary bootloader in uefi menu, after that just finish the install as normal.
  • reboot

Live media

There a special instruction to follow with LiveCD or LiveDVD.

  • boot from the image, as for classical install.
  • when you boot from USB and you get a list of entries in correspondence with Mageia, choose the entry ending with "usb".
  • start the Live mode as usual
  • launch the installation from the desktop icon
  • when you come to partitioning, see the help for the partioning step:
    • choose "Custom disk partitioning"
    • and then designate the mount point of the EFI partition as /boot/EFI,
  • and when you get to the summary screen:
    • open a terminal window and enter:
su -
chroot /mnt/install
urpmi grub2-efi   #(allow it to uninstall conflicting grub2)
exit #(from chroot)
exit #(from su -)
exit #(closes terminal window)
    • set bootloader to grub2, and /dev/sda as install point (it will only install in efi partition anyway). It will install grub2-efi and add it as primary bootloader in uefi menu. After that just finish the install as normal.
  • reboot

After the installation

In the case the os-prober does not write a proper menu entry for a Windows 8 install, you can add the following to /boot/grub2/custom.cfg:

menuentry 'Windows 8.1' {
     insmod part_gpt
     insmod fat
     insmod chain
     set root='hd0,gpt2 '
     chainloader ($root)/EFI/Microsoft/Boot/bootmgfw.efi
 }


Notepad.png
Please note!
The previous commands can be added to /etc/grub.d/40_custom instead and followed by grub2-mkconfig >/boot/grub2/grub.cfg
Notepad.png
Please note!
os-prober does not work with Logical Volumes Manager even if GRUB_PRELOAD_MODULES=lvm is added to /etc/default/grub.

Instructions to specific hardware

Asus

  • Plug the USB stick or insert the disc.
  • How to enter in Bios configuration: [1]
  • Then how to select the boot order: [2] French
    The media should be listed. Select it in "Boot Option #1".

HP

On some HP machines, the BIOS will automatically boot Windows even after you have installed another boot manager. To boot Mageia, you will need to interrupt the boot process (by pressing the appropriate key for your machine - usually one of Esc, Del, F2, or F10) and select a different EFI boot image (you may have to try the options one by one to find the right one). Once you have booted Mageia, you should be able to fix this by executing the following command in a terminal:

 mv /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi /boot/EFI/EFI/Microsoft/bootmgfw.efi

If you are using the grub2 boot manager, you will probably need to rerun the boot system configuration to let it find the new location of the Windows boot image. If you are using the rEFInd boot manager, it will automatically detect the new location.