如何从 GRUB 启动我的 PC?

Mon*_*ons 19 boot grub2

在此处最初报告的损坏问题之后,我无法再启动 Ubuntu(如何解决“无效的 arch 依赖 elf magic”错误消息)。

当我为笔记本电脑供电时,我现在收到以下消息:

GNU GRUB version 2.02~beta2-9ubuntu1.7
Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions.
Anywhere else TAB lists possible device or file completions." and then the prompt

grub>
Run Code Online (Sandbox Code Playgroud)

有人能帮我回到 Ubuntu 吗?

rav*_*ery 40

好的,从 grub 类型中,ls (hd0,1)/
您应该看到一个名为vmlinuzor的文件linux,并且initrd.img

键入linux (hd0,1)/vmlinuz root=/dev/sda1linux (hd0,1)/linux root=/dev/sda1取决于您发现的内容ls (hd0,1)/,然后:

initrd (hd0,1)/initrd.img
boot
Run Code Online (Sandbox Code Playgroud)

如果您获得 initramfs 救援模式,请输入您的密码,然后startx. 您现在应该有一个桌面。

使用gparted来检查你的文件系统,如果它报告错误,那么你需要从一个LiveCD或其他介质引导来修复它....不要试图修复分区上。

以下三个命令修复了许多 grub 启动问题。他们跑得很快,所以只需做所有三件事,而不是试图找到你需要的那一个。

sudo grub-install /dev/sda && sudo update-grub && sudo update-initramfs -u
Run Code Online (Sandbox Code Playgroud)

重新启动,看看你得到了什么。

  • 它真的是`innitrd`还是应该是`initrd`? (3认同)
  • 如果上面的文件未列出,请尝试迭代 `ls (hd0,1)/` 命令,如:`ls (hd0,2)/`、`ls (hd0,3)/` 等,如建议在 [here](https://unix.stackexchange.com/a/330852/267786)。 (3认同)

归档时间:

查看次数:

135554 次

最近记录:

8 年,3 月 前