error: file '/grub/i386-pc/normal.mod' not found.
grub rescue>
使用grub可以浏览驱动器,分区和文件系统,你需要:
例子
下面是一个示例,
grub> search.file /i386-pc/normal.mod
error: no such device: /i386-pc/normal.mod
grub> search.file /grub/i386-pc/normal.mod
error: no such device: /grub/i386-pc/normal.mod
grub> search.file /boot/grub/i386-pc/normal.mod
hd0,msdos1
在(hd =,msdos1 )找到它
grub> ls (hd0,msdos1)/boot/grub/i386-pc/normal.mod
normal.mod
为什么grub找不到?这是grub安装时设置的)
grub> echo $prefix
(hd0,msdos2)/boot/grub
检查$root-default device中不包含设备的路径
grub> echo $root
hd0,msdos2
将$root和$prefix设置为找到normal.mod (hd =,msdos1 )的分区
grub> set root=(hd0,msdos1)
grub> set prefix=(hd0,msdos1)/boot/grub
加载,并运行正常模块
grub> insmod normal
grub> normal
其他一些有用的命令
ls列出所有设备和分区
grub> ls
(hd0) (hd0,msdos5) (hd0,msdos1)
ls分区
grub> ls (hd0,msdos1)
Partition hd0,msdos1: Filesystem type ext* - Last modification time
2014-05-08 15:56:38 Thursday, UUID c864cbdd-a2ba-43a4-83a3-66e305adb1b6 -
Partition start at 1024KiB - Total size 6290432Kib
ls文件系统(注释/在末尾)
grub> ls (hd0,msdos1)/
lost+found/ etc/ media/ bin/ boot/ dev/ home/ lib/ lib64/ mnt/ opt/ proc/
root/ run/ sbin/ srv/ sys/ tmp/ usr/ var/ vmlinuz initrd.img cdrom/
查看内部/boot/grubi386-pc目录的存在意味着这是一个BIOS安装x86_64-efi目录的存在将指示EFI安装
grub> ls (hd0,msdos1)/boot/grub
i386-pc/ locale/ fonts/ grubenv grub.cfg