web-dev-qa-db-ja.com

GrubでWindowsを起動できない| Debianのインストール

2台目のハードドライブにWindows7をインストールし、最初のハードドライブにDebianをインストールしました。残念ながら、ブートローダー(grub2)が既存のWindowsインストールを取得しておらず、その理由がわかりません。

 # os-prober

何も返しません(eek)。

これが私のディスクレイアウトです:

# fdisk -l

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a3b4a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   389595713   194796833    7  HPFS/NTFS/exFAT

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00058a73

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   959997951   479997952   83  Linux
/dev/sda2       959999998   976771071     8385537    5  Extended
/dev/sda5       960000000   976771071     8385536   82  Linux swap / Solaris

/etc/grub.d/40_customファイルを編集して、grub2にWindowsインストールを強制的に取得させてみました。

# cat /etc/grub.d/40_custom 
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 7" {
insmod ntfs
set root='(hd1,0)'
search --no-floppy --fs-uuid --set BC9839B098396A52
chainloader +1
}

次にupdate-grubを実行しますが、grubメニューでWindows 7エントリを選択しようとすると、「BOOTMGRがありません」と表示されます。誰か提案がありますか?私は本当にWindows7を再インストールする余裕がないので、それは本当に最後の手段になるでしょう:-(

1
Charles

Windowsブートローダーが破損しているようです。リカバリディスクで修復してみてください。

2台のハードドライブがあるので、上書きを簡単に防ぐことができます。Windowsリカバリディスクで起動する前に、LinuxHDDを切断するだけです。このように、WindowsはDebianまたはGRUB)に干渉しません。

運が良ければ、Windowsリカバリで十分です。ただし、パーティションが不足しているため、機能しない可能性があります。そうでない場合は、おそらくWindowsを再インストールする必要があります(とにかく起動できません)。その場合は、不要な干渉を避けるために、LinuxHDDを取り外した状態でWindowsのインストールを実行してください。

その後、プラグを差し直し、Debianで起動して、update-grubを実行します。 Windowsの回復が成功した場合、os-proberはそれを見つけるはずです。

1
Levans