Fix for error file: /boot/grub/i386-pc/normal.mod not found. Grub Rescue

The possible reason for this problem is that I made changes to the system after the update, which resulted in the loss of /boot/grub/i386-pc/normal.mod. normal.mod is a must-install item for ubuntu to boot, so it reported

/boot/grub/i386-pc/normal.mod not found. Grub Rescue> problem.

Regarding basic knowledge, Sun Binbin's personal blog  made a partial summary:

 

In rescue mode, only a few commands are available:
  1. set set environment variable
  2. ls to view devices
  3. insmod load module
  4. root specifies the partition from which to boot the system
  5. prefix sets the grub startup path
In rescue mode, first ls to check the device, generally there are many partitions. At this time, we need to manually find the linux partition, because we want to load the correct module, first find the partition.
Method: ls (hd0,X)/
X is the displayed number, if it is msdos11, it can be replaced by 11 directly. This command is to view the files under the partition. If root is partitioned alone, find the grub directory, and then ls (hd0,x)/gurb will find that there is also an i386-pc directory, and the normal.mod file is in this directory.

In addition, there is a post in the ChinaUnix community with more detailed instructions: http://bbs.chinaunix.net/thread-3634395-1-1.html

 

 

There are only a few commands available in rescue mode:
set  ,  ls , insmod , root , prefix
 
(1)set View environment variables, where you can view the startup path and partition.
(2)ls view device
(3) insmod load module
(4) root specifies the partition used to boot the system, and sets the grub boot partition in rescue mode
(5) prefix sets the grub startup path
 
2. Set the boot partition and path of grub
set root=(hd0,msdos1) #Set the grub boot partition
set prefix=(hd0,msdos1)/boot/grub/ #Set the grub boot path
Check out the settings:
grub rescue> set
prefix=(hd0,msdos1)/boot/grub
root=hd0,msdos1
 
3. Load the basic module
insmod /boot/grub/normal.mod #Load basic module
 
4. Enter normal mode
normal #Enter normal mode, a menu appears, if grub.cfg is loaded (wrong), there may be a problem, press shift to bring up the menu, then press c to enter the console
After entering normal mode, a prompt like grub> will appear, and there are many commands supported here.
 
5. Guidance system
set root=(hd0,msdos1) #Set the normal boot partition
linux /boot/vmlinuz .... ro text root=/dev/sda1 #Load the kernel and enter the console mode
initrd /boot/initrd .... #load initrd.img
boot #boot
 

His solution:

 

 

Here are the specific steps:

 

①View the partition

Because everyone's partition is different, so we have to check the partition , use the ls command

grub rescue>ls

After returning, it will appear

(hd0) (hd0,msdos9) (hd0,msdos8) (hd0,msdos7) (hd0,msdos6) (hd0,msdos5) (hd0,msdos1)

grub rescue>

注:我用的是grub2,对于grub用户,分区前没有msdos字样

上面是我的分区,每个人的不一样。

grub rescue>set回车

prefix=(hd0,msdos9)/boot/grub

root=hd0,msdos9

从上面可以看出来现在我的系统是从(hd0,msdos9)里启动的。

那么怎么知道ubuntu在哪个分区呢?进入第二步

 

寻找ubuntu所在分区

这一步我们要一个一个的试,

还是用ls指令

先试下在不在(hd0,msdos8)里边

grub rescue>ls (hd0,msdos8)

回车会发现,不是,还是unknown filesystem

接着来

。。。。。。。。。

当我试到

(hd0,msdos7)的时候,可以看到一下子多了很多字,这些就是我ubuntu主文件夹下的文件夹和文件的名字。OK,找到分区了!

 

修改启动分区

grub rescue>root=(hd0,msdos7)
grub rescue>prefix=/boot/grub //grub
路径设置
grub rescue>set root=(hd0,msdos7)
grub rescue>set prefix=(hd0,msdos7)/boot/grub
grub rescue>insmod normal //
启动normal启动

grub rescue>normal

依次敲入上面的指令,是不是看到熟悉的启动菜单了?选win7后,一键Ghost就开始备份系统了。别高兴太早,一切还都没开始呢。如果你不是因为一键Ghost问题进入grub rescue,可以直接跳到第⑤步

 

再来一遍

当你等着一键Ghost备份完系统,重启后,你发现还是

error:unknown filesystem

grub rescue>

别着急,再把前三步进行一遍就可以了

 

进入命令行 启动Ubuntu

进入系统启动选项界面后,你发现,无论点那个还是进不去,这是因为你还没有真正的修改grub,这个要到ubuntu里修改

进入系统启动项界面后,按C进入命令行模式

grub >set root=hd0,msdos7

grub >set prefix=(hd0,msdos7)/boot/grub

grub >linux /vmlinuz-xxx-xxx root=/dev/sda7 //里边的xxxx可以按Tab键,如果有acpi问题,在最后加一句acpi=off
grub >initrd /initrd.img-xxx-xxx
grub >boot

Ubuntu正常启动了吧?

 

进入ubuntu修复grub

大功就要高成了

进入Ubuntu,修复grub

在终端里运行

sudo update-grub

重建grub到第一硬盘mbr
sudo grub-install /dev/sda

以上内容很的好学习的关于开机引导的问题,but it doesn't work for me.

 

最终我的解决方案:

1.考虑使用UltraISO制作ubuntu14.04 U盘镜像以启动系统恢复

参考:http://jingyan.baidu.com/article/363872ec8b4f6a6e4ba16f2b.html

结果:失败,由于刻录镜像时报出始终被占用的问题,后来网上提示原因是UltraISO版本问题以及ubuntu14.04太新。。。。放弃

2.考虑使用Universal-USB-Installer制作ubuntu14.04 U盘以启动系统恢复

参考:http://blog.csdn.net/liangcaiyun2013/article/details/10410797

结果:U盘启动ubuntu成功,但是,进入ubuntu后无法修复原分区的系统。

3.考虑使用Boot-Repair

参考:http://sourceforge.net/p/boot-repair-cd/home/Home/

结果,有详细的教程,然后最后修复成功。

 

补充,由于我是在修复我的vmware中的ubuntu,因而还需要做一个vmware的u盘启动,教程如下:

http://jingyan.baidu.com/article/b2c186c8eb3813c46ef6ffef.html

注意事项:教程中建立好新硬盘后,如果想要该盘的启动顺序排在前面,点右面详细面板的高级,设置虚拟设备节点,将想要先启动的硬盘盘号往前排。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326305357&siteId=291194637