• 2000009: Getting out of a no-boot situation after installing Windows updates

    Home » Forums » Knowledge Base » 2000009: Getting out of a no-boot situation after installing Windows updates

    Author
    Topic
    #166496

    2000009: Getting out of a no-boot situation after installing Windows updates

    by @MrBrian
    Published February 13, 2018 | rev 1.2.0

    Note: This method is available on Windows 7 and later Windows operating systems.

    Use the following method when Windows fails to start successfully after installing Windows updates. This method removes all partially-installed updates.

    1. Our goal in this step is to start the Windows Recovery Environment. There are various ways to do this. Do one of the following:

    a) Boot into Windows Recovery Environment by pressing F8, Shift+F8, or some other key. See section “Access the Windows Recovery Environment from the Advanced Boot Options” of Windows Recovery Options (Windows 7 / Vista) or Method 6 of How to Access Advanced Startup Options in Windows 10 or 8. This might not be possible to do for some operating systems unless you previously enabled it by following Noel Carboni’s advice in one of the comments or How to Enable or Disable Legacy F8 Advanced Boot Options in Windows 10.

    b) Start (or restart) your computer two or three times. If you see the Launch Startup Repair option, choose it, and then optionally press Cancel to cancel the Startup Repair, and then click “View advanced options […].”

    c) Boot into Windows Recovery Environment using Windows installation media. See section “Access the Windows Recovery Environment from Windows Installation Media” of Windows Recovery Options (Windows 7 / Vista) or Method 4 at How to Access Advanced Startup Options in Windows 10 or 8. See also: Create installation media for Windows.

    d) Boot into Windows Recovery Environment using a system repair disc. See What is a system repair disc and how to create one in Windows.

    e) Boot into Windows Recovery Environment using a recovery drive. See How to Create and Use a Recovery Drive or System Repair Disc in Windows 8 or 10 or Method 5 at How to Access Advanced Startup Options in Windows 10 or 8.

    2. Navigate within the Windows Recovery Environment until you find Command Prompt and click it to open a command prompt.

    3. In the command prompt, type

    dism  /image:d:\  /cleanup-image  /revertpendingactions

    and then press the Enter key and wait until it’s done. If you see error “Unable to access the image” then you’ll need to replace “d:\” in the previous command with a different letter such as such as “c:\” or “e:\” in order for it to work.

    4. In the command prompt, type

    exit

    and then press the Enter key.

    5. Restart your computer.

     

    Technical references:

    Getting out of a no boot situation after installing updates on Windows 7-2008R2

    Reasons for Reboots – Part 2

    Understand and Troubleshoot Servicing in Windows Server “8” Beta (contains more info about the revertpendingactions command)

    Understanding Component-Based Servicing

    Total of 32 users thanked author for this post. Here are last 20 listed.
    Viewing 26 reply threads
    Author
    Replies
    • #166515

      Thanks

    • #166588

      Thanks, MrBrian. That’s incredibly useful “how to” info in that scary moment when one finds oneself in a boot loop or hang.

      Something more that those who are now thinking ahead and anticipating problems might want to do, which is particularly helpful if running Windows 10 but gives a little extra control at startup with any Windows OS, is to set the system up to always show the Windows Boot Manager for a few seconds at startup.

      You can run the following commands in an elevated CMD prompt in Windows (i.e., before you have problems) to add a few seconds during the first part of bootup that will always give you the option of pressing F8 and getting directly into the Startup Settings menu.

      BCDEDIT /set {bootmgr} displaybootmenu yes
      BCDEDIT /timeout 5
      

      The following screen will thereafter be displayed for a few seconds right after your power on self test. Note especially the message “To specify an advanced option for this choice, press F8.

      WindowsBootManager

      Pressing F8 during the above countdown takes you to this screen…

      StartupSettings

      Pressing F10 at the above screen gives you access to this one more important option:

      LaunchRecoveryEnvironment

      I always set the above “show Windows Boot Manager screen” option on all my Win 7, 8.1, and 10 systems. It adds a few more seconds to your boot time, but gives you the option for control in that one time you might desperately need it.

      -Noel

      12 users thanked author for this post.
      • #166772

        I use a similar modification, Noel:

        bcdedit /set {default} bootmenupolicy legacy

        Hitting F8 during the boot sequence gives the same options, but it doesn’t ask me which of the following one versions of Windows I’d like to use first (which is redundant).   The very first option in the old-style list is “Repair your computer,” which is equivalent to the F10 “Additional options” – “Launch Recovery Environment.”  It’s two less drill-downs to get there, which isn’t really all that important, but every little bit of frustration I can omit when my system is malfunctioning helps a little bit.  Giving me a selection of one option just annoys me, and it manages to do it twice just getting to the WinRE!  (Why is F10 “additional options” instead of just binding WinRE to F10 in the first place, since there are no other options?)

        And as an added plus, the bootmenupolicy/legacy mod doesn’t add any wait time to the boot; if I want Safe Mode, disable driver signature, WinRE, etc., I just hit F8 as I always have in the past, and if not, it boots as normal.  I’ve read that it might not work if fast boot is on, but it never is on my systems.  Windows 8.1 boots so quick anyway that any additional time savings would be trivial.

        Since I dual-boot Windows and Linux, which means I use the GRUB bootloader to select an OS, it’s really simple to hit F8 at just the right moment.  I move the selection bar down to Windows 8, hold my other hand over F8, and hit {Enter}{F8} rapidly.  Works every time!

        Before the dual boot, I would simply spam F8 (hit it as many times as I can, rapidly) as soon as POST ended, which nearly always worked.  Asus was brilliant enough to choose F8 for their boot device override menu on my desktop motherboard(s), so hitting it a bit too early gets me that instead.  Not a problem, though, as selecting the default boot device and then hitting F8 again (in the same manner as with the GRUB menu) works nicely.

        Probably overthinking this just a little… heh.

        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)

        2 users thanked author for this post.
      • #167585

        Thanks for this golden nugget!  I added the BCDEDIT commands to my Win 8.1 and will add to the 10 systems as well. Yes, I’ve encountered those scary & panicky moments when you can’t boot or get into safe mode.  A flurry of crazy thoughts typically go through my head. I know I have the instructions how to get out of this mess in a notepad file on my desktop. Oops can’t boot to the desktop. If only I could remember where I put that rescue disk. Can’t I press some button and click restart? Should I start up and forcibly shut down the PC a certain number of times? Should I try to use the recovery thumb drive, hopefully successfully this time? Scary nevermore. 🙂

    • #166602

      Is DISM an available command on a Win7 Home system?

      CT

      2 users thanked author for this post.
      • #166607

        As far as I know if you can get “Admin” CMD prompt its entirely possible, never used Win 7 Home Vers. here. You probably already know any ways, but for those reading who may not,  Hit SHIFT-F10 on recovery\Install media at the first screen and it takes you to X:\ prompt and “et voila” DISM will bring you to a list of CMD’s .

        Just done a bit of messing around myself this morning but the images are poor Photographed with an IPAD (not found a way to screenshot WIN RE\PE Enviroment effectively alas)

        1 user thanked author for this post.
    • #166617

      Many thx to @MrBrian for an illuminating CMD never used that one before. I always sort of did it “old school” You’ll forgive me for not trying it here, as everything’s running fine (Touch-Wood), but its duly noted for future crash’s, not that Windoze ever does 😉

      I always thought the “old fashioned” way was what you where referring to when there was a discussion the other week about using DISM in the WINRE\PE environment and that’s the only way I have ever done it, but that assumes you know the number of the errant Package.
      At the first screen hit SHIFT-F10 (using Boot\Install Media USB or ISO) brings you to the X: “prompt”
      (Done from desktop here for illustration but it works at the X: “prompt”)

      Diskpart-DISM-get-packages

      <em>To enter those horrendous codes of the package to remove (did you really think I typed all them out? 😉 Top Left in CMD window click the little window, EDIT, then MARK, highlight everything from the : to the end of the “string” Back again to copy, type out the CMD and at the end : right click and paste. )

      DISM-Remove-packages

      and that’s it presupposing you know the errant package that’s at fault. Hope this works should bad fortune come a calling down the old update shute.

      2 users thanked author for this post.
    • #166621

      I revised the initial post. Among other changes, I incorporated Noel Carboni’s advice. Thank you to Noel Carboni for the tip :).

      3 users thanked author for this post.
    • #166623

      Is DISM an available command on a Win7 Home system?

      Yes.

      2 users thanked author for this post.
    • #166625

      For those of you who want to test if you’ll be able to access the command prompt in the Windows Recovery Environment someday when it’s needed, you can do a “test run” now and skip the step with the DISM command. I doubt that doing that DISM command when it’s not needed is harmful but I am not 100% sure of that, although there were no noticeable problems when I tried it in a virtual machine.

      2 users thanked author for this post.
      • #166647

        …you can do a “test run” now and skip the step with the DISM command. I doubt that doing that DISM command when it’s not needed is harmful but I am not 100% sure of that…

        I believe a test could be run with: dism /online /cleanup-image /checkhealth (even in Win7)

    • #166635

      thx! i just created a system repair disk for windows 7. as you mentioned, out of luck on 8.1 as i don’t have spare usb drive to create usb repair for 8.1 system.

      before i copy your post into a proper word document being able to print, i’ll wait a few days if there are more edits of you post. 😀 don’t want to miss anything importand. i need this guide on printable media for that emergency case that windows not booting so it would not be possible to access internet and your page, if second computer (notebook) is not at home…

      2 users thanked author for this post.
    • #166641

      thx! i just created a system repair disk for windows 7. as you mentioned, out of luck on 8.1 as i don’t have spare usb drive to create usb repair for 8.1 system. before i copy your post into a proper word document being able to print, i’ll wait a few days if there are more edits of you post.  don’t want to miss anything importand. i need this guide on printable media for that emergency case that windows not booting so it would not be possible to access internet and your page, if second computer (notebook) is not at home…

      You’re welcome :).

      It’s a good idea indeed to have the instructions in a form that’s accessible if your computer won’t start Windows successfully. I also recommend doing a “test run” now or soon, as I mentioned in a prior comment.

    • #166645

      Any chance of posting the commands needed for PowerShell? Tried that first, and had to go to CMD to get the statements above to work…

      Thank you,

      Dave \o/

    • #166654

      I believe a test could be run with: dism /online /cleanup-image /checkhealth (even in Win7)

      That is a different DISM command :).

      • #166677

        I believe a test could be run with: dism /online /cleanup-image /checkhealth (even in Win7)

        That is a different DISM command :).

        Yes, I was just suggesting an optional command that could be safely tested 🙂

        PS typing dism /? should give a list of options available in the OS being used, and also for each sub-group (i.e. /cleanup-image), you can also use that to see sub-commands.

        1 user thanked author for this post.
    • #166655

      Any chance of posting the commands needed for PowerShell?

      I believe that PowerShell isn’t included in the Windows Recovery Environment by default.

    • #166656

      DISM has limited functionality in Windows 7.

      The DISM command used in this topic works on Windows 7.

      1 user thanked author for this post.
    • #166657

      There are reports that using this method gets out of a no-boot situation after installing the January 2018 Windows updates.

      2 users thanked author for this post.
    • #166663

      There are reports that using this method gets out of a no-boot situation after installing the January 2018 Windows updates.

      Yes, this is the article that was needed then, back in mid-January. I’m glad you found the time to write it up. Now we have a reference to point to on the next update gaffe. Thanks again.

      1 user thanked author for this post.
    • #166665

      if System Restore is disabled this won’t work correct ?

    • #166683

      if System Restore is disabled this won’t work correct ?

      This method isn’t related to System Restore as far as I know. The installation of some Windows updates requires some actions to be completed during the next computer start or restart. The DISM command used in this method rolls back these actions, which I believe has the effect of causing all partially installed Windows updates to be uninstalled. Microsoft reference: The coolest new DISM command (to me at least).

    • #166697

      @MrBrian, When using the command prompt should the DISM be capitalized or not? I try to stay as far away as possible from anything command prompt related so I have no idea if capitalization matters. Also thank you for the link about the recovery disc, that will definitely come in handy someday.

    • #166702

      @mrbrian, When using the command prompt should the DISM be capitalized or not? I try to stay as far away as possible from anything command prompt related so I have no idea if capitalization matters. Also thank you for the link about the recovery disc, that will definitely come in handy someday.

      It doesn’t need to be capitalized. It works fine as I wrote it. You’re welcome :).

      2 users thanked author for this post.
    • #166701

      Took the advice this past meonth and used Macrium to do a full system backup.  Macrium also gave the option to create a recovery disk with Macrium installed on it, and to add the option to boot into the Recovery Environment every time the computer boots up.  
      Thankfully, haven’t had to use any of these tools yet, but Macrium seems to make the process easy.

      2 users thanked author for this post.
    • #166732

      Thanks mrBrian, this is a beautiful description to restore the Windowsmethod
      Lately I am getting a bit tired of all these ‘repair-faults’, and I am getting lasy to safe myself lots of time. ((Since Windows 0 or 1 I have lost too many hours to set things right again, Sniff))
      I prepair myself for these disasters of BSD dirty-updates etc by making a 100% image of the systemdisk once in a while. I simply restore the whole disk to an earlier point in time, and that works fine for me too ;
      Are there any members in this community who have a different experience?
      regards Fred

      * _ ... _ *
      1 user thanked author for this post.
    • #166744

      I prepair myself for these disasters of BSD dirty-updates etc by making a 100% image of the systemdisk once in a while. I simply restore the whole disk to an earlier point in time, and that works fine for me too

      You’re welcome :).

      Immediately before installing Windows updates, I do the following:

      1. Make an image of the Windows partition using Macrium Reflect (free version).

      2. As a test, restore the image that I just created.

      I keep my documents on a different partition than the Windows partition, so that I can restore a backup of the Windows partition without overwriting the partition with my documents.

      2 users thanked author for this post.
    • #166747
    • #166840

      I have seen info on the web advising users who get into no-boot situations after installing Windows updates to delete file \windows\winsxs\pending.xml. After doing some tests on a Windows 7 virtual machine with a Windows update (I used KB4073578), I can confirm The Windows Servicing Guy’s warning that deleting file pending.xml should be done only as “an absolute last resort.”

      In my opinion, deleting file pending.xml is a spectacularly bad idea, even though it might appear to work. If you delete file pending.xml instead of doing the DISM command given in this topic, the actions specified in file pending.xml for the partially installed Windows update(s) that are supposed to be done during the next computer (re)start are not done, which results in Windows considering partially installed updates as being fully installed updates. By contrast, doing the DISM command given in this topic causes the partially installed updates to be uninstalled. Also, the DISM command given in this topic can alter file pending.xml with actions to be done on the next computer (re)start that complete the uninstallation of the partially installed update(s).

      2 users thanked author for this post.
    • #167036

      Question to Noel Carboni – Thanks for great post.

      My PC dual-boots Win 7 Pro 64-bit and Win 10 Pro 64-bit.  In order to get the little and very useful app iReboot * to work, my displaybootmenu is set to “No”.  (I just confirmed this just by typing bdcedit in cmd.)

      Is there a compromise that lets both work?

      * iReboot tells a dual-booting PC which OS to boot into on the next reboot.  Using iReboot, I set the selection in advance and then reboot the PC.  It is very useful when I access my PC from outside using Teamviewer and want it to reboot into the other OS.  I recall from more than a year ago that if I let displaybootmenu work, then I cannot select the reboot OS unless I’m sitting at the PC – otherwise (after Noel’s 5 seconds) it will always reboot into the msconfig default selection.  This defeats iReboot.  But it’s been over a year and so possibly I’m misremembering.  If you’re dual-booting, you SHOULD try this at home.  iReboot is made by NeoSmart.

    • #167076

      The initial post has been updated. Among other changes, more technical references were added.

      5 users thanked author for this post.
    • #167804

      Useful devices include, but are not limited to:

      • DVD+RW Rewritable Blank Discs
      • Multiple external hard drives
      • Multiple flash drives, for short-term or portable work

      The shelf life of these devices is limited, so keep them fairly fresh. For example, when the external hard drive sounds like a freight train, it’s wise to retrieve data and replace the drive. These devices are cheap. Personal and proprietary data are not cheap.

      Protecting information is paramount.

      Maintaining a functional system is paramount.

      On permanent hiatus {with backup and coffee}
      offline▸ Win10Pro 2004.19041.572 x64 i3-3220 RAM8GB HDD Firefox83.0b3 WindowsDefender
      offline▸ Acer TravelMate P215-52 RAM8GB Win11Pro 22H2.22621.1265 x64 i5-10210U SSD Firefox106.0 MicrosoftDefender
      online▸ Win11Pro 22H2.22621.1992 x64 i5-9400 RAM16GB HDD Firefox116.0b3 MicrosoftDefender
    Viewing 26 reply threads
    Reply To: 2000009: Getting out of a no-boot situation after installing Windows updates

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

    Your information: