Grub 清除了 Windows 引导扇区后,Windows 8 不再启动

Szo*_*tki 4 grub2 dual-boot bootloader windows-8 12.10

我正在使用Win8并安装了Ubuntu 12.10 ... GRUB中有一个条目,但选择它 - GRUB再次回来,因此Windows从未启动。我只能启动我的 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
Run Code Online (Sandbox Code Playgroud)

sda2 是 Windows 8 分区,sda1 是 Windows 交换(或任何名称)。在 W8 的 GRUB 定制器条目中,如下所示:

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
Run Code Online (Sandbox Code Playgroud)

sudo update-grub 没有帮助我:/

A456A29B56A26DAC是Windows启动(sda1)时,Windows( sda2)是0CDA0065DA004D80

bootinfoscript 的结果:http : //pastebin.com/bVc9Ziq0显示 Grub 已经覆盖了 Windows 8 引导分区引导扇区:

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
Run Code Online (Sandbox Code Playgroud)

有没有一种简单的方法可以修复它并使 Windows 无需重新安装即可启动?...

bcb*_*cbc 5

不知何故,Grub 覆盖了 Windows 8 引导分区上的 Windows 引导扇区/dev/sda1。您需要修复它才能再次启动 Windows。然后不要使用您的自定义Windows 8 grub 条目(即指向/dev/sda2) -/dev/sda1需要默认值。

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
Run Code Online (Sandbox Code Playgroud)

您可以通过以下两种方式之一进行修复:

  1. 将 Windows 修复 CD 引导至修复提示和 Windows Vista/7/8 运行:bootrec /fixboot和 Windows XP 运行fixboot
  2. 使用 恢复备份引导扇区testdisk。这个解决方案的美妙之处在于您可以从 Ubuntu 中完成。参考这里

使用说明 testdisk

首先安装并运行testdisk

sudo apt-get install testdisk
sudo testdisk
Run Code Online (Sandbox Code Playgroud)

然后按照 中每个屏幕的说明进行操作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
Run Code Online (Sandbox Code Playgroud)

另请参阅此错误报告并单击“此错误影响我”,以便修复 Grub。

如果 grub在 Windows 引导扇区中,即 Windows 引导加载程序仍在 Drive MBR 中,那么最好在修复 Windows 引导扇区之前启动 Ubuntu 并将 Grub 安装到 MBR。例如sudo grub-install /dev/sda(如果不是,则调整到正确的驱动器/dev/sda)。

如果你不这样做,在修复 Windows 引导扇区后,只有 Windows 会引导,并且你需要将 Grub 引导加载程序安装到磁盘 MBR 以引导 Ubuntu。或者你可以使用类似easyBCD. 但是要使用 grub,启动一个 Ubuntu live CD/USB(最好是同一个版本)并运行(假设你的 Ubuntu 安装在上/dev/sda5):

sudo mount /dev/sda5 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
Run Code Online (Sandbox Code Playgroud)

然后重启。