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- ...
随机推荐
- protocol buffer 整数序列化
http://blog.csdn.net/csfreebird/article/details/7624807 varints用于正整数 (无符号整数) varints 是 一个很不错的技术.将一个整 ...
- Matlab实现求a到b被c整除的个数
我先想到的是for循环........ 然后sum(find(mod(a:b,c)==0)),从10到100得到874,为什么不对呢? 比如a = [1 2 3 4 2 3 4 2],find(a= ...
- STL中的stack(堆栈)
转载:http://blog.csdn.net/morewindows/article/details/6950881 栈(statck)这种数据结构在计算机中是相当出名的.栈中的数据是先进后出的(F ...
- Asp.net 程序部署问题——在应用程序级别之外使用注册为 allowDefinition='MachineToApplicati错误信息
[转]在应用程序级别之外使用注册为 allowDefinition='MachineToApplicati 错误信息: ======================================== ...
- SilverLight页面跳转(转载)
// Silverlight页面的跳转 // (Application.Current.RootVisualasIContent).Content=newDragControl(); //Silver ...
- poj 2387 Til the Cows Come Home (最短路,dijkstra模版题)
题目 #define _CRT_SECURE_NO_WARNINGS #include<string.h> #include<stdio.h> #include<math ...
- hadoop聚群的安装
第一部分,安装单机hadoop 1,安装ssh sudo apt-get install ssh 注意:如果执行不了这句,那就先执行:sudo apt-get update 2,安装rsync sud ...
- Linux如何修改文件/文件夹内所有文件的权限
一.修改文件权限 修改文件权限前,需要了解一下权限中的”rwx”与数字的对应关系,其中r=4,w=2,x=1. 例如:”drwxr-xr-x”,第一个”d”是代表文件夹,这里不用考虑,后面九个字符,每 ...
- 规范化ProjectEuler
Euler Level3 规范化程序: 包名:LevelX,X是等级 每题程序名:PE0xx.java,PE0xx.py 程序有必要的注释,不同方法运行结果也在程序中 规范化博文: 名字:Projec ...
- Delphi 7事件的多处理机制
Delphi 7事件的多处理机制Allen Tao2007-08-19 首先解释一下这个题目.在我使用Delphi 7的过程中发现,一个对象的事件只能被一个过程处理.如果多次给这个对象的事件赋给处理事 ...