0

I have Ubuntu 16.04. VM which is running in KVM. VM is using UEFI boot and it has /boot/efi defined in fstab

[19:40]Test*ROOT: ~ cat /etc/fstab | grep efi
# /boot/efi was on /dev/sda1 during installation
UUID=A095-115F  /boot/efi       vfat    defaults        0       1

I want to remove UEFI and put bios boot because AWS is not supporting UEFI. When I try to import VM from my local server it says:

ClientError: EFI partition detected. UEFI booting is not supported in EC2.

How to properly without deleting data from VM remove UEFI.

VM imaage type is qcow2.

Thank you

iWizard
  • 398
  • 2
  • 10
  • 26

1 Answers1

3

The most probably as UEFI is installed (grub-efi-*) the bios boot loader is not installed. You should install boot loader for bios boot (grub-installer, grub-pc-bin, may be some other) and set up the boot using grub installer and customize the parameters if needed.

Once everything is working (the easiest way is to try to boot locally with bios boot) you can easily remove the line from fstab and remove the partition. Optionally you can also remove grub-efi-* package(s). In case you would remove it directly you will not be able to boot it normal way.

I am not sure if it is still the case but it used to be that the boot loader has been installed based on how did you boot / start the installation process so once you boot into installation using UEFI the UEFI boot is set up and once you boot using bios boot the bios boot is set up on the system. So in the worst case try to install VM again but start installation process using bios boot instead of UEFI ;-).

Kamil J
  • 1,587
  • 1
  • 4
  • 10
  • thank you. I do not have option to start installation again because I have other VMs which I need to move to AWS :) ok for start how to install boot loader? – iWizard Jun 17 '19 at 09:55
  • once the packages are installed (**apt-get**, **aptitude**,...) you can run grub-install (I have *centos* and there it is available as *grub2-install*). You can see help with **-help** parameter. Anyway on ubuntu, there would be **boot repair** GUI command where you may be able to realize it in GUI... You can try even that ;-). – Kamil J Jun 17 '19 at 10:20
  • I will check your answer but there is a lot of stuff needed except what did you wrote – iWizard Jun 18 '19 at 10:26