LFS 8.4小节-安装Grub错误
时间:2008-10-22
来源:互联网
LFS 8.4小节-安装Grub错误
我按照 LFS 6.3-rc2 文档的指导在虚拟机中编译Linux,在进行到 8.4 安装Grub设置引导小节时出现了错误,无法继续进行。
我的使用环境:
虚拟机: VMware 6.0.0 build-45731
LiveCD: lfslivecd-x86-6.3-r2160.ISO
软件包: lfslivecd-x86-6.3-r2160.ISO 中自带的源码包。
参考文档: Linux From Scratch - Version 6.3-rc2
手把手教你如何建立自己的Linux系统 第二版(作者:孙海勇)
硬盘分区:
我将第四分区(/dev/sda4)挂载到主系统的 /mnt 目录,在/mnt/LFS下进行编译工作。
在 chroot 环境下设置 Grub 引导。
Grub 提示没有找到 stage1。但用 ls 查看 /boot/grub 目录中却有此文件。
我尝试着将 boot 目录复制到 /dev/sda1 中,Grub却能顺利的找到 stage1。
为何 Grub 找不到 /dev/sda4 下的 stage1 ?
我按照 LFS 6.3-rc2 文档的指导在虚拟机中编译Linux,在进行到 8.4 安装Grub设置引导小节时出现了错误,无法继续进行。
我的使用环境:
虚拟机: VMware 6.0.0 build-45731
LiveCD: lfslivecd-x86-6.3-r2160.ISO
软件包: lfslivecd-x86-6.3-r2160.ISO 中自带的源码包。
参考文档: Linux From Scratch - Version 6.3-rc2
手把手教你如何建立自己的Linux系统 第二版(作者:孙海勇)
硬盘分区:
代码:
Number Start End Size Type File system Flags 1 32.3kB 1028MB 1028MB primary xfs 2 1028MB 2056MB 1028MB primary linux-swap 3 2056MB 3084MB 1028MB primary ext2 4 3084MB 8587MB 5503MB primary xfs
在 chroot 环境下设置 Grub 引导。
代码:
grub> root (hd0, Possible partitions are: Partition num: 0, Filesystem type is xfs, partition type 0x83 Partition num: 1, Filesystem type unknown, partition type 0x82 Partition num: 2, Filesystem type is ext2fs, partition type 0x83 Partition num: 3, Filesystem type is xfs, partition type 0x83 grub> root (hd0,3) Filesystem type is xfs, partition type 0x83 grub> setup (hd0) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... no Error 15: File not found grub>
代码:
root [ / ]# ls -l /boot/grub total 104 -rw-r--r-- 1 root root 512 Oct 16 10:14 stage1 -rw-r--r-- 1 root root 100554 Oct 16 10:14 stage2 root [ / ]#
代码:
grub> find /boot/grub/stage1 (hd0,0) grub>
作者: tsingl 发布时间: 2008-10-22
/boot 不是 /mnt/xxx/boot ?
作者: 晨想 发布时间: 2008-10-22
引用:
作者: 晨想
/boot 不是 /mnt/xxx/boot ?
|
在编译环境 boot 的路径为:
/mnt/lfs/boot
在 chroot 环境 boot 的路径为:
/boot
作者: tsingl 发布时间: 2008-10-22
已解决。是路径不动。
mount /dev/sda4 /mnt
/mnt/boot/grub = /dev/sda4/boot/grub
感谢晨想同志的提醒。
mount /dev/sda4 /mnt
/mnt/boot/grub = /dev/sda4/boot/grub
感谢晨想同志的提醒。
作者: tsingl 发布时间: 2008-10-23
我也遇到这个错误了,但我看不太懂你怎么解决的。能详细点吗?
作者: lorking 发布时间: 2008-11-21
Mark,我还担心到时候grub不好认盘呢.
作者: qufo 发布时间: 2008-11-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28