linux克隆tf卡中的内容,如何克隆SD卡的内容 - openthings的个人空间 - OSCHINA - 中文开源技术交流社区...

如何克隆SD卡的内容

树莓派安装好了软件,其它的需要重复安装。直接拷贝文件是不行的,因为安装过程中产生了新的分区。使用dd做克隆,就可以全部复制过去。

##step1. 定位你的SDCard

命令行输入:

diskutil list

显示如:

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 90.7 GB disk0s2

3: Apple_HFS d 34.9 GB disk0s3

4: Apple_HFS f 65.6 GB disk0s4

5: Apple_HFS g 59.1 GB disk0s5

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: Apple_partition_scheme *14.2 MB disk1

1: Apple_partition_map 32.3 KB disk1s1

2: Apple_HFS Flash Player 14.2 MB disk1s2

/dev/disk2

#: TYPE NAME SIZE IDENTIFIER

0: Apple_partition_scheme *16.1 MB disk2

1: Apple_partition_map 32.3 KB disk2s1

2: Apple_HFS Flash Player 16.0 MB disk2s2

/dev/disk3

#: TYPE NAME SIZE IDENTIFIER

0: FDisk_partition_scheme *31.9 GB disk3

那么你的sdcard就是盘符disk3

##step2. 用原卡制作镜像

命令行输入, 制作镜像文件:

sudo dd if=/dev/rdisk3 of=/Users/liangwei/Downloads/yihud3.dmg bs=1m

##step3. 格式化新卡

把元卡拿出来, 把新卡放进去, 然后同step1, 找到新卡盘符, 然后命令行:

diskutil unmountDisk /dev/disk3

sudo newfs_msdos -F 32 /dev/disk3

##step4. 烧写新卡

sudo dd if=/Users/liangwei/Downloads/yihud3.dmg of=/dev/rdisk3 bs=1m

树莓派的镜像卡也是这样烧写, 但是格式化的时候需要格式化为 FAT16:

sudo newfs_msdos -F 16 /dev/disk3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值