免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2407 | 回复: 3
打印 上一主题 下一主题

求助:在镜像文件上安装grub出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-16 13:11 |只看该作者 |倒序浏览
grub> device (fd0) /dev/loop1

grub> root (fd0)
Filesystem type is ext2fs, using whole disk

grub> setup (fd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... no
Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/grub.c
onf "... failed

Error 29: Disk write error
问题补充:我是利用/dev/loop1在磁盘镜像文件上安装grub,出现这样的问题

论坛徽章:
0
2 [报告]
发表于 2008-10-16 17:32 |只看该作者
是不是空间不够了,/dev/loop1连到哪个文件?

论坛徽章:
0
3 [报告]
发表于 2008-10-16 17:42 |只看该作者

回复 #2 qtdszws 的帖子

touch hd.img
dd if=/dev/zero of=hd.img bs=1M count=64
losetup /dev/loop1 hd.img
mkfs.ext2 /dev/loop1
mount /dev/loop1 /mnt
cd /mnt
mkdir boot/grub -p
cp /boot/grub/stage1 boot/grub/
cp /boot/grub/stage2 boot/grub/
cd /
然后执行:
grub --device-map=/dev/null
进入grub命令行界面
grub> device (fd0) /dev/loop1

grub> root (fd0)
Filesystem type is ext2fs, using whole disk

grub> setup (fd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... no
Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/grub.c
onf "... failed

Error 29: Disk write error

折磨了我一整天了,还是没搞好...

换了台机子执行,还是有错,但错误号又变了
grub> device (fd0) /dev/loop1
device (fd0) /dev/loop1
grub> root (fd0)
root (fd0)
Unknown partition table signature
Filesystem type is ext2fs, using whole disk
grub> setup (fd0)
setup (fd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found

[ 本帖最后由 hbrqlpf 于 2008-10-16 17:48 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2008-10-16 22:24 |只看该作者
明白了,好像grub0.97只支持1.44M的软盘镜像文件
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP