Page 1 of 1

Install Mageia 5 DVD with grub2 UEFI in Virtualbox

PostPosted: Jun 30th, '15, 16:58
by macxi
Hi,
I installed the Mageia 5 in virtualbox with Grub2 and UEFI. See in Geleria Picasa: Mageia 5 DVD Clássico 64, grub2 UEFI KDE.

To test the Mageia 5 with UEFI in VirtualBox, you must enable EFI "Settings" in the "System" tab, select "Enable EFI (special systems only)", as in the image below:
    Image
    It is recommended Disable the I / O APIC. I left enabled by mistake, then had to disable for Mageia 5 start.

        Note 1:Virtualbox is the latest version, installed in the Mageia 5..
        Note 2: It is not necessary to "enable EFI" to test the Mageia 5 in Virtualbox. I did this only to test Grub2 settings Mageia 5 for UEFI machines. The most recommended to test the Mageia 5 in Virtualbox is to disable the "EFI" so that it install normally with Grub Legacy, without all these difficulty setting.
        Note 3: There were crashes that required restarting the physical machine. These crashes occurred just after installation, with a few minutes after 5 Mageia be running in VirtualBox, when the process of Virtualbox started using 100% CPU of the physical machine, so I had to reset.

      Image
      A instalação ocorreu ok


After the Mageia 5 be installed on Virtualbox, it appeared an error message when trying to start:
      Image

As the dkms package was already installed, I removed and installed again this package:
- dkms-virtualbox-4.3.28-1.mga5.noarch

It worked. The Mageia 5 menu open in virtualbox, but in text-mode screen, to use the command line. To continue I followed the tips page of the Wiki Mageia: Boot Drops to UEFI Shell (in VirtualBox):

      Boot Drops to UEFI Shell (in VirtualBox)
      When running Mageia under UEFI in a VirtualBox VM, booting can suddenly fail, dropping to a UEFI Shell. This is possibly a VBox bug, however all is not lost! At the shell prompt type:
      fs0:
      The prompt will change to indicate that you are in fs0, now:
      ls
      Look for a directory called "EFI". If you have a CD in the drive that will be fs0, so you will need to repeat the above replacing fs0: with fs1: etc. until 'ls' finds EFI. Now at the prompt type:
      cd EFI/mageia
      grubx64.efi
      That will boot into the grub2 menu.
      Having to do this repeatedly (during boot testing for example) becomes tedious, so a fix is to create an EFI shell script as: /boot/EFI/startup.nsh The script is a plain text file e.g.:
      fs0:
      if not exist EFI then
      fs1:
      endif
      cd EFI/mageia
      grubx64.efi

      With that installed (which is adequate in most cases), when the EFI shell appears, the script will launch after a few seconds unless you hit ESC to stop it. If you hit ENTER as soon as the shell appears the script will launch instantly, saving a lot of repetitive typing and time.
      .

I typed:
      fs0:
      cd EFI/mageia
      grubx64.efi
As shown in the screen below:
      Image

Then he opened the boot correctly:
      Image

But gave a new error message:
      Image
      Stopped in: "Loading initial rampdisk

So I have disabled the I/O APIC, as seen in the image below, and it worked:
      Image

      Image

After Mageia 5 KDE boot, I could see that the app efibootmgr was automatically installed with the installation of Mageia 5.
      Image


      Image

It has several tips on tips Mageia wiki page about how to use Efibootmgr. It is a popular tool to manipulate the EFI settings in order to create and manage boot entries that are capable of booting Linux (or other operating systems).