Windows 10: Command line to remove contents from an EFI partition

Discus and support Command line to remove contents from an EFI partition in Windows 10 Support to solve the problem; This computer has a working windows 10 professional version 1703 build 15063.296 now. Last month I had had a problem where I was unable to upgrade from... Discussion in 'Windows 10 Support' started by zbook, May 23, 2017.

  1. zbook New Member

    Command line to remove contents from an EFI partition


    This computer has a working windows 10 professional version 1703 build 15063.296 now. Last month I had had a problem where I was unable to upgrade from windows 10 version 1607 to version 1703 with error code 0xc1900200.

    To learn from this problem any information on how to use command line to remove specific folders within a partition (both hidden and not hidden is appreciated)

    On this computer there were two windows 10 version 1607 clean installs in March 2017. In April 2017 there was a failed to upgrade to windows 1703.

    There was a second problem that I had been working on with HP and that was about the bios UEFI hardwae diagnostic logs (extensive, loop until failure or component studies) were all disappearing from the UEFI log.

    It was unclear why a clean install of 1607 had adequate partition size but not free space within its partition after a clean install. Ordinarily when HP UEFI diagnostics are run within the bios a log is saved to EFI partition. However before and after the clean installs every UEFI diagnostic study indicated that it was saved after it was completed (both automatic and manual saves) but upon reboot and return to the bios UEFI diagnostics the logs disappeared. HP had indicated that if the log was filled with results it could exceed the size of the partition. Old logs would be saved but new ones would not be able to be saved. In this case there were no retained logs at all. HP had me download and install multiple times the UEFI diagnostics:

    HP PC Hardware Diagnostics | HP® Official Site

    Neither one nor multiple downloads worked to fix the failure to save log files.
    None of the HP reps were able to figure out what was happening. They did find one computer in their office that had a similar problem but had not troubleshooted it.

    This was the disk management after bios sanitization and legacy to UEFI changes and before windows 10 1607 to 1703 upgrade failure:


    Command line to remove contents from an EFI partition [​IMG]


    C:\$Windows.~BT\Sources\Panther was used to generate log files to troubleshoot the Windows upgrade failure.
    Analysis of the logs led to the report that the upgrade was seeking more free space than what was available in the EFI partition.

    2017-04-06 05:03:00, Info CONX CFreeSystemPartitionDiskSpaceChecker: checked InsufficientSystemPartitionDiskSpace, found HardBlock.Not enough space on partition [\\?\GLOBALROOT\Device\HarddiskVolume2\] Required: 15 MB. Available: 6 MB.

    Were the HP UEFI partition log problems and the failed Windows 10 1607 to 1703 problems related to the same partition? The EFI partition?


    The size of the partition appeared okay for the upgrade specfications. It was the free space within the partition that was insufficient. Per the link below within this partition were files for foreign language, font. Possibly the UEFI diagnostics too? It was unclear how to remove items from this partition. HP suggested using command line but they did not provide information on how they planned to remove the downloaded HP UEFI diagnostics (not available to uninstall via control panel).

    It was repaired using the information in this link (explorer.exe): https://support.microsoft.com/en-us/...ing-windows-10

    Was there an easy method using command line to uninstall the UEFI diagnostics folder? Using diskpart?
    Or was there an easy method using command line to uninstall the Microsoft language folders or font files?

    Backup files are highly recommended. If files were not backed up which method is considered safer explorer.exe or command line? Another option was to leave the contents of the EFI partition but enlarge its size. It was unclear whether this would place the nearby files at risk. It remains a learning experience for me as I need more experience in these areas.

    :)
     
    zbook, May 23, 2017
    #1
  2. Saltgrass Win User

    Formating Efi system partition as FAT32

    During an install you can remove all the critical partitions, of which the EFI System partition is one. You do not have to pre-format a drive during an install. Just remove the Critical partitions ( MSR, EFI, Recovery and OS)and leave unallocated space.
    The install will take care of the rest.

    You can delete the partition and use the Diskpart create partition EFI command with qualifiers, if necessary. If you have already created the partition, try using Diskpart from a command prompt (Shift+F10 during the install) and format.

    If you need to convert a drive from MBR to GPT or vice versa, you need to remove ALL partitions.
     
    Saltgrass, May 23, 2017
    #2
  3. SeaBee63 Win User
    System Image Backup Fails on Windows 10 - Error codes 0x80070002, 0x807800C5, 0x80780081, 0x8078004F

    Had the exact same problem to backup Windows 10 (Pro x64), both trying thru Control Panel or using this command line in PowerShell (started as admin, E: is the target disk):

    wbAdmin start backup -backupTarget:E: -include:C: -allCritical -quiet

    I finally found the solution on this thread: Windows8.1 pro system image backup cause error 0x807800C5 with 0x8078004F

    The problem was I had multiple disks on my system that had a EFI System (100MB) partition (C:, D: and ECommand line to remove contents from an EFI partition :). The second problem was that Windows Disk Manager didn't allow me to remove any of them ! Had to completely erase one of the disks (DCommand line to remove contents from an EFI partition :) by making a
    clean operation under diskpart (WARNING: don't do that if you don't understand how it works, this command line tool is really error prone, difficult to see what you are doing especially if you have two or more disks of the same size) as described here:

    How to delete a protected EFI disk partition with Windows 7, 8, or Windows 10 | WinAbility Software

    Then I recreated the D: partition on it, made a copy of E: to D: and finally cleaned/repartitioned E:

    Then, backup succeeded (EFI System partition (100Mo), C: volume and Recovery volume (450Mo)), with the only EFI System partition on C:

    Three things:

    - Microsoft should fix Disk Manager to allow destruction of EFI System partitions that aren't the one used to boot the PC!

    - Microsoft should fix backup to only take the EFI System partition used to boot when -allCritical is used

    - Perhaps some third party tools canc do that without destroying the disk content (losing 100MB of unused disk space isn't really a problem)
     
    SeaBee63, May 23, 2017
    #3
  4. WOT
    WOT Win User

    Command line to remove contents from an EFI partition

    Hi @zbook:

    I can't answer your question directly...

    But I can't see how you could identify the true partition occupancies from a view like this:

    Command line to remove contents from an EFI partition [​IMG]


    But I can see how one could determine the true partition occupancies from a view like this:

    Command line to remove contents from an EFI partition [​IMG]

    (screenshot from free minitool partition wizard)

    Good luck with your quest for a solution.

    Regards,
     
  5. cereberus Win User
    cereberus, May 23, 2017
    #5
  6. zbook New Member
    Hi Wot,

    That information from the Minitool partition wizard would have had the needed information to better understand what was happening.
     
    zbook, May 23, 2017
    #6
  7. WOT
    WOT Win User
    OK, good, at least I now understand a bit better.

    Thank you for your response.

    regards,
     
  8. dalchina New Member

    Command line to remove contents from an EFI partition

    Excellent analysis.

    It would have been interesting to see what would have happened had there been enough unallocated space on the drive. Would a second EFI partition have been generated- as happens with Recovery partitions?
     
    dalchina, May 23, 2017
    #8
  9. NavyLCDR New Member
    Macrium Relfect will not create an EFI System Partition from scratch. It will only repair the BCD of an existing EFI System Partition.

    In the tutorial, this screenshot will show the existing EFI System Partitions that are available to be repaired:


    Command line to remove contents from an EFI partition [​IMG]


    If there are multiple EFI System Partitions available, you can select which one you want to repair.
     
    NavyLCDR, Apr 4, 2018
    #9
Thema:

Command line to remove contents from an EFI partition

Loading...
  1. Command line to remove contents from an EFI partition - Similar Threads - Command line remove

  2. Is it safe to remove this "RST" entry from the EFI System Partition?

    in Windows 10 Gaming
    Is it safe to remove this "RST" entry from the EFI System Partition?: the output of `bcdedit /enum firmware` is the following: Firmware Boot Manager --------------------- identifier {fwbootmgr} displayorder {bootmgr} {eb730034-e0bc-11ed-94cc-806e6f6e6963} {f379c659-0d9c-11ee-94ff-806e6f6e6963} {eb73002e-e0bc-11ed-94cc-806e6f6e6963} timeout 0...
  3. Is it safe to remove this "RST" entry from the EFI System Partition?

    in Windows 10 Software and Apps
    Is it safe to remove this "RST" entry from the EFI System Partition?: the output of `bcdedit /enum firmware` is the following: Firmware Boot Manager --------------------- identifier {fwbootmgr} displayorder {bootmgr} {eb730034-e0bc-11ed-94cc-806e6f6e6963} {f379c659-0d9c-11ee-94ff-806e6f6e6963} {eb73002e-e0bc-11ed-94cc-806e6f6e6963} timeout 0...
  4. EFI Partition

    in Windows 10 Network and Sharing
    EFI Partition: Attached below is a screenshot of my disk managerI would like to make my C drive adjacent to the unallocated space so that I can expand the C drive into the 97 free gb. Is there a way I can move the EFI partition so that the C drive is adjacent to the unallocated space.Also...
  5. EFI Partition

    in Windows 10 Gaming
    EFI Partition: Attached below is a screenshot of my disk managerI would like to make my C drive adjacent to the unallocated space so that I can expand the C drive into the 97 free gb. Is there a way I can move the EFI partition so that the C drive is adjacent to the unallocated space.Also...
  6. EFI Partition

    in Windows 10 Software and Apps
    EFI Partition: Attached below is a screenshot of my disk managerI would like to make my C drive adjacent to the unallocated space so that I can expand the C drive into the 97 free gb. Is there a way I can move the EFI partition so that the C drive is adjacent to the unallocated space.Also...
  7. Remove Acronis folder from EFI partition

    in Windows 10 Support
    Remove Acronis folder from EFI partition: Hi , Acronis True Image gave me a lot of headache. I uninstalled it using revo uninstaller. However, when i use a partition master and explore the EFI folder. I can see a folder called Acronis. In this Acronis folder there are two files. Bootwiz.efi and Bootwiz.XML. Can I...
  8. command line directory contents

    in Windows 10 Network and Sharing
    command line directory contents: when I use 'dir' to see the contents of a directory, I have two subdirectories, one shows up as " <dir> . " and the next as " <dir> .. " What are these seemingly empty directories?...
  9. How to remove EFI System Partition

    in Windows 10 Ask Insider
    How to remove EFI System Partition: This problem did not exist before but I must have messed something up. How it looks currently: https://i.imgur.com/mXvgQBY.png How it used to look (from another pc): https://i.imgur.com/RuvuIWf.png Is there anyway to transfer the EFI things into the C drive? I have tried...
  10. Delete second EFI partition after removing Linux partition from dual boot

    in Windows 10 Ask Insider
    Delete second EFI partition after removing Linux partition from dual boot: [ATTACH] Hi, I've recently uninstalled Linux from my system by just deleting the volume from Windows 10's disk management utility. I tried to delete the second EFI partition I created during the Linux installation [twice - once Kubuntu and once Manjaro]. When I used...