Linux内核笔记(2) 内核引导之initrd.img
2011-05-22 20:16
253 查看
从Linux 2.6内核开始,编译生成的initrd.img文件已经不再是loop方式,而是改用了cpio的方式,因此也就不能再使用loop方式来mount了。
会有如下的错误提示。
# mount -o loop initrd-2.6.18-92.el5.img /mnt
mount: you must specify the filesystem type
# file initrd-2.6.18-92.el5.img
initrd-2.6.18-92.el5.img: gzip
compressed data, from Unix, last modified: Tue Mar 24 02:25:06 2009, max compression
可以用下面的方式来解压。
# cp /boot/initrd.img /tmp/initrd.gz
# cd /tmp
# gunzip initrd.gz (生成了initrd)
# file initrd
initrd.img: ASCII cpio
archive (SVR4 with no CRC)
# cpio -i < initrd.img (cpio解压缩)
解压后得到文件系统
bin
sbin
etc
init //POSIX shell script text executable
conf
lib
scripts
http://oss.lzu.edu.cn/modules/lifetype/index.php?op=ViewArticle&articleId=260&blogId=6 这里讲解了怎么***的,但是没看懂什么意思。。。。
慢慢来吧
会有如下的错误提示。
# mount -o loop initrd-2.6.18-92.el5.img /mnt
mount: you must specify the filesystem type
# file initrd-2.6.18-92.el5.img
initrd-2.6.18-92.el5.img: gzip
compressed data, from Unix, last modified: Tue Mar 24 02:25:06 2009, max compression
可以用下面的方式来解压。
# cp /boot/initrd.img /tmp/initrd.gz
# cd /tmp
# gunzip initrd.gz (生成了initrd)
# file initrd
initrd.img: ASCII cpio
archive (SVR4 with no CRC)
# cpio -i < initrd.img (cpio解压缩)
解压后得到文件系统
bin
sbin
etc
init //POSIX shell script text executable
conf
lib
scripts
http://oss.lzu.edu.cn/modules/lifetype/index.php?op=ViewArticle&articleId=260&blogId=6 这里讲解了怎么***的,但是没看懂什么意思。。。。
慢慢来吧
相关文章推荐
- Linux-0.11内核学习笔记【1】:启动引导
- linux 0.12 源码学习笔记(一)内核引导
- linux内核分析笔记----内核可移植性
- linux内核移植-内核调试工具KGBD、DDD、GDB移植笔记
- linux内核学习笔记【二】最终内核页表 Final kernel Page Table
- 【Linux技术】Linux内核Initrd机制解析,内核更新步骤,grub配置说明
- linux内核完全剖析0.12笔记--第三章 内核编程语言和环境
- 使用cpio解压2.6内核的initrd.img
- linux 2.6内核initrd.img文件分析
- linux内核设计与实现的读书笔记1 -内核开发头文件
- UBOOT引导Linux内核及向内核传递参数的方式
- UBOOT引导Linux内核及向内核传递参数的方式
- 【内核】Linux内核Initrd机制解析,内核更新步骤,grub配置说明
- linux内核学习笔记【一】临时内核页表 Provisional kernel Page Tables
- 内核笔记2-Linux内核进程控制
- Linux内核学习笔记:内核同步
- linux内核探索:定制自己的initrd.img-转载并修改
- 学习笔记:u-boot引导内核启动
- u-boot-2009.08引导内核学习笔记
- RedHat5.8 编译内核驱动 合成initrd.img