osx truncate sd card img [closed]

两盒软妹~` 提交于 2019-12-25 19:52:10

问题


I have created an image of my sd card containing raspbian using the dd tool. This gave me a 16,09 GB big image file. The actual data on there is about 5gb, and I want to truncate it so I can store/clone it onto a 8gb sd card.

All help results I found required Linux to do this (tools like resize2fs doesn't appear to be available for osx, at least, can't find it with homebrew).

What tool(s) can I use to remove the 'empty' space of my .img file?


回答1:


If you just created it using dd, it is just a dump with no filesystem-specific interpretation, so you can just as easily use dd to get the first 6GB or so:

dd if=Existing16GBimage.img of=New6GBimage.img bs=1m count=6000


来源:https://stackoverflow.com/questions/43210957/osx-truncate-sd-card-img

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!