14

I'm trying to install Ubuntu 14.04 and it pops up a message saying:

The attempt to mount a file system with type vfat in SSI1(0,0,0),partition#1(sda)at/boot/efi failed

Can someone help please?

Zanna
  • 70,465
carlos
  • 149

16 Answers16

15

I had exactly the same problem today while installing Ubuntu Server on a UEFI machine. I received the following message:

The attempt to mount a file system with type vfat in SCSI1 (0,0,0), partition #2 (sda) at /boot/efi failed.

I created an EFI partition and a normal linux partition on a USB disk with the gdisk command. fdisk -l gave the following result for the disk:

Device       Start     End Sectors  Size Type
/dev/sdc1     2048 1050623 1048576  512M EFI System
/dev/sdc2  1050624 7831518 6780895  3.2G Linux filesystem

I then tried to mount the EFI partition with mount /dev/sdc1 /test/, but got the following response:

mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

I also tried mount -t vfat /dev/sdc1 /test/, but received the same response. I then formatted the EFI partition with mkfs.vfat /dev/sdc1. I then tried to mount the EFI partition again with mount /dev/sdc1 /test/. It worked perfectly.

My conclusion is therefore that the Ubuntu Server installer needs the EFI partition to be formatted when it tries to mount it to /boot/efi.

Zanna
  • 70,465
johzi
  • 159
  • 1
    Yep, encountered on ubuntu Server installer. Had to do mkfs.vfat -F 32 /dev/sdX1 (where "X" is my drive letter) before running installer again. Used a clonezilla usb flash disk to run mkfs.vfat, parted, etc – Donn Lee Sep 27 '18 at 00:45
  • Just to add, running that command and then booting into the installer again worked. I did not have any issues after this. – iopq May 15 '19 at 11:22
  • This helped on Kubuntu 18.04 too. – Michael Jun 27 '19 at 09:08
  • I used this sulution for my focal fossa install as well. So I formated the partition to fat 32 prior to new installation attempt and it worked asap. – Slaughterfish Mar 06 '21 at 16:01
  • elementary os hera 5.1 didn't support direct formatting of the efi partition during the installation , so i had to delete the efi partition entirely and leave it as an assigned free space , then go on as if i were to continue the installation , then i turned off the computer , booted it back again and assigned the free space to a new EMPTY efi partition . – xquilt Jul 09 '21 at 19:53
  • Same on Debian 11 : EFI partition needs to be FAT formatted to be mounted on /boot/efi – ChennyStar Mar 10 '23 at 08:07
4

I had my first partition intended for the UEFI partition, and it was 100MB and type ext4. I got this error you got too, and I have secure boot and fast boot enabled in my BIOS/UEFI settings. My fix was to simply use gparted to delete that 100 MB partition and then when I did the Ubuntu 18 install I chose "Something else" and at that point dedicated the 100 MB partition for the UEFI boot stuff. It then formatted it for me and it worked!

Summary for me: don't have it pre-formatted as ext4. Instead, leave the empty 100 MB or so there for the UEFI boot partition, but let the Ubuntu installer partition and format it.

For all other partitions it was ok to have manually done them before-hand via gparted, and I did not have to turn off fast boot or secure boot in the BIOS/UEFI settings. Note, however, that I do NOT have Windows installed on this machine: it is Ubuntu 18 only.

3

In the 'try ubuntu' desktop, open the command line and run the command : sudo mkfs.vfat /dev/X where X is the name of the efi partition. You can get the name of the partition using: sudo fdisk -l (the word 'efi' appears before the partition name).

3

It's quite possible that you're seeing the effects of the Windows "Fast Startup" feature. This feature turns shutdowns into suspend-to-disk operations, which means that filesystems Windows has mounted (potentially including the EFI System Partition (ESP), which Ubuntu mounts at /boot/efi) may appear to be damaged in Ubuntu, and may not mount correctly. The solution is to disable Fast Startup in Windows. Note that the Windows Fast Startup feature is entirely separate from a feature that probably has a similar name in the firmware. The firmware feature is much less dangerous, although it will sometimes interfere with the computer's ability to boot from a USB flash drive, so it may need to be disabled to get the installer to boot.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
1

