How can I install the "MBR" on a clean Hard Disk?

12,695

Solution 1

The screenshot that you provided shows that two partitions have a boot,esp flag, so something went wrong during the installation. If you had followed the linked Q&A - How to prepare a disk ..., it should have worked properly. Anyway, you are close to get it done and to make it more easy for you, I will provide you with individual instructions containing every important and necessary step.

  • Boot from the Ubuntu USB installation media (entry with UEFI in front) - select Try Ubuntu

  • On the Live desktop open GParted, right-click the swap partition (sda3) - click on Swapoff

  • Click Device in the top menu -> Click Create Partition Table -> Select gpt -> Click on Apply

  • Click Partition -> Create new Partition -> New size : 1024 MB | File system: fat32

  • Click Partition -> Create new Partition -> New size: 16384 MB | File system: linux-swap

  • Click Partition -> Create new Partition -> New size: remaining space | File system: ext4

  • Click on Apply button (green check mark) in the menu to apply the pending operations

  • Right-click the first partition (sda1) -> select Manage flags, then mark boot and esp

  • Close GParted - start the Ubuntu installation process - choose option "Something else"

  • Select the third partition (sda3) for Ubuntu - set / as mount point | ext4 as file system

  • Select /dev/sda as Device for boot loader installation ... start the installation process

  • Once finished shutdown the computer and remove the Ubuntu USB installation media.

Now Ubuntu should boot properly ... if not boot into BIOS and select Ubuntu as the default boot system. Here is a presentation I made which is showing the whole process -> Ubuntu installation
Additional information : What you wiped was not the "MBR" - it was the EFI partition of the disk. The EFI partition size of 1024 MB I suggested allows to add additional boot loaders ... if needed.

Solution 2

If you have no qualms about the disk being completely wiped, you should be able to go under device and select create new partition scheme. From there select MBR and apply changes. If your computer supports EFI, you can use GPT but it shouldn't make a huge amount of difference either way to you as an end user.

Share:
12,695

Related videos on Youtube

Duncan
Author by

Duncan

Updated on September 18, 2022

Comments

  • Duncan
    Duncan almost 2 years

    To get rid of Windows 10 I wiped the HDD using GParted on the Ubuntu 16.04 installation media. Accidentally I also wiped the "MBR", so that my HDD is absolutely clean. This means that nothing will boot. I can boot from an Ubuntu Live USB drive and install Ubuntu 16.04, but Ubuntu doesn't boot. I need to place the "MBR" back on the HDD, but I don't know how - I have tried to solve the problem by using the boot-repair-disk (ISO), but unfortunately it did not work.

    enter image description here

    Help would be greatly appreciated. Many thanks for your time. Sincerely, Duncan

    • Duncan
      Duncan over 7 years
      Many thanks for your response. 1) regarding EFI / GPT - I don't think a choice was offered; 2) here is a screenshot (hope you can read it):
    • Duncan
      Duncan over 7 years
      Many thanks for your response. 1) regarding EFI / GPT - I don't think a choice was offered; 2) screenshot - sorry, cant copy and paste the screen shot here - it just won't paste - so, allow me to describe: in Gparted there are 3 partitions: 1: /dev/sda1 Name: EFI System Partition, fat32, 512MiB, Used 4.61MiB, Unused: 507.34 MiB; Flags: boot, esp; Partition 2: /dev/sda2; no name; filesystem ext4; Size 1.8 TiB; Used: 33.81 GiB; Unused: 1.77TiB; Flags: none; Partition 3: /dev/sda3; Name: no name; File System: linux-swap; Size 15.96 GiB; Used: 0.00B; Unused: 15.96 GiB; No flags.
    • Duncan
      Duncan over 7 years
      You will see that I managed to work out how to paste the screenshot. Hope it helps. Many thanks for your time and help - much appreciated.
    • oldfred
      oldfred over 7 years
      Your choice of UEFI or BIOS install is only made when you boot from UEFI boot menu the flash drive or DVD. If booted in UEFI mode then the install will be in UEFI boot mode. Shows install with screen shots. Both BIOS purple accessibility screen & UEFI black grub menu screen help.ubuntu.com/community/UEFI & askubuntu.com/questions/743095/… & askubuntu.com/questions/353683/uefi-partitioning-for-dummies
    • Duncan
      Duncan over 5 years
      Many thanks to you all for your input. Unfortunately I could get none of the offered solutions to work - I'm sure the fault lay with me. Anyway, I did finally solve the problem by (after much trying) getting boot-repair-disk to work - I used a friends Windows 10 pc to download the iso and then created a startup disk using Rufus. I then loaded it through Bios and went into the "Advanced" options (in the boot-repair-disk program) - that did the trick. Once again, many thanks to you all for giving of your time and expertise so willingly. MUCH appreciated. Sincerely, Duncan.
  • Duncan
    Duncan over 7 years
    Thanks - but not sure what you mean by "go under" - go under what?
  • sbergeron
    sbergeron over 7 years
    Sorry, formatting meant that the symbols I used to denote the toolbar element "device" meant it disappeared here and probably has a zero character wide hyperlink or something there.
  • Andrea Simonetti
    Andrea Simonetti over 7 years
    He is telling you that you can make a new mbr from gparted.. It is an option between the topmenu entries.. You may find it "under" create a new partition table.
  • Duncan
    Duncan over 7 years
    Many thanks for your time and patience - I have created a new partition table with first MSDOS mbr and then gpt mbr - still won't boot up. Hmmmm - most frustrating. Perhaps I should just buy a new HDD.
  • sbergeron
    sbergeron over 7 years
    You've done that and tried installing ubuntu? Is it the disk or the installation that isn't booting now?
  • Duncan
    Duncan over 7 years
    The live Ubuntu usb stick boots just fine. However, after actually installing it (Ubuntu) it (the installed version) wont boot at all. Have also tried booting a boot-recovery-disk - won't boot at all. Strange.
  • Duncan
    Duncan over 7 years
    1. I booted up a live ubuntu USB stick; 2. Opened Gparted and erased everything; 3. Installed Ubuntu using (on separate occasions) first MSDOS mbr and then gpt mbr 4. removed the usb stick (i.e. live ubuntu) then rebooted - but won't reboot - black screen says "no OS found". I must've done this 30 times - this way and that way - to no avail.
  • Duncan
    Duncan about 7 years
    MANY thanks cl-netbox - much appreciated - please see my "answer your own question" below. Thanks once again for your generosity - greatly appreciated. Duncan
  • Rakesh Bhatt
    Rakesh Bhatt over 5 years
    Please rather add your thanks as an update or a comment to your question.
  • Duncan
    Duncan over 5 years
    Thanks - have done so. Is that why my comment (immediately above) was down-voted?