After resizing NTFS partition, Windows 10 no longer boots

9,482

Solution 1

I did the same (ntfsresize + fdisk) while installing linux, and ran into the same problem. Eventually, this seems to work, from the Windows recovery prompt:

fixboot /scanos

it found c:\windows, then I ran:

bcdboot c:\windows

I also ran chkdsk c:, fixboot /mbr and bcdedit /set {default} recoveryenabled no before that, but I do not think they are related to the problem.

As far as I understand, the bcdboot command above, added the option of booting to the new c:\windows for bootmgfw.efi. Indeed, after rebooting I had two options:

  1. the new "windows 10, on partition 3", which worked, and

  2. "windows 10", which did not (as before).

Once booted, I removed the non-working option from the configuration manager (search "configuration manager", tab "boot").

Reference: [https://docs.microsoft.com/en-us/windows/client-management/advanced-troubleshooting-boot-problems][1]

Solution 2

Boot from Windows live cd and run chkdsk /f/x/r.

I booted from Linux boot cd and used gparted for check but that did not help. Then I ran ntfsfix but drive was still not accessible. Then I booted from Windows live cd and ran chkdsk /f/x/r and drive became accessible.

Share:
9,482
Joshua Walsh
Author by

Joshua Walsh

Updated on September 18, 2022

Comments

  • Joshua Walsh
    Joshua Walsh almost 2 years

    My computer is configured for dual-booting via Grub. I run Windows 10 and Ubuntu 17.10.

    Earlier today I was working in Ubuntu and I ran out of space on my ext4 partition. Wanting to make it larger, I first needed to shrink my Windows boot partition.

    I used ntfsresize to shrink the filesystem (which it did with no errors) and then fdisk to delete and recreate the partition. I was aware that ntfsresize and fdisk disagree about MB vs MiB, and to compensate I checked the 'bytes' value in the output of ntfsresize and converted this into KiB, then used this value in fdisk. When it asked me if I wanted to remove the existing NTFS signature I said no. I set the drive type to 11 (Microsoft basic data). Due to my drive using GPT I wasn't able to mark the drive as bootable within fdisk, so I opened parted and changed it there instead.

    Following all this I tried to reboot into Windows to run chkdsk, but instead of booting into Windows, Startup Repair was automatically launched. It said it was unable to automatically repair Windows. I opened the recovery Command Prompt, and my drive is detected and mounted. (Although it's mounted as E: instead of C:) I ran chkdsk E: /F and it completed successfully. I can see all the files on it. I tried running bootrec /FixMbr which seemed to work, bootrec /FixBoot which gave an "Access is denied" error, and bootrec /RebuildBcd which was able to detect my Windows installation and add it to the BCD.

    However after all of this, every time I try to boot Windows it just launches Startup Repair. I can still boot into Ubuntu, and I'm even able to mount my C drive as read-write using ntfs-3g.

    What could I be missing? Why is Windows refusing to boot, even though the partition seems healthy?

    Thanks in advance!

    EDIT: Here's my boot-repair output: http://paste.ubuntu.com/p/YCkzCcNdkN/

    • LPChip
      LPChip over 5 years
      I am not 100% sure, but I think the boot partition is a special type and windows won't boot if its not that type. Also, if you removed the boot partition and recreated it, have you moved its content back?
    • Joshua Walsh
      Joshua Walsh over 5 years
      In fdisk if you remove a partition the data remains. Creating a partition with the same starting sector will mean the data is present on the new partition. I can view the data within the new partition in both Linux and Windows Recovery. It just won't boot. :(
  • Joshua Walsh
    Joshua Walsh over 5 years
    "The selected disk is not a fixed MBR disk. The ACTIVE command can only be used on fixed MBR disks."
  • harrymc
    harrymc over 5 years
    @JoshuaWalsh: The poster did "bootrec /FixMbr which seemed to work".
  • Joshua Walsh
    Joshua Walsh over 5 years
    I am the poster. Doing bootrec /FixMbr says "The operation completed successfully." But when I run the commands you sent, I get the error from my comment.
  • harrymc
    harrymc over 5 years
    Your disk is GPT, so the above advice doesn't apply and I don't really know what did "bootrec /FixMbr". I suggest doing a Windows 10 In-place Upgrade and not one of grub. This will most probably destroy grub, which will have to be repaired or reinstalled. If this doesn't work, then there is a serious problem.
  • Joshua Walsh
    Joshua Walsh about 5 years
    Nice! I ended up reinstalling Windows so I can't test this, but this seems like it probably would've solved the problem.
  • Justin Sane
    Justin Sane over 3 years
    Thanks! fixboot was not a recognized command, but bcdboot c:\windows did the trick!
  • Supreme Dolphin
    Supreme Dolphin over 2 years
    bcdboot X:\Windows works even after deleting and recreating the boot partition without backup. Works fast too