Windows 8 no longer boots after Grub wiped out the Windows Bootsector
Somehow Grub has overwritten your Windows boot sector on your Windows 8 boot partition /dev/sda1
. You will need to repair it in order to boot Windows again. And then don't use your custom Windows 8 grub entry (that is pointing at /dev/sda2
) - the default on /dev/sda1
is required.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Grub2 (v1.99)
Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda1
and looks at sector 667401296 of the same hard drive
for core.img. core.img is at this location and looks
in partition 72 for . No errors found in the Boot
Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
You can repair in one of two ways:
- Boot a Windows repair CD to a repair prompt and for Windows Vista/7/8 run:
bootrec /fixboot
and for Windows XP runfixboot
- Recover the backup boot sector using
testdisk
. The beauty of this solution is that you can do it from Ubuntu. Reference here.
Instructions for using testdisk
First install and run testdisk
:
sudo apt-get install testdisk
sudo testdisk
Then follow instructions for each screen in testdisk
:
First screen: Select "No Log" and press enter.
Second screen: Select /dev/sda - the hard drive containing the Windows system partition and choose "proceed".
Third screen: "intel"
Fourth screen: "advanced",
Fifth screen: Select /dev/sda1 - the Windows system partition and choose "boot"
Sixth screen: "BackupBS"
Seventh screen: type "Y" to confirm
Please also refer to this bug report and click "This bug affects me" so that Grub can be fixed.
If grub is only in the Windows boot sector, i.e. the Windows bootloader is still in the Drive MBR, then it's best to boot Ubuntu and install Grub to the MBR before fixing the Windows bootsector. e.g. sudo grub-install /dev/sda
(adjust to the correct drive if not /dev/sda
).
If you don't do this, after repairing the Windows boot sector, only Windows will boot, and you will need to install the Grub bootloader to the disk MBR in order to boot Ubuntu. Or you could use something like easyBCD
. But to use grub, boot an Ubuntu live CD/USB (same release is best) and run (assuming your Ubuntu install is on /dev/sda5
):
sudo mount /dev/sda5 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
Then reboot.
Related videos on Youtube
Szorstki
Updated on September 18, 2022Comments
-
Szorstki over 1 year
I was using Win8 and installed Ubuntu 12.10... There is an entry in GRUB for W8, but when selecting it - GRUB comes back again, so Windows never boot up. I can only launch my Ubuntu.
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 123086847 61440000 7 HPFS/NTFS/exFAT /dev/sda3 123086848 586145789 231529471 7 HPFS/NTFS/exFAT /dev/sda4 586145790 976771071 195312641 5 Rozszerzona /dev/sda5 586145792 761929727 87891968 83 Linux /dev/sda6 761931776 976771071 107419648 83 Linux
sda2 is Windows 8 partition, sda1 is Windows swap (or whatever it names). In GRUB Customizer entry for W8 look like that:
insmod part_msdos insmod ntfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 A456A29B56A26DAC else search --no-floppy --fs-uuid --set=root A456A29B56A26DAC fi drivemap -s (hd0) ${root} chainloader +1
sudo update-grub
didn't help me :/The
A456A29B56A26DAC
is Windows boot (sda1
), Windows (sda2
) is0CDA0065DA004D80
Result from bootinfoscript: http://pastebin.com/bVc9Ziq0 show that Grub has overwritten the Windows 8 boot partition boot sector:
sda1: __________________________________________________________________________ File system: ntfs Boot sector type: Grub2 (v1.99) Boot sector info: Grub2 (v1.99) is installed in the boot sector of sda1 and looks at sector 667401296 of the same hard drive for core.img. core.img is at this location and looks in partition 72 for . No errors found in the Boot Parameter Block. Operating System: Boot files: /bootmgr /Boot/BCD
Is there an easy way to fix it and make Windows bootable without reinstalling?...
-
Szorstki about 11 yearsThere is result from bootinfoscript: pastebin.com/bVc9Ziq0
-
-
Szorstki about 11 yearsThanks - it helped (win8 starts) but now Grub disappeared. It's probably not a bug but my mistake (selecting wrong partition for Grub or smth). On which partition Grub should be installed?
-
bcbc about 11 yearsI added how to install the grub bootloader at the bottom of my answer. This will install Grub to the drive MBR, not any partition. PS it is a bug, because Grub is supposed to recognize
NTFS
partitions and not allow installing to them. -
Szorstki about 11 yearsThanks a lot - I don't have enough reputation to click "^", so... just a simple thank you :)
-
bcbc about 11 yearsYou're welcome! Don't worry about the "^" although it should work for you since you asked the question. Try the tick mark instead.