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

3
+50

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 ;-).

3
  • 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 9: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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.