cramfs文件解压
cramfsck: superblock magic not found,mount: you must specify the filesystem type
今天给了几个img文件,说是cramfs格式的,让我解压,于是我就按照网上的两种方法
1)cramfsck -x <dir_name> file.cramfs.img
2)mount -o loop file.cramfs.img <dir_name>
但是分别出现了
cramfsck: superblock magic not found
mount: you must specify the filesystem type
这两个错误
google了一阵子,发现我这些img文件,都含有头,于是我输入
#File test.cramfs.img
#test.cramfs.img: u-boot/PPCBoot image
用UE打开img文件,如下所示
表示含有64个字节的头,删除此64个字节(即前4行),保存
然后输入
#file test.cramfs.img
#test.cramfs.img: Linux Compressed ROM File System data, ......
#mkdir test
#mount -o loop test.cramfs.img test/
成功!