EFI Partition Mgmt

Discussion in 'backup, imaging & disk mgmt' started by TheRollbackFrog, Mar 26, 2024.

  1. TheRollbackFrog

    TheRollbackFrog Imaging Specialist

    Joined:
    Mar 1, 2011
    Posts:
    4,955
    Location:
    The Pond - USA
    After I dodged the bullet from that Microsloth WinRE partition change in Jan2024, I've been watching my UEFI-GPT disk layout a little more carefully than usual.

    All of a sudden, today, I noticed that I only have 1mB of space left in the DEFAULT 100mB EFI partition created from my July 2023 W10 build... I've never seen it that low, ever! Being a little concerned after the WinRE fiasco, I opted to extend my EFI partition by an additional 100mB... all went well.

    I then decided to find out what the heck was taking up all that space in the EFI partition. LIVE Windows would not allow me to mount it for perusing/editing purposes (after all, it is an EFI partition and normal users shouldn't be messing around in there).

    I then loaded up my fav tool-based WinPE. It also would not let me mount it for the above purposes. I then used my fav partition tool and changed the ID of the EFI partition to Basic DATA Partition, after that, WinPE Windows would allow me to mount the partition.

    Turns out it was full of BCD(<some sort of ID>).TM.blf and .regtrans-ms files... say What? I looked those up and basically they are BCD and REGISTRY change files for being able to revert changes, if necessary. They were dated from right after my build until a few days ago. Since I do mess with both my BCD and REGISTRY often, it appears there may be some limits to storing this stuff... I have no idea what happens if there's not enough space to accomplish a Windows update of this partition and I don't think I wanna find out (especially after the WinRE issue).

    I then deleted all of those FileSets up to the beginning of 2024, unmounted the partition, reset the partition ID back to EFI and reBOOTed the System... all went well. Normally, on Legacy-MBR Systems, this info is managed either in the Microsoft System Reserved partition, if one exists, or in the OS partition itself. In both of those cases, those partitions are quite a bit larger than the UEFI-GPT required EFI partition (usually DEFAULTs to 100mB on a clean install) which would not offer the scare this scenario did.

    My question is... do I mess around too much with my BCD and REGISTRY, or is there potential danger here with someone like me always tinkering? My expanded 200mB EFI partition should last me for a while, but does anyone know what happens when the EFI partition cannot accomplish a required Windows update?

    I'll be happy to listen to anyone with any knowlege or suggestion in this area.
     
  2. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,691
    Location:
    USA
    EFI partition should not have anything to do with Windows update. Unlike WinRE partition that contains a WinRE image that gets updated frequently, EFI partition only contains the bootloader and a pointer to your boot directory. It does not contain anything that needs to be updated regularly with Windows update.

    On a Windows only machine, when a fresh EFI partition is created, it only has an "EFI" folder containing folders labeled "Boot" and "Microsoft". The size is typically 27-29 MB. Sometimes you will have an OEM folder in there as well around 27 MB in size. So total around ~50-54 MB. This size should remain fairly constant, if all you are doing is creating and deleting boot entries, even if you are installing multiple OS's. This why on a Windows machine the recommended size of the EFI partition is 100 MB.

    The only time its size increases is if you install a third party bootloader/boot manager. Or you have installed a Linux OS. Linux bootloaders are usually larger in size, and the recommended EFI partition size for Linux is between 260-512 MB.

    If all you have is Windows OS, and you are somehow running low in space, you can safely erase the contents of the EFI partition, and then either use Windows installation media, or any partition manager/imaging software's bootable media to recreate the boot files. It is usually labeled as "fix boot issues with your PC" or such.
     
  3. TheRollbackFrog

    TheRollbackFrog Imaging Specialist

    Joined:
    Mar 1, 2011
    Posts:
    4,955
    Location:
    The Pond - USA
    My apologies, I misspoke above and was not referencing the Windows update process... I know that has no effect on the status of the EFI partition (I hope:)). I was referring to Windows being the possible culprit that was putting those mentioned files in that partition. By that I meant its included apps (Regedit, etc.) that may be adding those files.

    In my BCD/Regedit processing I have only used REGEDIT, EasyBCD (adding WIMs only to the BOOT menu), VisualBCD (to straighten out EasyBCD entries due to a bug in the HP BiOS of this machine <and previous ones>) and System BiOS modification (changing search order only) to do my tinkering. Since the files found in the EFI partition are related to BCD and Registry changes, I assumed those apps must be doing the file addition... I don't know where else they would be coming from.
     
  4. TheRollbackFrog

    TheRollbackFrog Imaging Specialist

    Joined:
    Mar 1, 2011
    Posts:
    4,955
    Location:
    The Pond - USA
    I did have a 3rd party BOOTloader installed for a brief period of time (about 3-weeks for testing... didn't do much with it) then removed it. The files mentioned above in the EFI partition started before that BOOTloader was installed and have continued after its removal.
     
    Last edited: Mar 28, 2024
  5. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,691
    Location:
    USA
    @TheRollbackFrog,

    I use EasyBCD regularly, and it does not leave or write any files inside the EFI partition, other than editing your current boot manager to add/remove entries. EasyBCD writes everything else to "boot.sdi" inside a folder labeled "NST" on your C partition.

    Regedit also does not write anything to EFI. It only modifies your registry hive located in:
    "C:\Windows\System32\Config"

    So among the apps you mentioned, only VisualBCD is something that I have never used or installed on my system. It might be the culprit behind those files.

    If you only use the Windows boot manager, you only need the "Boot" and "Microsoft" folders inside the "EFI" folder in your EFI partition. You can safely delete everything else. Just make an image of your EFI partition before deleting anything, just in case. You can then keep an eye on your EFI partition to see which app is creating those files.

    If you have multiple folders in your EFI partition and/or if you are not sure which boot manager is currently in use, you can see the current boot manager path in EasyBCD -> View Settings -> Detailed (Debug Mode). It is typically:
    "\EFI\Microsoft\Boot\bootmgfw.efi"

    I hope this info was useful.
     
  6. TheRollbackFrog

    TheRollbackFrog Imaging Specialist

    Joined:
    Mar 1, 2011
    Posts:
    4,955
    Location:
    The Pond - USA
    @Raza0007 - thank you very much for the above information. BTW, all those "backup" REGISTRY and BCD files mentioned in the above post reside in the EFI/Microsoft/Boot folder in the EFI partition. I plan to make some changes in each of the above mentioned apps/BiOS to try and see where the files are coming from.

    I restored my EFI partition prior to my file edit to see when it all started and when it last occurred. It started 3-days after the System build in July 2023 and has continued until the end of February 2024... additions usually on at least a bi-monthly basis. Many of the ones left since the beginning of 2024 have occurred at scheduled imaging software run times... a surprise to me :confused:. I guess I need to look carefully at all this... the last thing I need is a 1gB or larger EFI partition to deal with:eek:
     
  7. moredhelfinland

    moredhelfinland Registered Member

    Joined:
    Mar 31, 2009
    Posts:
    358
    Location:
    Finland
    What i can recommend, is freeware im-partition resizer. I'm using it.
    And for free boot manager, which really helped me a lot(especially when dual/triple bootin win/lnx/haiku) is freeware BOOT-US.
     
  8. TheRollbackFrog

    TheRollbackFrog Imaging Specialist

    Joined:
    Mar 1, 2011
    Posts:
    4,955
    Location:
    The Pond - USA
    On System, my D: partition (not on my System disk) is nothing more than a basic DATA partition. BUT, whenever I add a WIM entry via EasyBCD (or even the 1st entry for that matter) to my BOOT menu, it creates the NST folder on my D: partition. Due to a BiOS bug on my HP System (not fixed to date), whenever I try and use a WIMfile or SDI file that is not on my System disk (any partition), the BOOT menu selection fails due to lack of a needed file, it appears that the BOOTmgr doesn't see any disk at that time except the System disk, almost like no disk discovery had been done prior to running the BOOTmgr (...o_O). I tried to get the EasyBCD folks to allow me to change where they were putting my SDI files, basically got very little response. So... using VisualBCD, I changed the SDI entries in the BCD to point to a hidden mini partition on the System disk that I relocated my needed SDI and WIM files to... all worked very well in allowing me to add WIM entries to my BOOT menu, although taking a few extra steps in doing so. That's what started my foray into VisualBCD, which allows me to do the editing I needed to do.

    From your comments on REGEDIT it looks as though VisualBCD is a good place to start looking...

    Edit: First of all, I uninstalled EasyBCD then re-Installed it. Now it uses only C: for the NST folder (same version as before... what?). I did some BCD mods with VisualBCD and no changes were made in my EFI/Microsoft/Boot folder (where all those other files were), so at this point I'm still stumped a bit.

    Any suggestions, greatly appreciated...
     
    Last edited: Mar 27, 2024
  9. whitestar_999

    whitestar_999 Registered Member

    Joined:
    Apr 1, 2010
    Posts:
    162
    How is it compared to minitool partition wizard free? Also, free version mention not having rollback-protection & winPE media so is it something to keep in mind.
     
  10. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,691
    Location:
    USA
    That EasyBCD issue was weird, but at least it is fixed now so thats good.

    About those log files. I found some .blf and .regtrans-ms files inside my "C:\Windows\System32\Config" folder, but I don't have them in my EFI partition. I don't know how those files ended up inside your EFI partition, since the EFI partition is not mounted, has no drive letter assigned to it, so it has to be some software on your system that can access and write to the EFI partition.

    You said the log files creation coincides with the scheduled run of your imaging software? Maybe investigate the imaging software, but why an imaging software would write log files to the EFI partition is beyond me!
     
  11. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,691
    Location:
    USA
    Thanks, for mentioning this. Looks like a decent boot manager. I will test it when I get the time.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.