1.安装工具
[root@localhost ~]# yum install -y squashfs-tools1
2.用unsuqashfs命令直接解压缩squashfs.img
[root@localhost ~]# unsquashfs squashfs.imgParallel unsquashfs: Using 48 processors1 inodes (16384 blocks) to write[====================================================================================================================================================================================-] 16384/16384 100%
created 1 files
created 2 directories
created 0 symlinks
created 0 devices
created 0 fifos1234567891011
3.挂载文件系统
[root@localhost ~]# cd squashfs-root/LiveOS/
[root@localhost LiveOS]# mount rootfs.img /mnt/rootfs/
[root@localhost LiveOS]# ls /mnt/rootfs/
bin boot dev etc firmware lib lib64 lost+found mnt modules proc root run sbin sys tmp usr var
4.根据需要可以修改/mnt/rootfs目录下文件
5.修改后重新打包
[root@localhost ~]# mksquashfs squashfs-root/ squashfs.img -comp xz -Xbcj x86 -e boot
Parallel mksquashfs: Using 48 processors
Creating 4.0 filesystem on squashfs.img, block size 131072.
[====================================================================================================================================================================================-] 16384/16384 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 442739.12 Kbytes (432.36 Mbytes)
21.11% of uncompressed filesystem size (2097216.44 Kbytes)
Inode table size 23442 bytes (22.89 Kbytes)
35.69% of uncompressed inode table size (65690 bytes)
Directory table size 58 bytes (0.06 Kbytes)
100.00% of uncompressed directory table size (58 bytes)
Xattr table size 55 bytes (0.05 Kbytes)
100.00% of uncompressed xattr table size (55 bytes)
Number of duplicate files found 0
Number of inodes 3
Number of files 1
Number of fragments 0
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 2
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://www.hqyman.cn/post/6582.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
打赏微信支付宝扫一扫,打赏作者吧~
休息一下~~