Windows – After resizing NTFS partition, Windows 10 no longer boots

bootbootrepairntfsntfsresizewindows 10

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/

Best Answer

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]

Related Question