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- ...
随机推荐
- css3 怎么实现像书籍装订线的效果
.test{ width: 150px; height: 150px; margin: 20% auto; background-color: white; background-image: rep ...
- VIM配置自动提示功能
问题描述: 使用VIM作为Linux下的IDE,但是VIM默认情况下不支持自动代码提示功能,因此希望安装插件实现自动提示功能,目前找到的自动提示工具,非常好用 ...
- [转载]AFX_MANAGE_STATE关于资源切换
应用程序进程本身及其调用的每个DLL模块都具有一个全局唯一的HINSTANCE句柄,它们代表了DLL或EXE模块在进程虚拟空间中的起始地址.进程本身的模块句柄一般为0x400000,而DLL模块的缺省 ...
- ios开发之多线程
多线程的主要是用来执行一些耗时操作,例如网络图片.视频.歌曲.书籍等资源下载,游戏中的音乐播放等,充分发挥多核处理器的优势,并发(同时执行)任务让系统运行的更快.更流畅. 介绍下比较常用的多线程技术, ...
- intellij idea 14 ULTIMATE 注册码
Name:happy KEY:63763-YCO0I-QR4TV-G4I3E-4XGK9-GQSQ3
- HDU 1829 A Bug's Life(种类并查集)
思路:见代码吧. #include <stdio.h> #include <string.h> #include <set> #include <vector ...
- C#的cs文件中Response.Clear();Response.ClearHeaders()的作用
在学习一个CS文件,如下:public partial class GetPic : System.Web.UI.Page{ protected void Page_Load(object se ...
- C# foreach循环绑定key数组和value 数组(备用)
<div class="ContextualTab inner_warp clearfix" data-max="2" data-blur=false d ...
- hdu 1333 Smith Numbers
刚开始没看清题意,要找的数一定要是素数 ;}
- cojs 自己出的题目 解题报告
省选成功成为河北B队队长QAQ 真是忧桑 所以在cojs上出了一套鬼畜的关于树的套题 黑白树: 我们先不考虑R操作 设x是u的祖先,那么fa(x)的贡献显然是 fa(x)*(sz(fa(x))-sz( ...