Building on Arian S's answer:

  1. Go to Try Ubuntu Live.
  2. Go to GParted with Live Ubuntu.
  3. Delete all partitions and click Apply.
  4. Close GParted, and click the Install Ubuntu icon on your desktop.

The above did the trick for me.

1

I reformatted my main partition as ext4.

Went into terminal with ctrl alt f1

Then formatted the partition

sudo mkfs -t ext4 /dev/sda2
Zanna
  • 70,465
  • That worked for me: I struggled for two days before using your solution. I still do not know WHY this was necessary! – user3038572 May 16 '21 at 01:06
0

This happens apparently because the alternative server installer doesn't try to format the EFI partition for you. If you go BACK a couple times, then look at the bottom of the list of install actions you can drop to command line. Do so.

Check that your device is the one you think it is (mine was /Dev/sda1 for EFI and /Dev/sda2 for data). You can test mounting them in empty folders with: mkdir test mount /dev/sda1 test ls -al test umount test

The broken one won't mount at all. Fix it with: mkfs.fat16 /dev/sdX1 (substitute proper device here)

Then type 'exit' and continue the install.

0

the solution is very simple..

  1. Go to GPARTED with Live Ubuntu.

  2. Look at Your Partition on Your USB Drive.

  3. There must be EXT 4 on some part on Your Partition.

  4. Format that part into FAT 32.

  5. Close the GPARTED, and Click Install Ubuntu icon on Your desktop.

-PROBLEM SOLVED.

0

In my case not selecting LVM just worked

Dawoodjee
  • 681
0

All above solutions cannot solve the same problem to me. Finally I have found that the HDD disk (machine contains two disks: Sata and HDD) is still remaining files of Windows OS. So I suspect it is the raeson of warning accurance. And then I use the command dd if=/dev/zero of=/dev/sdX bs=512 count=1 (X means the given letter represents HDD) to clean the data.

At last I follow the Zana's answer using mkfs.vfat /dev/sda1 to format efi partition, it eventually worked.

0

Here's what worked for me (with much thanks to all the other answers):

  1. Boot into a live USB Linux session, such as the "Try Ubuntu" option that comes with the Linux installation package. I used Boot-Repair-Disk live USB.

  2. Open a utility such as Gparted, KDE Partition Manager, or other partition manager. I used Gparted.

  3. Identify the EFI boot partition. On my computer this partition was named dev/sda1, it was 100MB, and it was NTFS. It was labeled "System Reserved" and flagged "boot,esp"

  4. Use partition manager to reformat the efi boot partition to a Fat 16 or 32 system and set flags to "boot,esp".

  5. Shut off computer.

  6. Install Ubuntu no problem.

hoatzin
  • 568
0

I've had this problem before and it's quite frustrating when you're on the move especially, but through watching a couple of videos that were leading to nowhere I found a solution for this problem.

  1. Format all your partitions into free space.
  2. Create a new efi partition.
  3. Create a new ext4 partition.
  4. Install on the ext4 partition.
karel
  • 114,770
Esad
  • 1
0

I was having same problem installing 22.04 on to an empty new hard drive I put in my son's abandoned desktop . Cured it by ENABLING IOMMU in the Bios on a gigabyte motherboard.

0

There could be some issues due to efi

  1. Initially "Try Ubuntu Live" session rather than "install Ubuntu".
  2. Go to default GParted in Live Ubuntu.
  3. Select and delete all partitions and click Apply.
  4. Close the GParted, and click the Install Ubuntu icon on your desktop in the same session.
  • The above worked for me.
drsisu
  • 29
0

For my case, the BIOS settings are preventing the installer from accessing the EFI System Partition (ESP). I need to disable Secure Boot, Fast Boot, or other features that interfere with booting from USB

Rithy
  • 1
0

it sounds like you are getting a read error on either the hard disk or the cd, if you are confident the hard drive is fine then you can try burning another dvd and if that does not work it means you probably have a bad hard disk. If you can rule out either of those please report the bug on launchpad

sbergeron
  • 2,660