How to modify squashfs image
/**********************************************************************
* 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的更多相关文章
- 创建squashfs
SquashFS 通常的livecd都有一个这个文件,是核心的文件系统 SquashFS 也是一个只读的文件系统,它可以将整个文件系统压缩在一起,存放在某个设备,某个分区或者普通的文件中.如果您将其压 ...
- 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 ...
- Modify Branding of FreeCAD
Modify Branding of FreeCAD eryar@163.com This article describes the Branding of FreeCAD. Branding me ...
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
从root账号切换到oracle账号时,出现了"-bash: ulimit: pipe size: cannot modify limit: Invalid argument"提示 ...
- Cannot send session cache limiter Cannot modify header information
当php报出 Cannot send session cache limiter 或Cannot modify header information 的错误时 其理论上是因为php代码以前有 ...
- (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 ...
- 阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决方法
阿里云服务器出现Warning: Cannot modify header information - headers already sent by (output started at 问题的解决 ...
- 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 ...
- Modify textures at runtime
动态修改Texture Modify textures at runtime?http://answers.unity3d.com/questions/7906/modify-textures-at- ...
随机推荐
- c++ memset 函数 及 坑
#include <string.h> #include <stdio.h> typedef struct ss{ int num; ][]; }tent; tent a; i ...
- 【BZOJ】【1927】【SDOI2010】星际竞速
网络流/费用流 比较简单的一题,对于每个星球,将它拆成两个点,然后二分图建模:左部结点与S相连,流量为1费用为0:右部结点与T相连,流量为1费用为0:对于每条航道x->y,连边x->y+n ...
- 【POJ】【2975】Nim
博弈论 我哭……思路错误WA了6次?(好像还有手抖点错……) 本题是要求Nim游戏的第一步必胜策略有几种. 一开始我想:先全部异或起来得到ans,从每个比ans大的堆里取走ans个即可,答案如此累计… ...
- Recommender Systems移动互联网个性化游戏推荐
对于在线商店,主要关心两方面:1. 提升转化率(将不消费的用户转变为消费用户):2. 提升消费额(已经花钱的人,花更多的强). 对比了6种方法:1. 协同过滤:2. slope one:3. 基于内容 ...
- WCF 基础
ServiceModel 配置元素 Binding 配置元素: 客户端Web.config: <?xml version="1.0" encoding="utf-8 ...
- Asp.net 程序部署问题——在应用程序级别之外使用注册为 allowDefinition='MachineToApplicati错误信息
[转]在应用程序级别之外使用注册为 allowDefinition='MachineToApplicati 错误信息: ======================================== ...
- rabbitMQ安装及部署
1.安装 rpm -ivh erlang-18.3-1.el6.x86_64.rpm, 下载地址:http://www.rabbitmq.com/releases/erlang/ rpm --impo ...
- Openflow的转发与传统的转发区别和优势
来源:(SDN QQ群语录20130819) http://www.sdnap.com/sdnap-post/2411.html 山东同学-菜(Q群279796875) 21:40:21我是想问,op ...
- 欧拉工程第67题:Maximum path sum II
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the ma ...
- 【Linux高频命令专题(7)】rm
简述 rm是常用的命令,该命令的功能为删除一个目录中的一个或多个文件或目录,它也可以将某个目录及其下的所有文件及子目录均删除.对于链接文件,只是删除了链接,原有文件均保持不变. 命令格式 rm [选项 ...