在我删除了Ubuntu分区之后,我重新启动了电脑,但只出现了一个提示符:
grub rescue >
命令
ls
用于列出目录中的文件。(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)
我一个一个地检查它们:
ls (hd0,msdos5)/
ls (hd0,msdos1)/
但是我找不到合适的分区。
在我删除了Ubuntu分区之后,我重新启动了电脑,但只出现了一个提示符:
grub rescue >
ls
用于列出目录中的文件。(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)
ls (hd0,msdos5)/
ls (hd0,msdos1)/
grub rescue > ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)
grub rescue > ls (hd0,msdos1) # try to recognize which partition is this
grub rescue > ls (hd0,msdos2) # let's assume this is the linux partition
grub rescue > set root=(hd0,msdos2)
grub rescue > set prefix=(hd0,msdos2)/boot/grub # or wherever grub is installed
grub rescue > insmod normal # if this produced an error, reset root and prefix to something else ..
grub rescue > normal
sudo update-grub
sudo grub-install /dev/sdX
/dev/sdX
替换为您的启动驱动器。modprobe normal
从你的安装中。我并不真的期望这会起作用,只是告诉我你得到了什么输出。 - Amr Ayman(hd0,msdos1)/grub/grub.cfg
,相应地设置root=(hd0,msdos1)
和prefix=(hd0,msdos1)/grub
,但是insmod normal
只会给我一个“错误:文件未找到”。这是怎么回事? - GiszmoBootrec /fixmbr
Bootrec /fixmbr
。 - drawfixmbr
命令将恢复MBR样式引导非常重要。如果之前是UEFI引导,现在会变回MBR。我没有看到很多正确的答案,所以如果你已经处于那个状态,你应该研究一下Windows的mbr2gpt
程序,它是WinPE可启动的一部分。它非常麻烦,但可以将你的磁盘恢复为GPT/UEFI。它可能还有修复工具来恢复UEFI设置,假设你没有运行fixmbr
命令。 - user694859
sudo apt-get install syslinux
回车,然后输入sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
。创建可启动的USB:http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows,要从USB启动Ubuntu,在计算机启动时(在Windows启动之前)按下F11或F12。要打开Ubuntu终端,按下Ctrl - Alt + T。 - MagTun