我在我的桌面上双启动 Windows 7 和 Linux Ubuntu,今天是他们免费升级 Windows 10 的日子。多么激动人心!我得到了更新,它正在安装,然后我离开去小睡 30 分钟。然而,当我回到我的电脑时,它把我带到了 grub 救援提示。
error: no such partition.
Entering rescue mode...
grub rescue>
Run Code Online (Sandbox Code Playgroud)
当我输入时,我得到以下信息ls:
grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
Run Code Online (Sandbox Code Playgroud)
在快速浏览了遇到 grub 救援提示的人后,我输入set并得到以下内容
grub rescue> set
cmdpath=(hd0)
prefix=(hd0,msdos6)/boot/grub
root=hd0,msdos6
Run Code Online (Sandbox Code Playgroud)
在发现某些命令normal不起作用后,我仍然有点迷茫,然后我找到了一个视频教程,您可以在其中从 Linux 映像 cd 启动并在终端上运行一些命令。幸运的是,我有我的 CD,并从那里启动。sudo fdisk -l然而,当我输入终端时,这就是我得到的:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 …Run Code Online (Sandbox Code Playgroud) error: file '/grub/i386-pc/normal.mod' not found.
grub rescue>
Run Code Online (Sandbox Code Playgroud)
我能做什么?我只是坐着盯着它看。
我找到了我大约四年没有使用过的旧上网本 (Dell Inspiron 1010)。我用 Ubuntu 12.10 替换了 Windows XP。我使用了可启动的 USB 驱动器。我安装并重新启动。我收到了normal.mod未找到的消息。
我该怎么办?键入exit, reboot, 或quit? 我应该重新安装吗?
我试图调整 EXT4 分区的大小,但出了点问题。我失去了它。曾经消耗的空间现在表示为未分配。如何恢复分区?
我最近将 Windows 7 更新到 10,并在此过程中破坏了 grub。我在 Live CD 上运行启动修复并设法恢复 Windows 分区。然而 grub 仍然没有出现。
我收到的启动修复网址是http://paste.ubuntu.com/12189762/。
编辑:
奥德弗雷德帮我解决了这个问题。我不太明白分区是如何工作的。扩展分区包含 linux 和 swap 分区,但由于某种原因 linux 分区没有显示。我启动到实时磁盘并运行partedrescue:
sudo parted /dev/sda unit s print //this printed the current partition table
sudo parted
unit s
rescue
Start? //Here I entered in 1 sector after the extended partition
End? //Here I entered in 1 sector before the swap parition
Run Code Online (Sandbox Code Playgroud)
之后我再次运行启动修复并能够将 grub 恢复到位!现在一切都运转良好。希望这篇文章可以帮助其他人!