After resizing NTFS partition, Windows 10 no longer boots
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:
the new "windows 10, on partition 3", which worked, and
"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.
Joshua Walsh
Updated on September 18, 2022Comments
-
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 thenfdisk
to delete and recreate the partition. I was aware thatntfsresize
andfdisk
disagree about MB vs MiB, and to compensate I checked the 'bytes' value in the output ofntfsresize
and converted this into KiB, then used this value infdisk
. 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 withinfdisk
, so I openedparted
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 runningbootrec /FixMbr
which seemed to work,bootrec /FixBoot
which gave an "Access is denied" error, andbootrec /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 over 5 yearsI 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 over 5 yearsIn 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 over 5 years"The selected disk is not a fixed MBR disk. The ACTIVE command can only be used on fixed MBR disks."
-
harrymc over 5 years@JoshuaWalsh: The poster did "bootrec /FixMbr which seemed to work".
-
Joshua Walsh over 5 yearsI 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 over 5 yearsYour 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 about 5 yearsNice! I ended up reinstalling Windows so I can't test this, but this seems like it probably would've solved the problem.
-
Justin Sane over 3 yearsThanks!
fixboot
was not a recognized command, butbcdboot c:\windows
did the trick! -
Supreme Dolphin over 2 yearsbcdboot X:\Windows works even after deleting and recreating the boot partition without backup. Works fast too