Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My computer has UEFI based BIOS and I want to start over from scratch.

The PC came with Windows installed - I later installed Ubuntu alongside.

I want to completely re-build my whole disk and install only Ubuntu on it.

So it is not about how to install Ubuntu, it is about how to prepare a disk.

What is the most professional way and which tasks will I have to perform?

share|improve this question
    
I assume you have gone through askubuntu.com/q/221835/158442? I'd say the simplest way is: enable legacy (BIOS) booting in UEFI, then install Ubuntu choosing the use entire disk option. – muru Mar 7 at 15:06
    
As I came across many questions on Ask Ubuntu concerning this topic, I made this Q+A with mainly new users in mind. :) – cl-netbox Mar 7 at 15:09
    
You should have added an answer to that Q then. This has already been asked: askubuntu.com/questions/420272/… – muru Mar 7 at 15:12
5  
Muru, if you want to boot in EFI/UEFI mode, enabling the Compatibility Support Module (CSM; aka "legacy boot support" or a similar phrase) is something you should almost certainly NOT do. See here for details on why this is the case. Two or three times a week, I answer questions from people who've bungled their installations because they've activated their CSMs. – Rod Smith Mar 7 at 17:24
2  
Muru, modern computers use EFI (or UEFI, which is EFI 2.x), so you can't avoid it. At best, you add complexity by enabling the CSM. Granted, the native EFI method of booting is different and unfamiliar to long-time BIOS users, but it's no harder once you understand it. If you understand neither BIOS nor EFI, you might as well learn EFI, since BIOS is a dead-end technology. – Rod Smith Mar 8 at 14:13
up vote 11 down vote accepted

The most convenient and reliable way to prepare a disk is using the GNOME partition editor. GParted is included in the Ubuntu installation media, but in some cases it is better to use the original. When you boot from the Ubuntu install media and you already have a swap partition,
the partition is mounted. Partition swapoff and unmount unfortunately does not always work.


Use GParted from the Ubuntu installation media ... in case it does not work you can
download GParted from the project website and create a bootable DVD/USB media.

Boot from GParted Live media, once on the desktop GParted opens automatically.
Choose the disk you want to work on from the application menu on the top right.

Click on DeviceCreate Partition Table → Select gpt → Click Apply

Click on PartitionCreate new Partition:
New size: about 300 MB - File system: fat32

Click on PartitionCreate new Partition:
New size: amount of RAM - File system: linux-swap

Click on PartitionCreate new Partition:
New size: minimum 20 GB - File system: ext4

Optionally create more partitions:

Click on PartitionCreate new Partition:
New size: arbitrary - File system: arbitrary

These partitions can be used to store the personal data that are separated from the system. Use ext4 when Ubuntu or other Unix/Linux based systems are the only systems that need to access them. When you want to make the data accessible to Windows as well, choose ntfs or fat32.

Click on Apply after checking that everything is correct, wait until GParted completed the tasks.

Right-click the fat32 partition → Manage flags → Select boot and esp.

Now close GParted, shut down the computer, remove the GParted Live media.


Presentation : How to set up a disk and create new partitions with GParted

Additional information concerning swap : Community Help Wiki SwapFAQ


Boot from Ubuntu installation media and select Try Ubuntu without installing.
On the desktop click Install Ubuntu and when asked, choose 'Something else'.

Select the ext4 partition you have created with GParted for Ubuntu before.
Select / as mount point and ext4 as file system ... start the installation.


Note:

Doing it this way has one big advantage: You decide yourself about the whole partition layout and can prepare everything for eventual changes being made in the future. The partition sizes are suggestions, users of course shall choose them fitting to their needs. What first looks a bit complicated, is once you have understood the systematic behind it and done it one time, easy.

share|improve this answer
2  
To summarise this overly-long answer: UEFI requires a FAT32-formatted partition with the boot flag activated. – muru Mar 7 at 16:20
    
This is way over-complicated. The installer can do it all automatically. – Andrew Medico Mar 8 at 3:13

You can do everything from inside the Ubuntu installer. The minimum effort option is to select one of the "Use whole disk" variants, which should already do the right thing.

If you want to customize the partition layout, you can use the partition editor inside the installation tool as well, the only important bit is that you need to keep one FAT partition for the EFI binaries. This can be fairly small, since all that really needs to fit is three kernels (backup and running, and enough space to install updates), but unless space is really tight, 256 to 512 MB is a good value.

Last but not least: Ubuntu can only install an EFI bootloader if the system was booted in EFI mode, because the BIOS compatibility layer does not allow access to the boot menu, so the bootloader cannot be registered.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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