zoukankan      html  css  js  c++  java
  • 模拟虚拟的文件系统initrd/initramfs

    请看initramfs文件的以下解析:

     1 [root@ant-colonies boot]# ls
     2 config-2.6.32-573.el6.x86_64         lost+found
     3 efi                                  symvers-2.6.32-573.el6.x86_64.gz
     4 grub                                 System.map-2.6.32-573.el6.x86_64
     5 initramfs-2.6.32-573.el6.x86_64.img  vmlinuz-2.6.32-573.el6.x86_64
     6 [root@ant-colonies boot]# file initramfs-2.6.32-573.el6.x86_64.img 
     7 initramfs-2.6.32-573.el6.x86_64.img: gzip compressed data, from Unix, last modified: Thu Jan 19 21:36:05 2017, max compression
     8 [root@ant-colonies boot]# mkdir /initrd
     9 [root@ant-colonies boot]# cp initramfs-2.6.32-573.el6.x86_64.img /initrd
    10 [root@ant-colonies boot]# cd /initrd
    11 [root@ant-colonies initrd]# mv initramfs-2.6.32-573.el6.x86_64.img initramfs-2.6.32-573.el6.x86_64.gz
    12 [root@ant-colonies initrd]# gunzip initramfs-2.6.32-573.el6.x86_64.gz
    13 [root@ant-colonies initrd]# ls
    14 initramfs-2.6.32-573.el6.x86_64
    15 [root@ant-colonies initrd]# file initramfs-2.6.32-573.el6.x86_64 
    16 initramfs-2.6.32-573.el6.x86_64: ASCII cpio archive (SVR4 with no CRC)
    initramfs-2.6.32-573.el6.x86_64.img解压缩解析

     由以上图示可以看出:虚拟文件系统模拟的就是根的启动过程

    下面通过chroot来模拟一个虚拟的文件系统(虚拟根):

  • 相关阅读:
    大四实习有点晚[转载]
    .net2.0数据绑定语法
    明天要去南京了
    Master & Content Page Relation(Event Ordering)
    在验证中使用图像和声音(ErrorMessage)
    设置FLash透明
    Basic Skill in .net2.0
    教育研究方法
    程序员是如何捕猎大象的[转]
    My lost card
  • 原文地址:https://www.cnblogs.com/ant-colonies/p/6476147.html
Copyright © 2011-2022 走看看