• Fix very damaged UEFI boot?

    Home » Forums » AskWoody support » Windows » Windows 10 » Windows 10-other » Fix very damaged UEFI boot?

    Author
    Topic
    #2394120

    The short story version is:  Both my Dell Laptop NVMe drives had the UEFI boot sections very damaged.  Of course, I want to restore the system drive, rather than do a fresh install, but the basic repairs have not worked.  I have tried the Windows disk “repair”, many of the “bootfix” type of command line entries and restore to previous working state.  Nothing worked.

    Now, I have done a fresh “Dell” install on one of the drives and it runs well, but it has none of the many additions added over the past year.  The other drive still has most everything on it, but will not boot.  I’m guessing that the UEFI boot partition(s) is damaged.

    So, my dumb question is:  Is it possible to transfer some of the good boot info from the restored drive to the other drive?  From there maybe some final repairs would work.  Or are there any other ideas for using the restored drive to fix the damaged boot on the other drive?

    Getting that drive working again would save me about 2 weeks of installation work!

    Thanks,  Richard

    Viewing 6 reply threads
    Author
    Replies
    • #2394158

      Put the original Dell drive back in, unplug the other drive for now..

      boot a recovery media and open command prompt (you may need to provide bitlocker detail here in which case if you haven’t that detail you’re stumped.)

      Open diskpart

      Hopefully (if you’re really lucky..) both of the sets of tasks below succeed:

      select disk 0

      select part 1

      assign letter = s

      select part 5

      assign letter = r

      rescan

      exit

      If the commands above worked and your machine is fairly recent, having a recovery partition as partition 5 then you now have a drive r:, and hopefully the following commands will illuminate the archives there:

      dir r:\*.wim /s

      dir r:\*.swm /s

      SWM archives are images which effectively split WIM archives or “updates” added to them. They’re seldom needed for the boot as its below 4gB so you might find a file “boot.wim” or similar which is NOT located in the r:\sources folder. That being the case there is hope.

      dir s: should hopefully show that is “empty” from a CMD prompt.

      Dir c: should show your Windows drive.

      The following should capture the mess to an archive should you need to revert but to be hones this is just an example you might use..

      dism /capture-image /imagefile:c:\bustboot.wim /capturedir:s: /name:name

      The method you then be to FORMAT the S drive. On newer machines you have to use diskpart to do this due to the security policies so be damn sure you’re working on the right partition. Let’s assume we found S:\Dell\Factory\Boot.wim..

      DISM.exe /Apply-Image /ImageFile:S:\Dell\Factory\Boot.wim /Index:1 /ApplyDir:R:\

      Note there are no spaces after any colon in these commands..

      If that didn’t work OR you didn’t find a suitable archive or recovery partition then hopefully you can work out how to back up the “good” boot partition  and then imaging it to your old disk. The hard part being determining the recovery media drive- it’s NOT drive x:, which is a ramdisk. NOTE you will still need to repair the boot, as the GUID of the old Windows partition will be  different but Windows can usually fix that, then you just need to use BCDedit to delete the superfluous entry firing the boot menu..

      Sorry got to dash – hopefully this helps, I’ll look again later..

    • #2394245

      Sorry – I’ve got back to find a typo – not that if you’re following what I was aiming for it isn’t obvious… In the section below I reversed R and S.. R=recovery, S=system (ie, boot)

      Let’s assume we found S:\Dell\Factory\Boot.wim..

      DISM.exe /Apply-Image /ImageFile:S:\Dell\Factory\Boot.wim /Index:1 /ApplyDir:R:\

      should read

      Let’s assume we found r:\Dell\Factory\Boot.wim..

      DISM.exe /Apply-Image /ImageFile:r:\Dell\Factory\Boot.wim /Index:1 /ApplyDir:s:\

      OK, back to the chase.. to transfer a new boot.. if you have nothing else to restore

      use diskpart as above with the working drive in, work out which is your recovery drive (let’s say it ends up as e:) and just capture an image to that drive:

      to transfer to usb:

      dism /capture-image /imagefile:e:\myboot.wim /capturedir:s: /name:name

      repeat the boot and diskpart process with the old drive, check the recovery USB is on drive E (and adjust according if not..)

      To load to a formatted S drive (from drive e:, as before) :

      DISM.exe /Apply-Image /ImageFile:e:\myboot.wim /Index:1 /ApplyDir:s:\

      reboot, let the boot fail, and reboot to Windows repair which should sort out the issue to get the machine started. in an elevated CMD type bcdedit /enum > temp.txt, then notepad temp.txt. One entry there will lack “device” and the identifier will probably not be {current} – copy the GUID (ResumeObject) for that item and issue a bcdedit /delete {GUID} – paste the GUID in by edit,paste from the menu (icon top left of window..)

      If this doesn’t work double check the “working” drive is UEFI partitioned (that is to say has the MSR partition, which shows as “reserved” in diskpart) as if your new drive is partitoned as MBR for some reason Windows will be on partiton2, not partition 3.

      If you only really want your documents and there aren’t masses of them the other option is to install both drives (A USB caddy should work even with a laptop) and use DISM to capture the users folder from the old drive to an image on the new. in doing this be aware DISM will capture the all the file attributes so you can’t just dump it in a data folder – place the data it in a folder within a folder so you can work with the security. Also be aware you can’t just replace the existing users folder as the user registries are in there and doing so will break the installation.

       

      • #2394265

        oldguy,

        I truly appreciate the advice.  I will try the Cmd line entries you suggested.  Some of the previous commands, I tried, rejected, with a response like “not authorized” or similar.

        I found a backup of this same drive from a year ago that might be of help.  That backup would only be useful for the boot sections, since it does not contain any of the programs that I am trying to restore.  Your suggestions might do the trick there.

        Richard

    • #2394261

      For Windows boot issues, I have always found that the Macrium Reflect rescue media is much more reliable than Windows’ repair tools to fix boot issues.

      You can download Macrium Reflect’s free edition, install that on the PC of your choice (it need not be the one you are trying to rescue), and then have that create a rescue USB drive (or optical disc, if you prefer). Then boot the media you just made and select the option for repair Windows boot issues (I am not sure where it is in the rescue UI, but it’s in there… how soon I forget!), and generally this will correct the boot issues that the Windows repair tool can’t.

       

      Dell XPS 13/9310, i5-1135G7/16GB, KDE Neon 6.2
      XPG Xenia 15, i7-9750H/32GB & GTX1660ti, Kubuntu 24.04
      Acer Swift Go 14, i5-1335U/16GB, Kubuntu 24.04 (and Win 11)

      • #2394266

        Thank you.  I’ll check it out.

        I tried another popular boot repair, only to find out it will not do UEFI drives.  UEFI seems to be a problem for the repair disk people (and me).

        Richard

    • #2394373

      The problem with Windows repair is it tries to fix the existing files by updating the information.

      To that end if you start with a transferred boot and it’s being obstinate, if you actually delete the BCD file and go through the bootrec /fixmbr , bootrec /rebuildBCD , bootrec /scanOS route to get the configuration store straight then the machine should boot.

      (https://support.microsoft.com/en-us/topic/use-bootrec-exe-in-the-windows-re-to-troubleshoot-startup-issues-902ebb04-daa3-4f90-579f-0fbf51f7dd5d)

      Are you sure your machine isn’t getting as far as producing the “winload.efi is missing or corrupt” message, which is the hand over point to Windows on the C drive as you use it – that is to say, at that point the BCD information has been read and the hook misses its target. That could be a problem with the C drive file system, the mentioned file being as indicated. There were a few supporting files for Windows 7 but it seems none for Windows 10. To be honest I personally have only seen the “black screen” boot fail (and I’ve seen a few.) A give away to Windows getting past that point is you can copy out and open the event logs (and  can I remember where they are? No. It’ll come back to me hopefully..) and see progress.

      I’m wondering if your BIOS settings have somehow changed altering the way the machine starts (the new install booting fine as that was the state of things when it came out of its box..) . It might be worth revisiting the BIOS to make sure UEFI, secure boot, TPM and SMM (if present) are enabled and if not write the settings down, enable them, and retry the repair on the non boot drive and see how that fares..

      The only way I can think you’d have troubles with “authorisation” is if the destination for unpacking an image isn’t blank or if a policy stops you using format to achieve that. I assume you are actually trying these from a recovery disk, as using the in box repair means Windows file protection is still operating to a degree.

       

    • #2394424

      Sorry had to do something but the diversion has refreshed my memory..

      Windows logs are in C:\Windows\System32\winevt\Logs – system.evt being a good one to start with. If anything much has been written then Windows is in fact trying to start and failing past the boot. Unfortunately ntbtlog.txt seems to have gone as a tool- though I guess you might be able to turn it on through the advanced options?

    • #2394440

      oldguy,

      After much testing and applying the EFI and MSR repairs, I’ve came to the conclusion that it is the hand over to the windows system that is the problem.  I tried to get the “Macrium Reflect” repair tool, but they never sent me the email link for it.  Maybe they’re slow today.

      Anyway, It seems like the windows drive doesn’t want to get fixed, so I have reloaded Windows from the Dell repair download.  Now I’ll have install all those programs again. Oh well.  If I  had done that in the beginning, I’d probably be done by now.

      I have always had access to the files on the 512GB NVMe drive, so I was able to get all photos, documents, music, etc and transfer all to the fresh install drive.  It’s just that the 512GB drive will not boot.  I also “went for broke” and got another Samsung 980 NVMe 1TB for the backup drive in the laptop.  The boot drive is the Samsung 970 Evo NVMe 1TB.  All is good with that setup.  I have found that both of these drive desperately need heatsinks.  With heatsinks they run 40*F below the limit temp of 185*F.

      I still have the damaged 512GB NVMe drive intact and may mess with it via a USB dongle, after I update the renewed system.

      THANKS, oldguy and Ascaris for your support.

      Richard

    • #2394577

      EasyUEFI has all the tools you need https://www.easyuefi.com/index-us.html

    Viewing 6 reply threads
    Reply To: Fix very damaged UEFI boot?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: