/**********************************************************************
* How to modify squashfs image
* 说明:
* 本文如何使用squashfs-tools对squashfs image进行解压及合成。
*
* 2016-4-27 深圳 南山平山村 曾剑锋
*********************************************************************/ 参考文档:
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.
你不能直接修改squashfs镜像,当时你可以解压他,然后修改文件,最后在压缩他。 Create temporary directory and enter it:
创建暂存文件夹,并进入:
$ mkdir squashfs-temp
$ cd squashfs-temp To uncompress squashfs image (into squashfs-root directory) use unsquashfs command:
解压squashfs镜像(进入squashfs-root文件夹)使用unsquashfs命令:
$ unsquashfs /live/image/livefs.squashfs
Parallel unsquashfs: Using processors
inodes ( blocks) to write [===========================================================-] / %
created files
created directories
created symlinks
created devices
created fifos After applying required changes you can compress it using mksquashfs command:
修改完你的需求之后,重新压缩并制作squashfs镜像:
$ mksquashfs squashfs-root/ livefs.squashfs -noappend -always-use-fragments
Parallel mksquashfs: Using processors
Creating 4.0 filesystem on livefs.squashfs, block size .
[===========================================================|] / %
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size
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 bytes (883.83 Kbytes)
29.51% of uncompressed inode table size ( bytes)
Directory table size bytes (895.63 Kbytes)
44.02% of uncompressed directory table size ( bytes)
Number of duplicate files found
Number of inodes
Number of files
Number of fragments
Number of symbolic links
Number of device nodes
Number of fifo nodes
Number of socket nodes
Number of directories
Number of ids (unique uids + gids)
Number of uids
root ()
daemon ()
milosz ()
kdm ()
libuuid ()
man ()
Number of gids
root ()
daemon ()
fuse ()
shadow ()
milosz ()
vboxsf ()
tty ()
crontab ()
mail ()
mlocate ()
ssh ()
messagebus ()
nogroup ()
utmp ()
utempter ()
staff ()
libuuid ()

How to modify squashfs image的更多相关文章

  1. 创建squashfs

    SquashFS 通常的livecd都有一个这个文件,是核心的文件系统 SquashFS 也是一个只读的文件系统,它可以将整个文件系统压缩在一起,存放在某个设备,某个分区或者普通的文件中.如果您将其压 ...

  2. AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

    异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html 应用场景:ViewModel==>Mode映射的时候出错 AutoMappe ...

  3. Modify Branding of FreeCAD

    Modify Branding of FreeCAD eryar@163.com This article describes the Branding of FreeCAD. Branding me ...

  4. -bash: ulimit: pipe size: cannot modify limit: Invalid argument

    从root账号切换到oracle账号时,出现了"-bash: ulimit: pipe size: cannot modify limit: Invalid argument"提示 ...

  5. Cannot send session cache limiter Cannot modify header information

    当php报出  Cannot send session cache limiter 或Cannot modify header information   的错误时   其理论上是因为php代码以前有 ...

  6. (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about t

    运行redis过程中,突然报错如下: (error) MISCONF Redis is configured to save RDB snapshots, but is currently not a ...

  7. 阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决方法

    阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决 ...

  8. Modify a Stored Procedure using SQL Server Management Studio

    In Object Explorer, connect to an instance of Database Engine and then expand that instance. Expand  ...

  9. Modify textures at runtime

    动态修改Texture Modify textures at runtime?http://answers.unity3d.com/questions/7906/modify-textures-at- ...

随机推荐

  1. 'mysql' 不是内部或外部命令,也不是可运行的程序或批处理文件的解决办法

    前言: 本文的解决方法来自http://www.cnblogs.com/xionghui/archive/2012/04/11/2442404.html --感谢! 问题描述:新电脑装mysql后在c ...

  2. jquery each函数对应的continue 和 break方法

    continue: return true; break: return false; $("#oGrid").each(function (i, v) { if (i == 0) ...

  3. asynDBcenter(复习)

    asynDBCenter asynDBCenter是GS和DBCenter之间的模块,有了他GS访问数据库就是异步的了,以前是同步的,加入某个操作很耗时那么GS就在那等待这个返回值. .对于std:: ...

  4. DC-DC升压(BOOST)电路原理

    BOOST升压电路中:      电感的作用:是将电能和磁场能相互转换的能量转换器件,当MOS开关管闭合后,电感将电能转换为磁场能储存起来,当MOS断开后电感将储存的磁场能转换为电场能,且这个能量在和 ...

  5. oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)

    oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录) 分类: ORACLE 数据库 2011-05-24 16:39 8427人阅读 评论(2) 收藏 举报 oracledel ...

  6. PHP字符串函数之 strstr stristr strchr strrchr

    strstr -- 查找字符串的首次出现,返回字符串从第一次出现的位置开始到该字符串的结尾或开始. stristr -- strstr 函数的忽略大小写版本 strchr -- strstr 函数的别 ...

  7. structs spring hibernate 三者之间有什么关系?

    现在开发流行MVC模式,structs在C(控制器)中使用:hibernate在M(模型)中被使用:至于 spring ,最大的作用在于,structs.hibernate的对象,由于在各个层之间相互 ...

  8. hdu 1352 I Conduit!

    计算几何,主要是排序问题,其他都很好做…… ;}

  9. android 输入法的打开和关闭

    一.打开输入法窗口: InputMethodManager inputMethodManager = (InputMethodManager)  getSystemService(Context.IN ...

  10. Git fetch和git pull的区别(转)

    原文: http://www.tech126.com/git-fetch-pull/ Git中从远程的分支获取最新的版本到本地有这样2个命令:1. git fetch:相当于是从远程获取最新版本到本地 ...