计算机仅运行内存测试,无法在 grub 中找到文件

计算机仅运行内存测试,无法在 grub 中找到文件

有一天我下班后重启了电脑,当我回来时,电脑正在运行 memtest。它已经运行 memtest 快两天了。

我已经进入grub菜单。

grub> ls -l
Device proc: Filesystem type procfs - Sector size 512B - Total size 0KiB
Device hd0: No known filesystem detected - sector size 512B
  Partition hd0,msdos5: No known filesystem detected - Partition start at 250880KiB - Total size 243947520
  Partition hd0,msdos1: Filesystem type ext* - UUID cf8c5205-b560-4cb1-9417-dcf29a8b1f98 - Partition start at 1024KiB - Total size 248832KiB
Device fd0: Filesystem cannot be accessed

我只能访问一个分区,hd0,msdos1虽然它hd0,msdos5看起来很像我的主分区。我猜想弄清楚如何访问hd0,msdos5是解决这个问题的关键。

这就是hd0,msdos1看起来像

grub> set root=(hd0,msdos1)
grub> ls /
lost+found/ grub/ memtest86+.bin memtest86+.elf memtest86+_multiboot.bin System.map-3.13.0-36-generic

这个问题很可能是我在尝试清理/boot目录时引起的,因为目录中有太多内核,我无法安装任何东西。我以为运行sudo apt-get updateapt-get修复我意外删除的所有内容,但我显然错了。

答案1

我建议按照 Organic Marble 的建议运行 Boot 修复。

制作 Ubuntu 的实时 USB/CD,并用它启动您的电脑。

然后打开终端并输入以下内容,每行后按回车键

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

然后尝试推荐的修复选项。完成后,重新启动 PC 并重新使用硬盘,GRUB 应该可以再次工作!

相关内容