13

Can I erase all partitions on my computer, including EFI, and install only Ubuntu? Will the BIOS work in this case?

I'm currently in legacy mode and Ubuntu boots from an USB key.

5 Answers 5

14

The question uses some terminology incorrectly, which can lead to confusion and problems down the road, so I want to address these issues first.

The Extensible Firmware Interface (EFI), or its 2.x version, the Unified EFI (UEFI), is a type of firmware. The EFI is not a partition. That said, there is a partition called the EFI System Partition (ESP), which holds boot loaders. Chances are that lapisdecor meant "ESP" rather than "EFI" in the original question.

Also, the EFI is a type of firmware that replaces the older Basic Input/Output System (BIOS). As such, if your computer uses an EFI, it does not have a BIOS. There are, however, some caveats and exceptions. Most commonly, EFIs provide a feature called the Compatibility Support Module (CSM), which is a sort of BIOS emulator; the CSM is to EFI like what dosemu is to Linux, in that it enables a newer and more sophisticated environment (EFI or Linux) to run programs designed for an older and simpler system (BIOS or DOS). In other words, "BIOS" in the original question should be "EFI." That said, using "BIOS" in place of "EFI" is a common practice. It's a bad one, but it's common, both among users and among manufacturers. I suspect it's done because people know (more or less) what a BIOS is, whereas "EFI" is an unfamiliar acronym; and since EFI replaces BIOS, using "BIOS" makes the job easier for copywriters. The trouble is that people then drag all their BIOS knowledge up when they read "BIOS," but much of it is inapplicable. EFI boots in a very different way from BIOS, so if you think of EFI as being an enhanced BIOS, you'll have a mental model that's very wrong and you'll make mistakes. Then people like me end up spending a lot of time explaining how it all actually works -- but I digress....

Moving on to real issues: If you're "in legacy mode," that just means that your CSM is active. This does not guarantee a boot in BIOS/CSM/legacy mode, though. On most EFI-based computers, when the CSM is disabled, the boot path is relatively simple; you can boot only EFI-mode boot loaders. Note that you can't "disable the EFI"; the EFI is the firmware, and it's in charge of the computer. Some computers do enable you to disable the ability to boot in EFI mode, but such options are rare -- and some computers provide interfaces that make it sound as if you're disabling EFI-mode booting, but you really aren't. When you activate the CSM, most computers enable either type of boot loader to run, which makes it impossible to predict what will happen when you feed the computer a disk that provides both types of boot loader. This isn't normally a big deal for a single-boot computer; when you install the OS, the installer will detect its boot mode and install the boot loader only for the installer's boot mode, so the computer can boot from the hard disk only in that same mode. If you multi-boot, though, you can easily install one OS in one boot mode and the other OS in the other boot mode. The hair-pulling begins at this point.

In the not-too-distant past, EFI-mode booting was an exercise in frustration because of bugs in EFIs, bugs in boot loaders, and misinformation, which often made enabling the CSM appealing. Today, though, EFI-mode booting poses fewer problems, and my estimate from questions posted here and elsewhere is that the biggest single problem area today is from activated CSMs. Thus, I recommend that the CSM (aka "legacy boot") be disabled on EFI-based computers unless you have a good reason to enable it. To be sure, EFI-mode booting today poses more challenges than BIOS-mode booting did five years ago; but on an EFI-based computer, BIOS-mode booting creates pitfalls that didn't exist five years ago.

So, that long-winded stuff out of the way, let's get back to your original question, re-phrased slightly:

Can I erase all partitions on my computer, including ESP, and install only Ubuntu? Will the EFI work in this case?

Yes and yes.

After you erase your partitions, the Ubuntu installer will create new ones if you select an automatic partitioning option. If you partition manually, you'll need to create appropriate partitions. These may include an ESP if you install in EFI mode or a BIOS Boot Partition if you install to a GPT disk in BIOS mode.

One important caveat is that it's best to use GPT when installing in EFI mode and MBR when installing in BIOS mode. Ubuntu permits using GPT in BIOS mode, but this can create problems on some systems, so I recommend avoiding it if possible. Some people have managed to install to MBR disks in EFI mode, too, but the installer tries to avoid this if possible; and when it's done, it often creates problems.

In Ubuntu, you can determine your boot mode by looking for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode.

In sum, you should be aware of your boot mode (BIOS/CSM/legacy or EFI/UEFI) and your partition table type (MBR or GPT), and ideally you should match the two appropriately (BIOS/MBR or EFI/GPT).

0
8

Yes, when you completely erase the disk, you can install ubuntu as the single operating system.
When you can disable UEFI in BIOS (mostly you can) you even can install ubuntu in mbr mode.
Boot from ubuntu install media, open GParted and create a new partition table - choose mbr.
In case you can not disable UEFI and/or secure boot you as well can install ubuntu in EFI mode.
Then the installer will create a new EFI partition where the GRUB boot loader will be installed.

2

You question is not completely clear to me.

If you want to install Ubuntu in UEFI mode here is what you need to do :

You will need to set your BIOS in UEFI mode and to create an UEFI bootable Ubuntu USB key.

Follow this guide to create a UEFI bootable USB. Then simply run the Ubuntu installer ; at step Installation Type, select Something Else and partition your disk as explained in this answer.


If boot mode (UEFI or Legacy) does not matter for you simply install Ubuntu as usual. (Refer to this guide if needed)

2
  • Do I need to keep UEFI mode? Can't I just have legacy?
    – lapisdecor
    Oct 6, 2015 at 13:23
  • You need to keep UEFI mode only if you want to install Ubuntu in UEFI mode.
    – hg8
    Oct 6, 2015 at 13:30
0

I have EUFI boot on my machine. 1x256GB SSD running 18.04 Clean "erase disks" option used during install.

Here is my output from lsblk

sda                     8:0    0 238.5G  0 disk 
├─sda1                  8:1    0   512M  0 part /boot/efi
└─sda2                  8:2    0   238G  0 part 
  ├─ubuntu--vg-root   253:0    0   237G  0 lvm  /
  └─ubuntu--vg-swap_1 253:1    0   976M  0 lvm  [SWAP]

Is this ideal? I am running 18.04 exclusively on my PC. sort of like the above question. I assume the 512M sda1 here is needed? As opposed to installing somehow so that all i have is 1 sda1 partition using the whole disk? you can see I chose LVM on install as well so i can play more after install.

If there is a way to have only 1 partition would my boot be faster? or would I brick my PC or be unbootable without this EUFI partition?

Ryan

1
  • 2
    Please post this as a new question so others can help you.
    – ptetteh227
    Apr 28, 2018 at 17:55
0

WARNING: This will erase data.


I had to recreate the partition table. Create a new GPT partition table in GParted (MSDOS will not work).

This will flag the sector as damaged and it will not be used.

3
  • 1
    This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review
    – stumblebee
    May 6, 2018 at 3:24
  • @stumblebee It looks OK to me.
    – karel
    May 6, 2018 at 3:25
  • 1
    @karel imho it seemed roundabout and duplicate of the top 2 answers.
    – stumblebee
    May 6, 2018 at 3:50

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.