Windows 10的更新破坏了Grub和Ubuntu分区。

我一直在Ubuntu旁边运行Windows 10,然后Windows进行了一个更新,导致GRUB引导加载程序被删除。在运行BootRepair之后,显示的消息变成了“找不到操作系统...”。然后我运行了Gparted,它显示我的Ubuntu分区未分配。

现在,我不知道该怎么办,也不知道是否能够恢复我的分区。BootRepair生成的URL链接是http://paste.ubuntu.com/18088419

感谢您的帮助!


哇,听起来很美好。微软做得太棒了!(开个玩笑) - You'reAGitForNotUsingGit
我找到了一个相关的问题http://askubuntu.com/questions/705347/windows-10-update-removed-boot,我认为解决方法应该是一样的,但我担心会丢失所有的数据。 - user271687
我会查看您的日志,并将任何发现报告给您。 - You'reAGitForNotUsingGit
1个回答

等待其他人的意见,但这是我的观点。
从你的日志中注意到这一点:
Drive: sda _____________________________________________________________________

Disk /dev/sda: 512.1 GB, 512110190592 bytes
255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1             206,848   292,184,795   291,977,948   7 NTFS / exFAT / HPFS
/dev/sda2    *    292,186,112   293,181,439       995,328  27 Hidden NTFS (Recovery Environment)
/dev/sda3         293,183,486 1,000,214,527   707,031,042   5 Extended
/dev/sda5         970,917,888 1,000,214,527    29,296,640  82 Linux swap / Solaris

...

Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.

是的,你的主要ext4分区确实不存在了,但是你的交换分区还在。这可能是破坏并不严重的一个指示。
我认为你有两个选择:
1. 尝试恢复 2. 重新安装Ubuntu
为了尝试恢复数据,你首先需要创建一个可启动的USB驱动器。由于你似乎是一个技术方面有兴趣的人,我建议使用来自http://pendrivelinux.com的程序。
我找到了这个关于ext4恢复的成功案例,即使帖子中提到使用了LVM:http://ubuntuforums.org/showthread.php?t=1376383 他使用了testdisk程序,所以我也建议你使用它。
但首先,
你是否有一个容量大于或等于内部硬盘的外部硬盘?
如果没有,你需要决定这次恢复对你来说有多重要。记住,你的数据很可能仍然存在。
但为了恢复数据,你将执行一些可能破坏易受攻击数据的危险操作。
所以假设你已经有了之前提到的合适大小的外部硬盘,从之前创建的可启动USB驱动器启动,并将内部驱动器上的数据使用dd命令复制到外部硬盘上,像这样:
#Keep in mind this will destroy everything on the external HDD. You'll need to replace the path to the external HDD's partition accordingly, or else you will most certainly facilitate further destruction.
sudo dd if="/dev/sda" of="/dev/sdb"

那将需要几个小时才能完成。所以请给它一些时间。
之后,断开你的外部驱动器。
恭喜!现在你拥有一个完整的驱动器镜像,这意味着如果你彻底破坏了内部分区表,你仍然可以恢复到现在的确切状态。
既然你已经有了这个驱动器镜像,试试testdisk看看它会显示什么。

应该是dd而不是did吧? - Melebius
@Melebius - 哎呀,是的,你说得对。我已经修正了。这是那种时候拼写检查没什么用的情况 :) - You'reAGitForNotUsingGit