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- ...
随机推荐
- SpringJUnit4测试--测试无反应/控制台报空指针的解决---junit的jar冲突!
前言: 前些日子碰到一个诡异的问题--用springJUnit进行测试,运行方法什么反应也没有,控制台 也没有输出,百度也没有答案--只好暂时作罢.今天我只好用上了排除法,建个测试小项目,将只要能测试 ...
- 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1]。不能使用除法。
// test14.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include<iostream> #include< ...
- sql查询结果本身要被使用两次
一.问题 查询用户所有的错题数目到前端展示,要求展示的时候要有错题的编号,从1开始递增.如果删除了第5题,则将后面的题编号均向前挪. 二.分析 错题是在用户每次做题过程中插入到错题表中的,或者将题目推 ...
- C# 生成MD5编码方法(不同位数)
/// <summary> /// </summary> /// <param name="strSource"& ...
- MVC4 错误: 检测到有潜在危险的 Request.Form值
说明: 请求验证过程检测到有潜在危险的客户端输入值,对请求的处理已经中止.该值可能指示存在危及应用程序安全的尝试,如跨站点脚本攻击.若要允许页面重写应用程序请求验证设置,请将 httpRuntime ...
- HTML中动态图片切换JQuery实现
相信很多同学都注意到了,各大新闻或者娱乐网站都含有动态图片切换,那个漂亮的感觉让刚刚学习html的人,都非常好奇和心动.那下面就让我们看一下到底如何实现动态图片切换呢?看一下百度贴吧的效果图吧~ // ...
- jQuery1.9.1源码分析--Animation模块
var fxNow, // 使用一个ID来执行动画setInterval timerId, rfxtypes = /^(?:toggle|show|hide)$/, // eg: +=30.5px / ...
- Unity3D脚本中文系列教程(四)
http://dong2008hong.blog.163.com/blog/static/4696882720140302451146/ Unity3D脚本中文系列教程(三) 送到动画事件. ◆ va ...
- 中国移动MM Android/OPhone付费SDK--MMBillingSDK,集成问题总结
原地址:http://www.j2megame.com/html/xwzx/ty/2916.html 中国移动MM Android/OPhone付费SDK--MMBillingSDK,集成问题总结 近 ...
- D&F学数据结构系列——红黑树
红黑树 定义:一棵二叉查找树如果满足下面的红黑性质,则为一棵红黑树: 1)每个结点不是红的就是黑的 2)根结点是黑的 3)每个叶结点是黑的 4)如果一个结点是红的,它的两个儿子都是黑的(即不可能有两个 ...