Woody Leonhard's no-bull news, tips and help for Windows, Office and more… Please disable your ad blocker – our (polite!) ads help keep AskWoody going!
Home icon Home icon Home icon Email icon RSS icon
  • 2000009: Getting out of a no-boot situation after installing Windows updates

    Posted on MrBrian Comment on the AskWoody Lounge

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

    This topic contains 33 replies, has 14 voices, and was last updated by  geekdom 9 months, 4 weeks ago.

    • Author
      Posts
    • #166496 Reply

      MrBrian
      AskWoody MVP

      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

      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  Kirsty.
      • This topic was modified 10 months ago by  Kirsty.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      • This topic was modified 10 months ago by  MrBrian.
      Total of 32 users thanked author for this post. Here are last 20 listed.
    • #166515 Reply

      abbodi86
      AskWoody MVP

      Thanks

    • #166588 Reply

      Noel Carboni
      AskWoody MVP

      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

      Attachments:
      You must be logged in to view attached files.
      12 users thanked author for this post.
      • #166772 Reply

        Ascaris
        AskWoody MVP

        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.

        Group L (Linux): KDE Neon User Edition 5.14.4 (based on Ubuntu 18.04) + Windows 7 in Virtualbox VM

        2 users thanked author for this post.
      • #167585 Reply

        Sueska
        AskWoody Lounger

        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 Reply

      Canadian Tech
      AskWoody MVP

      Is DISM an available command on a Win7 Home system?

      CT

      2 users thanked author for this post.
      • #166607 Reply

        BobbyB
        AskWoody Lounger

        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 Reply

      BobbyB
      AskWoody Lounger

      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.

      Attachments:
      You must be logged in to view attached files.
      2 users thanked author for this post.
    • #166621 Reply

      MrBrian
      AskWoody MVP

      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 Reply

      MrBrian
      AskWoody MVP

      Is DISM an available command on a Win7 Home system?

      Yes.

      2 users thanked author for this post.
    • #166625 Reply

      MrBrian
      AskWoody MVP

      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.

      • This reply was modified 10 months ago by  MrBrian.
      • This reply was modified 10 months ago by  MrBrian.
      • This reply was modified 10 months ago by  MrBrian.
      2 users thanked author for this post.
      • #166647 Reply

        Kirsty
        AskWoody MVP

        …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 Reply

      anonymous

      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 Reply

      MrBrian
      AskWoody MVP

      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.

      • This reply was modified 10 months ago by  MrBrian.
    • #166645 Reply

      anonymous

      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 Reply

      MrBrian
      AskWoody MVP

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

      That is a different DISM command :).

      • #166677 Reply

        Kirsty
        AskWoody MVP

        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 Reply

      MrBrian
      AskWoody MVP

      Any chance of posting the commands needed for PowerShell?

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

    • #166656 Reply

      MrBrian
      AskWoody MVP

      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 Reply

      MrBrian
      AskWoody MVP

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

      • This reply was modified 10 months ago by  MrBrian.
      2 users thanked author for this post.
    • #166663 Reply

      Cascadian
      AskWoody Lounger

      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 Reply

      anonymous

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

    • #166683 Reply

      MrBrian
      AskWoody MVP

      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 Reply

      moonbear
      AskWoody Lounger

      @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 Reply

      MrBrian
      AskWoody MVP

      @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 Reply

      anonymous

      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 Reply

      fred
      AskWoody Lounger

      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 Reply

      MrBrian
      AskWoody MVP

      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 Reply

      MrBrian
      AskWoody MVP
    • #166840 Reply

      MrBrian
      AskWoody MVP

      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).

      • This reply was modified 10 months ago by  MrBrian.
      2 users thanked author for this post.
    • #167036 Reply

      glnz
      AskWoody Lounger

      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.

      • This reply was modified 10 months ago by  glnz.
      • This reply was modified 10 months ago by  glnz.
    • #167076 Reply

      MrBrian
      AskWoody MVP

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

      5 users thanked author for this post.
    • #167804 Reply

      geekdom
      AskWoody Lounger

      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.

      Group G{ot backup} Win7 · x64 · SP1 · i3-3220 · TestBeta

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    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 Advanced BBCodes, they will be stripped before saving.

    Your information:


    Comments are closed.