场景说明:因为需要重新定制squashfs.img文件的大小,其实是稀疏文件的大小,和实际文件的大小有区别。实际的操作如下:
1)dd if=/dev/zero of=rootfs bs=65536 count=24000
2)mke2fs -F rootfs
3)mkdir mnt
4)mount rootfs mnt -o loop
5)cp -rp yourRootDir mnt
6)umount mnt
7)mkdir squashfs-dir
8)mv rootfs squshfs-dir
9)mksquashfs squashfs-dir squashRootfs
出现挂载异常:
mount :wrong fs type,bad option,bad superblock on /dev/mapper/live-rw
missing codepage or helper program,other error
In some cases useful info is found in syslog -try dmesg |tail or so
本文转自fengyuzaitu 51CTO博客,原文链接:http://blog.51cto.com/fengyuzaitu/1570753,如需转载请自行联系原作者