Sunday, October 20, 2019

Windows doesn't boot, Ubuntu does


I needed more space on my Ubuntu partition so I shrunk my Windows 7 partition by 25GB and then went into GParted on a live USB so I could extend my Ubuntu partition. At the same time I deleted the recovery partition for Windows 7 (I figured I always have the installation discs on me anyway and that 100MB partition was getting on my nerves) and shifted the Windows partition over to the beginning. Here's a rough picture:


|-recov part-| |-----windows part-----| |--ubuntu part--|

Changed to:


|----windows part----| |---ubuntu part---|

Once I did this nothing would boot (black screen with blinking underscore) so I reinstalled Grub and was able to get into Ubuntu again. However every time I tried to get into Windows 7 I was greeted with a black screen with a blinking underscore in the top left corner of the screen. Since then I've tried several things with the Windows installation CD (not necessarily in order):



  • Set windows partition as active then used startup repair three times with a reboot between each one

  • The following commands:


    bootrec /fixboot
    bootrec /fixmbr (required me to restore Grub later)
    bootrec /rebuildbcd
    bootsect /nt60 C:
    bcdboot C:\Windows /s C:

  • Used TestDisk to rewrite the partition table (made sure it is not dynamic disk from Windows install disk repair prompt)


All to no avail (still gets stuck at the black screen after BIOS). I know it's not a hardware problem since I'm in the Ubuntu partition on the same disk as I type this. One thing I noticed is that the Windows partition is now /dev/sda1 instead of /dev/sda2 (I believe it used to be sda2 before all this).


I have two ideas and no clue how to fix either:



  1. Windows still thinks it should be /dev/sda2 instead of /dev/sda1 which is causing a problem


  2. The Windows bootloader thinks the OS starts at its old location on the physical disk instead of its new one



Any clues?


Answer



I followed this solution to restore my 100 mb boot partition:


Removing Linux Partition on Windows 7 machine


then updated grub and was able to get back into windows.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...