先记录下,等有空翻译下,在Mac上制作树莓派的镜像还是比较麻烦的,好处是不需要第三方软件,用命令行就可以了。在windows上就比较简单。

On Mac OS you have the choice of the command line dd tool or using the graphical tool ImageWriter to write the image to your SD card.

(MOSTLY) GRAPHICAL INTERFACE

  • Connect the SD card reader with the SD card inside. Note that it must be formatted in FAT32.
  • From the Apple menu, choose About This Mac, then click on More info...; if you are using Mac OS X 10.8.x Mountain Lion or newer then click on System Report.
  • Click on USB (or Card Reader if using a built-in SD card reader) then search for your SD card in the upper right section of the window. Click on it, then search for the BSD name in the lower right section; it will look something like 'diskn' where n is a number (for example, disk4). Make sure you take a note of this number.
  • Unmount the partition so that you will be allowed to overwrite the disk; to do this, open Disk Utility and unmount it (do not eject it, or you will have to reconnect it). Note that On Mac OS X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "/dev/disk1s1" or similar, allowing you to skip the previous two steps.
  • From the terminal run:

    sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn

    Remember to replace n with the number that you noted before!

    • If this command fails, try using disk instead of rdisk:

      sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn

COMMAND LINE

  • If you are comfortable with the command line, you can write the image to a SD card without any additional software. Open a terminal, then run:

    diskutil list

  • Identify the disk (not partition) of your SD card e.g. disk4 (not disk4s1).
  • Unmount your SD card by using the disk identifier to prepare copying data to it:

    diskutil unmountDisk /dev/disk<disk# from diskutil>

    e.g. diskutil unmountDisk /dev/disk4

  • Copy the data to your SD card:

    sudo dd bs=1m if=image.img of=/dev/rdisk<disk# from diskutil>

    e.g. sudo dd bs=1m if=2015-05-05-raspbian-wheezy.img of=/dev/rdisk4

    • This may result in an dd: invalid number '1m' error if you have GNU coreutils installed. In that case you need to use 1M:

      sudo dd bs=1M if=image.img of=/dev/rdisk<disk# from diskutil>

    This will take a few minutes, depending on the image file size. You can check the progress by sending a SIGINFO signal pressing Ctrl+T.

    • If this command still fails, try using disk instead of rdisk:

      e.g. `sudo dd bs=1m if=2015-05-05-raspbian-wheezy.img of=/dev/disk4`

      or

      e.g. `sudo dd bs=1M if=2015-05-05-raspbian-wheezy.img of=/dev/disk4`

ALTERNATIVE METHOD

Note: Some users have reported issues with using Mac OS X to create SD cards.

These commands and actions need to be performed from an account that has administrator privileges.

  • From the terminal run df -h.
  • Connect the SD card reader with the SD card inside.
  • Run df -h again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example /dev/disk3s1.
  • Unmount the partition so that you will be allowed to overwrite the disk:

    sudo diskutil unmount /dev/disk3s1

    (or open Disk Utility and unmount the partition of the SD card (do not eject it, or you will have to reconnect it)

  • Using the device name of the partition, work out the raw device name for the entire disk by omitting the final "s1" and replacing "disk" with "rdisk". This is very important as you will lose all data on the hard drive if you provide the wrong device name. Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1). Similarly, you might have another SD drive name/number like rdisk2 or rdisk4; you can check again by using the df -h command both before and after you insert your SD card reader into your Mac. For example, /dev/disk3s1 becomes /dev/rdisk3.
  • In the terminal, write the image to the card with this command, using the raw disk device name from above. Read the above step carefully to be sure you use the correct rdisk number here:

    sudo dd bs=1m if=2015-05-05-raspbian-wheezy.img of=/dev/rdisk3

    If the above command reports an error (dd: bs: illegal numeric value), please change bs=1m to bs=1M.

    If the above command reports an error dd: /dev/rdisk3: Permission denied then that is because the partition table of the SD card is being protected against being overwritten by MacOS. Erase the SD card's partition table using this command:

    sudo diskutil partitionDisk /dev/disk3 1 MBR "Free Space" "%noformat%" 100%

    That command will also set the permissions on the device to allow writing. Now try the dd command again.

    Note that dd will not feedback any information until there is an error or it is finished; information will be shown and the disk will re-mount when complete. However if you wish to view the progress you can use 'ctrl-T'; this generates SIGINFO, the status argument of your tty, and will display information on the process.

  • After the dd command finishes, eject the card:

    sudo diskutil eject /dev/rdisk3

    (or: open Disk Utility and eject the SD card)


This article uses content from the eLinux wiki pageRPi_Easy_SD_Card_Setup, which is shared under the Creative Commons Attribution-ShareAlike 3.0 Unported license

在Mac上制作树莓派SD镜像相关推荐

  1. Mac 上制作 SSL 证书

    前言 我们在开发 https 服务时,需要引入相应的 SSL 证书. 今天,我就自己在 Mac 上制作 SSL 证书的过程做个记录. 环境 MacOS 10.15.7 工具 openssl 步骤 第一 ...

  2. 【树莓派】制作树莓派最小镜像:img裁剪瘦身

    摘录部分要点内容如下(如果作者不允许转载,请联系即删除): 一.查看当前系统所占容量  用Win32DiskImager来制作镜像时是将sd卡正卡全部做成镜像,是因为无法读取到linux分区的原因,所 ...

  3. 制作树莓派img镜像文件

    想做个树莓派的img镜像,然而对SD卡进行全盘复制很浪费空间,且不能恢复到比现有SD卡容量小的卡上,因此探索制作小img的方法,网上看了大神制作的脚本,比如https://github.com/con ...

  4. macu盘格式化linux系统盘,Mac上制作Linux U盘启动盘

    最近干了件蠢事,在使用lvreduce缩减一个lv时,把文件系统给搞挂了.问题是这样的,之前系统的/var目录已经建立在lv上,由于没有使用resize2fs缩小文件系统的大小,就直接缩小lv的大小, ...

  5. 树莓派入门教程 - 0 - 准备篇 - 0.0 SD卡制作树莓派系统镜像启动盘 开机

    电脑需要提前安装的工具: sd卡格式化工具 SDFormatter,官网下载链接:https://www.sdcard.org/downloads/formatter/ 镜像烧录工具 Win32 Di ...

  6. Mac上制作Centos7系统U盘安装盘

    Centos7 下载地址: http://101.110.118.47/isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD- ...

  7. Mac上制作Ubuntu USB启动盘

    原文首发自个人博客:http://jiangbo.me/blog/2011/11/09/create_ubuntu_usb_startdisk_on_mac/ 一.下载ubuntu iso镜像 二.将 ...

  8. Oracle Cloud Infrastructure(OCI)上制作RHEL7U4定制镜像

    参考 本实验完全参照了白皮书:White Paper:Journey to Oracle Cloud Infrastructure with Oracle VM VirtualBox .这篇老的白皮书 ...

  9. mac装linux系统u盘安装教程视频,mac上制作linux系统U盘安装盘

    第一步,将iso文件转为dmg文件. 如: HDIUTIL CONVERT -FORMAT UDRW -O CentOS-7-x86_64-DVD-1503-01 CentOS-7-x86_64-DV ...

最新文章

  1. Aspose.Words导出图片 表格 Interop.Word
  2. SCOM Logical Disk Free Space Monitor
  3. 利用simhash计算文本相似度
  4. ECLIPSE3.2安装 + 汉化 + 配置SWT DESIGNER6.2.0
  5. oracle 执行sql参数混乱,乱用_allow_resetlogs_corruption参数导致悲剧
  6. 百度媒体云智能编码技术实践
  7. 抽象类必须要有抽象方法吗?
  8. Android 向服务器发送XML数据及调用webservice
  9. (37)System Verilog类外方法示例
  10. 蔚来ES8停车场蛇形走位 连撞数车 官方回应:未证明是车辆失控
  11. Angular使用总结 --- 模型驱动表单
  12. iis中间件_.NET Core技术研究中间件的由来和使用
  13. Onvif协议学习:5、设备搜索
  14. “计算机组成原理”视频资料(加上全集链接啦)
  15. Composer 简介和基本用法
  16. 台式计算机外观组成部分,台式电脑由哪些部分组成?
  17. 如何将文件打包到jar包里面
  18. Linux账户设置能su不能ssh,ssh无法登录可以su切换的问题
  19. MFC之CFile读取和写入文件
  20. java8中新判空方法之Optional类的使用

热门文章

  1. python学习笔记1——(廖雪峰教程,菜鸟教程)python基础
  2. HAL库与Cubemx\rt-thread Nano系列教程-01-新建HAL工程及移植RT-Nano到Alios Developer Kit
  3. mysql排序后显示行数_让mysql的查询结果显示行号的方法
  4. 什么是Polygons标注
  5. 关于Oracle数据库的时间查询
  6. 小巧好用 乐得瑞USB PD诱骗测试治具上手体验
  7. 2019法硕考研视频资料(法学+非法学)【全】
  8. 网民“娱乐至上” 引领视频网站娱乐化趋势
  9. 罗马数字(暴力破解)
  10. PADS技巧--差分线画法