无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 7200|回复: 9
打印 上一主题 下一主题

[求助] lianjiang老大,各位大大请帮忙看下grub4dos引导grub2为何无法启动。

[复制链接]
跳转到指定楼层
1#
发表于 2012-8-15 10:19:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
lianjiang老大,各位大大请帮忙看下grub4dos引导grub2为何无法启动。

首先看看我这样做是否正确
我直接将ubuntu系统下的 /boot/grub 目录所有文件复制到我的U盘(我的U盘可以正常启动grub4dos)menu.list 文件如下
    title commandline
    commandline

    title grub2
    find --set-root --ignore-floppies /boot/grub/core.img
    kernel /boot/grub/core.img
    boot

---------返回内容---------

    Booting grub2
(hd0,0)
[Multiboot-kludge,loadaddr=0x100000,text-and-data=0x65c4,bss=0x0,entry=0x100950]
error:no such partition.
grub rescue>_


不知道这中状态是已经进入grub2 ,还是因为grub.cfg文件有问题报的错。或者其他问题;
还是没有进入grub2


是不是直接将ubuntu系统下的/boot/grub目录考过来根本就不能直接用 ?


请知道的前辈指点下。。。

[ 本帖最后由 evnious 于 2012-8-15 13:15 编辑 ]
2#
发表于 2012-8-15 10:35:23 | 只看该作者
你的标题不把问题的关键字说清楚,不太好。

你的 grub2 似乎没有安装好吧。光是拷贝,恐怕不行。我猜测,grub2 像其它许多软件一样,都需要事先执行一个安装过程才可以使用,否则可能就要出问题。

在大多数情况下,grub4dos 可以拷贝使用,因为 grub4dos 就是这么设计的。


你的 grub rescue 提示符似乎告诉你,你已经进入 grub2 的环境,只是配置文件有问题,所以才进入了救援模式。
回复

使用道具 举报

3#
 楼主| 发表于 2012-8-15 13:12:25 | 只看该作者
原帖由 <i>不点</i> 于 2012-8-15 10:35 发表 <a href="http://bbs.wuyou.net/redirect.php?goto=findpost&pid=2549946&ptid=255783" target="_blank"><img src="http://bbs.wuyou.net/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" /></a><br />
你的标题不把问题的关键字说清楚,不太好。<br />
<br />
你的 grub2 似乎没有安装好吧。光是拷贝,恐怕不行。我猜测,grub2 像其它许多软件一样,都需要事先执行一个安装过程才可以使用,否则可能就要出问题。<br />
<br />
在大多 ...
<br />


多谢不点指点。。。


我也猜测。。拷贝好像可以。。。不知道到底能不能拷贝,希望有个确切的答案 。

只要能拷贝一切都省事了
回复

使用道具 举报

4#
发表于 2012-8-15 15:54:05 | 只看该作者
原帖由 evnious 于 2012-8-15 10:19 发表 lianjiang老大,各位大大请帮忙看下grub4dos引导grub2为何无法启动。首先看看我这样做是否正确我直接将ubuntu系统下的 /boot/grub 目录所有文件复制到我的U盘(我的U盘可以正常启动grub4dos)menu.list 文 ...

首先,你在grub rescue>模式下输入set,看看grub2的默认环境变量(在core.img中,安装时设定的)。
prefix=(hdx,y)/boot/grub

root=hdx,y
根据你的情况,这两个变量应做如下设置:
set prefix=(hd0,1)/boot/grub

set root=hd0,1
然后再insmod normal(或者insmod (hd0,1)/boot/grub/normal.mod)
最后输入normal
这样应该就可以进入grub2的菜单了。

但是如果core.img没有你U盘的文件系统驱动,则会出现无法识别的错误,这时只能重新生成core.img了。

[ 本帖最后由 三块石头 于 2012-8-15 16:00 编辑 ]
回复

使用道具 举报

5#
 楼主| 发表于 2012-8-15 21:44:32 | 只看该作者
原帖由 <i>三块石头</i> 于 2012-8-15 15:54 发表 <a href="http://bbs.wuyou.net/redirect.php?goto=findpost&pid=2550088&ptid=255783" target="_blank"><img src="http://bbs.wuyou.net/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" /></a><br />

