在新机器上生成镜像的时候,出现了这个错误。
经查阅,应该安装android-tools-fsutils
应该运行下面的命令
sudo apt-get update
sudo apt-get install android-tools-fsutils
然后使用make_ext4fs
制作镜像的时候出现了一个空间不足的错误,
root@mavel-Infernity:~/compilePlace/creater5.7# make_ext4fs -s -l 200M -a root -L linux system.img root
Creating filesystem with parameters:
Size: 314572800
Block size: 4096
Blocks per group: 32768
Inodes per group: 6400
Inode size: 256
Journal blocks: 1200
Label: linux
Blocks: 76800
Block groups: 3
Reserved block group size: 23
error: ext4_allocate_best_fit_partial: failed to allocate 2029 blocks, out of space?
经实验, 原来是因为root文件夹本身就占用了320MB的空间, 但是指定system.img的大小只有200MB,所以重新制定空间为330MB,成功解决了问题。
root@mavel-Infernity:~/compilePlace/creater5.7# make_ext4fs -s -l 330M -a root -L linux system.img root
Creating filesystem with parameters:
Size: 346030080
Block size: 4096
Blocks per group: 32768
Inodes per group: 7040
Inode size: 256
Journal blocks: 1320
Label: linux
Blocks: 84480
Block groups: 3
Reserved block group size: 23
Created filesystem with 13478/21120 inodes and 83940/84480 blocks
网友评论