osx截断SD卡img [英] osx truncate sd card img

查看:31
本文介绍了osx截断SD卡img的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 dd 工具创建了包含raspbian的SD卡图像.这给了我一个16,09 GB的大映像文件.那里的实际数据约为5gb,我想将其截断,以便将其存储/克隆到8gb sd卡上.

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.

我发现所有帮助结果都需要Linux来完成(例如,resize2fs之类的工具似乎不适用于osx,至少不能用自制软件找到它).

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).

我可以使用哪些工具删除.img文件的空"空间?

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

推荐答案

如果您只是使用 dd 创建的,则它只是转储文件,没有特定于文件系统的解释,因此您可以轻松地进行操作使用 dd 获取前6GB左右:

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

这篇关于osx截断SD卡img的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