Command line to remove contents from an EFI partition


  1. Posts : 41,474
    windows 10 professional version 1607 build 14393.969 64 bit
       #1

    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-disk-management-after-bios-sanitization-legacy-uefi-change-before-attempted-upgr.png

    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.
      My Computer


  2. WOT
    Posts : 471
    Win 10 Pro 15063.332 (ex-Insider)
       #2

    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-screenshot-22-.png

    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-screenshot-23-.png
    (screenshot from free minitool partition wizard)

    Good luck with your quest for a solution.

    Regards,

    WOT
      My Computers


  3. Posts : 15,485
    Windows10
       #3

    Easy way is to delete efi partition using minitool partition wizard free and rebuild uefi boot files from scratch using Macrium Reflect Free

    Use Macrium Reflect Rescue Media to Fix Windows Boot Issues Windows 10 General Tips Tutorials

    Obviously make image backup of pc before attempting to do above just in case things go wrong.
      My Computer


  4. Posts : 41,474
    windows 10 professional version 1607 build 14393.969 64 bit
    Thread Starter
       #4

    Hi Wot,

    That information from the Minitool partition wizard would have had the needed information to better understand what was happening.
      My Computer


  5. WOT
    Posts : 471
    Win 10 Pro 15063.332 (ex-Insider)
       #5

    zbook said:
    Hi Wot,

    That information from the Minitool partition wizard would have had the needed information to better understand what was happening.
    OK, good, at least I now understand a bit better.

    Thank you for your response.

    regards,

    WOT
      My Computers


  6. Posts : 42,988
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    the upgrade was seeking more free space than what was available in the 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?
      My Computers


  7. Posts : 18,432
    Windows 11 Pro
       #7

    cereberus said:
    Easy way is to delete efi partition using minitool partition wizard free and rebuild uefi boot files from scratch using Macrium Reflect Free

    Use Macrium Reflect Rescue Media to Fix Windows Boot Issues Windows 10 General Tips Tutorials

    Obviously make image backup of pc before attempting to do above just in case things go wrong.
    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:



    If there are multiple EFI System Partitions available, you can select which one you want to repair.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:05.
Find Us




Windows 10 Forums