<br />
首先,你在grub rescue&gt;模式下输入set,看看grub2的默认环境变量(在core.img中,安装时设定的)。<br />
prefix=(hdx,y)/boot/grub<br />
<br />
root=hdx,y<br />
根据你的情况,这两个变量应做如下设置:<br />
set prefix=(hd0,1)/ ...
<br />



多谢石头,命令我敲了一遍有点问题
1 grub rescue>set
2 prefix=(hd0,msdos8)/boot/grub
3 root=hd0,msdos8
4 grub rescue>set prefix=(hd0,1)/boot/grub
5 grub rescue>set root=hd0,1
6 grub rescue>insmod normal
7 error:unknown filesystem.
8 grub rescue>insmod (hd0,1)/boot/grub/normal.mod
9 error:unknown filesystem.
10 grub rescue>normal
11 Unknown command 'normal'



第5行之后   
grub rescue>set
prefix=(hd0,1)/boot/grub
root=hd0,1

看来第5行之前的命令都是正确的

请石头再看看。
回复

使用道具 举报

6#
 楼主| 发表于 2012-8-15 21:51:30 | 只看该作者
原帖由 <i>三块石头</i> 于 2012-8-15 15:54 发表 <a href="http://bbs.wuyou.net/redirect.php?goto=findpost&pid=2550088&ptid=255783" target="_blank"><img src="http://bbs.wuyou.net/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" /></a><br />

<br />
首先,你在grub rescue&gt;模式下输入set,看看grub2的默认环境变量(在core.img中,安装时设定的)。<br />
prefix=(hdx,y)/boot/grub<br />
<br />
root=hdx,y<br />
根据你的情况,这两个变量应做如下设置:<br />
set prefix=(hd0,1)/ ...
<br />




石头说得是这个方法么?
http://forum.ubuntu.org.cn/viewtopic.php?f=139&t=348503
回复

使用道具 举报

7#
发表于 2012-8-15 23:40:04 | 只看该作者
原帖由 evnious 于 2012-8-15 21:51 发表
石头说得是这个方法么?
http://forum.ubuntu.org.cn/viewtopic.php?f=139&t=348503


  原理就是上面链接里说的原理。不过你的情况是确实出现了无法识别文件系统的错误。
由于你想要用的grub2是直接从ubuntu中拷贝过来的,而ubuntu是安装在ext2/3/4这样的文件系统中的,因而ubuntu所带的grub2的核心core.img所直接支持的文件系统包含了ext2/3/4,却没有包含fat,ntfs等文件系统,它们的支持是动态加载的。所出现的error:unknown filesystem就是因为normal.mod这个文件所存放文件系统不被core.img直接识别。

解决方法我想到三种:
1. 把U盘格式化为ext3(一般不可取);
2. 在ubuntu中用命令:grub-mkimage -d /boot/grub -o core.img biosdisk pc ntfs ext fat 来重新生成core.img文件, 其实就是把你需要直接加载的.mod文件集成到core.img文件中(当然,该方法相对较麻烦);
3.直接用已经编译好的且支持fat/ntfs的grub2版本,如grub24dos或者burg,或者把它们的core.img拿来用,只拿core.img来用时也需注意该文件所涉及到的环境变量问题。

[ 本帖最后由 三块石头 于 2012-8-16 00:06 编辑 ]
回复

使用道具 举报

8#
 楼主| 发表于 2012-8-17 13:23:09 | 只看该作者
原帖由 三块石头 于 2012-8-15 23:40 发表


  原理就是上面链接里说的原理。不过你的情况是确实出现了无法识别文件系统的错误。
由于你想要用的grub2是直接从ubuntu中拷贝过来的,而ubuntu是安装在ext2/3/4这样的文件系统中的,因而ubuntu所带的grub ...



应该是第3点所造成的。。。我试下。。。


再次感谢
回复

使用道具 举报

9#
发表于 2014-1-23 17:45:42 | 只看该作者
grub-mkimage自己的core.img可以解决
回复

使用道具 举报

10#
发表于 2020-7-3 21:05:57 | 只看该作者
本帖最后由 2011whp 于 2020-7-11 16:37 编辑

GRUB4DOS调用GRUB2
title 1 GRUB2引导菜单
find --set-root /core.imgkernel /core.img




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-20 20:23

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表