19

I was installing Ubuntu by switching off fast boot and secure boot, keeping the mode in UEFI, and then booting into Ubuntu via USB.

But, every time I install it and run this command:

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

It always shows BIOS, please provide some suggestions how to force the installation in UEFI mode.

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Thomas Ward
    Jun 22, 2017 at 15:49

2 Answers 2

30

In brief:

  • Use a 64-bit Ubuntu -- The vast majority of EFI-based PCs use 64-bit firmware, and Ubuntu is set up in such a way that you can only install a 64-bit Ubuntu on such systems -- at least, by default. (It's possible to jump through hoops to install a 32-bit Ubuntu, but there's seldom any reason to do so.)
  • Disable Fast Startup and Hibernate in Windows -- These Windows features are likely to cause filesystem damage in a dual-boot environment, so they must be disabled. See here and here for information on doing so. Note that the Windows Fast Startup feature is entirely separate from a feature in many EFIs with a similar name. Disabling the EFI feature is seldom necessary (but sometimes it is). It's unclear from your description whether you've disabled the Windows or the EFI feature. A failure to disable these features will not have caused the problems you've encountered, but will cause problems down the line, so you should deal with them now.
  • Disable BIOS/CSM/legacy mode in your firmware -- In most (but not all) EFIs, this option, if active, makes it possible to (but not certain that you will) boot in BIOS mode. Completely disabling this option usually (but not always) prevents booting in this mode. Naming of the CSM feature varies from one system to another. Usually it's a feature you must disable; but in some cases you must instead set the boot mode to "UEFI only" or something similar.
  • Prepare the boot medium properly -- If you use a tool to turn a .iso file into a bootable USB flash drive, that tool might or might not copy the EFI boot loader to the USB flash drive. Even if the EFI/BOOT/bootx64.efi file seems to be present, an EFI might not like some detail of how the USB drive was prepared (like its partition table). Trying another tool may be necessary. Rufus generally does a good job of this. I provide additional comments on this at the end of my CSM page, referenced below.
  • Use the appropriate boot option -- In many cases, you'll see two boot options for an external boot medium in the computer's boot manager. One of these options includes the string "UEFI" and one doesn't. Pick the one that includes the "UEFI" string; if both are present, the other one is likely to boot in BIOS mode.
  • Use "Something Else" -- In many cases, once you get the installer to boot, the "install alongside" options are missing from the Ubuntu installer's menu. This is simply a limitation of the installer, and you must use the "Something Else" option (as described here) to work around this problem.

Note that disabling Secure Boot is seldom necessary. Ubuntu supports Secure Boot, and it normally works fine. There are rare cases of incompatibility because of bugs in the EFI and/or in an Ubuntu component, but these normally cause the Ubuntu installer to fail to boot. Secure Boot can also complicate use of some third-party drivers after booting.

For more information on this subject, I recommend you read:

3
  • Thank you so much for such an elaborated and detailed answer.I have previously installed Ubuntu on another machine but the same failed here,that's why asked.
    – ssharma
    Jun 22, 2017 at 17:28
  • Just one thing more,while using Rufus,file system:FAT32,partition:GPT,bootable disk using:FreeDos.Are these details correct?
    – ssharma
    Jun 22, 2017 at 17:31
  • Those options should work; however, there are quirky inconsistencies in what different machines require, so I can't promise anything for your computer.
    – Rod Smith
    Jun 22, 2017 at 17:36
12

I spent a whole day trying to figure out what to do, I tried all possible combination in my BIOS setup and it didn't work.

Then I read in some forums that Windows program Rufus, can create an Ubuntu bootable USB with the UEFI setting enabled.

When trying to create the bootable USB, I opted for GPT instead of MBR (you'll see the setting when you'll see the Rufus GUI).

That did the trick!

1
  • 1
    I fought with my Asrock mobo forever on this! Ubuntu's own documentation recommends Etcher, but after installing ubuntu in every way possible with Etcher, using Rufus was the thing that made it bootable! Jan 20, 2021 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .