zoukankan      html  css  js  c++  java
  • 【转】How to modify squashfs image

    出自https://blog.sleeplessbeastie.eu/2012/05/27/how-to-modify-squashfs-image/

    You cannot modify squashfs image directly but you can uncompress it, apply changes and compress it again.

    Create temporary directory and enter it:

    $ mkdir squashfs-temp
    $ cd squashfs-temp

    To uncompress squashfs image (into squashfs-root directory) use unsquashfs command:

    $ unsquashfs /live/image/livefs.squashfs 
    Parallel unsquashfs: Using 4 processors
    79505 inodes (89340 blocks) to write
    
    [===========================================================-] 89340/89340 100%
    created 72260 files
    created 9630 directories
    created 7245 symlinks
    created 0 devices
    created 0 fifos

    After applying required changes you can compress it using mksquashfs command:

    $ mksquashfs squashfs-root/ livefs.squashfs -noappend -always-use-fragments
    Parallel mksquashfs: Using 4 processors
    Creating 4.0 filesystem on livefs.squashfs, block size 131072.
    [===========================================================|] 82095/82095 100%
    Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
          compressed data, compressed metadata, compressed fragments, compressed xattrs
          duplicates are removed
    Filesystem size 1191282.88 Kbytes (1163.36 Mbytes)
          46.01% of uncompressed filesystem size (2589278.95 Kbytes)
    Inode table size 905038 bytes (883.83 Kbytes)
          29.51% of uncompressed inode table size (3066958 bytes)
    Directory table size 917125 bytes (895.63 Kbytes)
          44.02% of uncompressed directory table size (2083295 bytes)
    Number of duplicate files found 9152
    Number of inodes 89135
    Number of files 72260
    Number of fragments 6406
    Number of symbolic links  7246
    Number of device nodes 0
    Number of fifo nodes 0
    Number of socket nodes 0
    Number of directories 9629
    Number of ids (unique uids + gids) 19
    Number of uids 6
          root (0)
          daemon (1)
          milosz (1000)
          kdm (106)
          libuuid (100)
          man (6)
    Number of gids 17
          root (0)
          daemon (1)
          fuse (105)
          shadow (42)
          milosz (1000)
          vboxsf (104)
          tty (5)
          crontab (102)
          mail (8)
          mlocate (107)
          ssh (108)
          messagebus (106)
          nogroup (65534)
          utmp (43)
          utempter (112)
          staff (50)
          libuuid (101)

  • 相关阅读:
    异常部分
    5.Spring Cloud初相识-------Hystrix熔断器
    4.Spring Cloud初相识--------Feign负载均衡
    3.Spring Cloud初相识--------Ribbon客户端负载均衡
    2.Spring Cloud初相识--------Eureka服务注册与消费
    17、SpringBoot------整合dubbo
    3.Hadoop测试Yarn和MapReduce
    2.Hadoop集群安装进阶
    1.Hadoop集群安装部署
    3.Netty的粘包、拆包(二)
  • 原文地址:https://www.cnblogs.com/libra13179/p/13718213.html
Copyright © 2011-2022 走看看