在Mac上制作树莓派SD镜像

Mac读取树莓派SD卡 & 树莓派制作系统盘镜像 made by Rk 本文由浙江大学《嵌入式系统》课程提供强力支持。 感谢翁恺老师 @翁恺BA5AG /*************************************************************/ 实验要求:如何在PC上修改SD里的文件和kernel image,如何将SD卡里的文件系统备份在PC的硬盘里以后可以dd。 其实就是: 在树莓 阅读详情

先记录下,等有空翻译下,在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上用Terminal给SD卡写入img镜像的方法 前言 给sd卡写入官方镜像,在windows上要用Win32 Disk Image,因为我用的是Mac系统切来切去有点麻烦,要是直接在Mac上写就方便多了。 对于要写入的SD卡,我们通常需要对它进行格式化,可以用格式化工具SD Card Formatter,这款格式化工具可以从SD官网下载 选中要操作的SD卡,点击Format即可; ###操作步骤 #####1.进入目录 插入要写入的sd卡,... 阅读详情

相关推荐

树莓派初次启动攻略for Mac

树莓派初次启动攻略for Mac made by Rk  感谢浙江大学《嵌入式系统》课程提供强力支持! /************************************************************************/ 本教程通过串口连接Macbook,笔记本端通过minicom操作树莓派。 树莓派初次启动需要以下几个步骤:   安装系统镜像

南极光的专栏 1万+

INSTALLING OPERATING SYSTEM IMAGES ON MAC OS

INSTALLING OPERATING SYSTEM IMAGES ON MAC OSOn 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 INTE

西涛offbye-移动全栈技术博客 1660

Mac 烧写树莓派系统

插入sd卡首先要将内存卡插入到电脑上 通过命令df -lh查看当前已挂在的卷,判断sd卡是否被读取iluhaodeMacBook-Air:Downloads administrator$ df -lh Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 233Gi

i逆天耗子 9464

Raspberry Pi: INSTALLING OPERATING SYSTEM IMAGES ON MAC OS

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

d3y1`5 81_09 1116

树莓派系统镜像烧录避坑大全:从Win/Mac到SD卡选型的完整指南

本文提供了一份详尽的树莓派系统镜像烧录避坑指南,涵盖Windows与macOS两大平台。文章深度对比了Raspberry Pi Imager、BalenaEtcher和Win32DiskImager三款主流烧录工具,并给出SD卡选型、格式化及寿命优化的专业建议,特别针对树莓派5的PCIe启动等新特性进行解析,旨在帮助用户高效完成树莓派环境安装,避免常见陷阱。

rgv2345678的博客 526

树莓派刷系统(mac)

## sdk卡刷系统前提,先格式化sd卡。下载好树莓派系统的镜像文件,在官网下载好自己需要的系统版本。https://www.raspberrypi.org/downloads/1. 查看磁盘信息```codedf -h```会看到磁盘信息大概如下,此时sdk的名字为PNY。```outputFilesystem Size Used Avail Capacity iused ...

the Coder And Writer 3882

linux 系统拷贝方法之dd指令

linux 系统拷贝方法之dd指令 准备一个移动硬盘和一个linux(一般是Ubuntu)启动盘进入试用系统 ///////////////////////////////////////////////////////////////////////////////////////////////// 1.制作系统拷贝 echo 插入移动硬盘和U盘移动盘,以U盘启动盘进入系统 echo 查看盘符...

kongxunxiaowei的博客 1722

33、手动写入SD卡镜像教程

本文详细介绍了在Windows和Mac系统下手动将操作系统镜像写入SD卡的方法。内容包括获取镜像文件、使用Image Writer工具以及dd命令进行写入的具体步骤,并分析了手动写入的优缺点和常见问题解决方法。适合需要多次安装系统或NOOBS无法正常工作的用户参考,帮助您顺利完成树莓派系统的部署。

h9j8k7l6m5n的博客 264

英伟达开发板学习系列----Ubuntu18.04 系统备份

NX系统备份(Ubuntu18.04) 备份前,先确认: 1.你当前的存放位置的空间大小足够备 2.依赖环境为Ubuntu18.04. 用dd指令备份。 sudo dd bs=4M if=/dev/sdb of=jetcard_image.img sta

weixin_51157015的博客 1668

Unity中的坐标系及其转换方法

Unity中的坐标系及其转换方法 Unity中有四种坐标系: 1.全局坐标系 World Coordinate System 全局坐标系是用于描述场景内所有物体位置的方向的基准,也称为世界坐标系,Unity中创建的物体都是以全局坐标系中的坐标原点(0,0,0),来确定各自的位置的,可以使用transform.position来获取游戏对象的世界坐标。 2.局部坐标系 Local Coordinate System 局部坐标系也称为模型坐标系或物体坐标系,每个物体都有自身独立的物体坐标系。当物体移动或改变方向

Z_hongli的博客 8185

时序分析基本概念介绍——SI/crosstalk/delta delay/noise/timing Window

信号完整性(Signal Integrity)指的是在周围高频电磁干扰环境中依然能够保持信号稳定的能力;串扰(Crosstalk)指的是相邻的两条或多条net之间的耦合电容带来的相互影响。随着工艺越来越先进,布线密度越来越高,串扰带来的影响越来越重要。在先进工艺节点下,对于STA的check,通常会引入SI(signal integrity)分析。在芯片的电学特性中,时序、串扰和功耗是三项相互相关的重要分析内容。

qq_34326957的博客 1万+

Jetson Nano 用dd指令备份/制作镜像文件(超详细)

——备份前的准备 在我们的日常开发中,备份是必不可少的,只有勤备份才能在发生致命错误的时候及时挽回。不然的话就是那句话:板子和你至少得确保能跑一个。当然本文中的备份操作等同于制作镜像操作,如果你是要想制作镜像文件,依然可以参考本文。废话少说,进入正题: 首先查看我们需要备份文件的信息,在板子的终端输入: df -hl 得到类似下面的输出: 第一行的/dev/mmcblk0就是我们所需要备份的文件(一般来说就是大的那个,注意没有p1) 记住这个文件系统对应的路径,我们后面备份的时候需要用到

A15280019132的博客 4378

【Unity报错】Unity导入海康SDK 报错 DllNotFoundException: PlayCtrl assembly

2.尝试按网上其他的办法(包括使用depengs查看dll依赖等)1.先检查Plugins文件夹中是否存在PlayCtrl文件。3.如果网上查阅的办法都不能解决,请继续往下看。更换低版本的SDK库文件。

weixin_42968584的博客 1130

树莓派启动盘制作和备份

1. 打开MAC的Terminal程序,执行df命令来查看文件系统的磁盘空间占用情况。 $ df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 233Gi 177Gi 56Gi 77% 46402434 14585085 76% ...

清风冰竹 3083

C#:WPF格式转Winform格式

WPF格式转Winform格式

Hello C++ 1296

YOLOv8模型轻量化实战:基于稀疏化剪枝与L1正则化的高效目标检测模型优化-附源码

本文提出一种YOLOv8轻量化方案,通过L1正则化稀疏化训练和动态阈值通道剪枝,在边缘计算场景中优化模型性能。方案分三步:首先通过L1正则诱导权重稀疏化并动态衰减系数;然后基于BN层权重统计进行通道剪枝,保留80%关键通道;最后对剪枝模型微调恢复精度。在COCO128数据集上验证,模型体积压缩40%,推理速度提升2.3倍,mAP仅下降0.4%,实现了精度与效率的平衡。该方案为移动端部署提供了可行的轻量化技术路径。

m0_64661770的博客 480

树莓派0w 移植linux,用Mac灌制树莓派系统

最近在折腾树莓派, 一般都是在Linux下下载镜像后, 然后 dd 命令搞定.今天不知道怎么的, 家里的 deepin linux 识别不了我的U盘了 (deepin的小伙子你们对内核做了啥? ), 所以我在想用身边的 Mac 做一下系统, 反正都是 Unix, 下面是折腾记录, 现在年纪大了, 不写下来, 以后记不住.下载树莓派镜像压缩包: 从 树莓派官方镜像 下载一个镜像压缩文件, 用 wge...

weixin_30141547的博客 274

ADAS方案设计-CAN网络管理与休眠唤醒机制

文章摘要:本文介绍了车载控制系统的五种工作模式及其转换条件,包括睡眠模式、准备睡眠模式、就绪睡眠模式、正常工作模式和重复消息状态。系统唤醒条件包括接收到网络管理报文或电源ON档信号,休眠条件则需满足电源OFF档、功能完成等多重要求。针对下挂节点的网络管理报文发送规则,详细说明了不同状态下的报文发送策略,特别是在哨兵模式、OTA模式等特殊场景下的处理方式。系统在满足休眠条件后会立即停止发送下挂节点网络管理报文,确保电源管理的有效性。

xiandang8023的博客 327

linux虚拟机备份树莓派,为树莓派做系统备份镜像(for Linux & Mac),

为树莓派做系统备份镜像(for Linux & Mac),准备一个SD卡让你花费了一些时间,不是么?我打赌你肯定不想再做一遍,对吧?好吧,我们来做一个备份!论坛用户,使用MAC并且是Adafruit的客户phil.drummond根据他自己的发现找到了最好的备份系统镜像的方法。并且他找到了一个十分快速而简单的方法 – 一个快速创建一个正在运行的树莓派系统的克隆,在小派本身上!注意:这个脚本...

weixin_29093169的博客 267

【语音识别】基于MFCC特征实现说话人语音识别matlab源码

1 模型 采用能够反映人对语音的感知特性的Mel频率倒谱系数(MFCC)作为特征参数,以及为避免时间规整问题采用矢量量化技术开发的说话人识别系统.MFCC主要的是模拟人耳的听觉过程,相对于其它参数它对语音波形的变化不敏感,更加稳定,系统取得很好的识别结果,实验表明系统训练和识别的计算量和存储量都比较低. 2 部分代码 functionvarargout=Main(varargin) % MAIN M-file for Main.fig % MAIN, by itself...

qq_59747472的博客 855

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

【Mac系统】树莓派开机

SD卡格式化sd卡: SD卡至少4G,如果有多个分区可以通过以下方式删除 通过安卓手机格式化SD卡(包括删除分区) 通过windows删除分区 文件写入制作一张操作系统SD卡 – Mac版Ray Vijoen写了一个实用的脚本使得在Mac上制作一张操作系统SD卡非常简单。它是一个shell脚本包含了创建操作系统SD卡的所有步骤,包括格式化。但你得使用命令行执行它。步骤1.从https://

兴国的博客 892

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

mac用户开发树莓派保姆级教程(一)系统的烧录

(一)系统的烧录

Zegens的博客 5100

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Mac下给SD卡烧录树莓派系统

1.mac 磁盘工具 抹掉sd卡 为fat 2. df -h 看清sd卡号 3. 卸载sd卡 diskutil unmount /dev/disk2s2 Volume UNTITLED on disk2s2 unmounted 4.列出sd卡分区 diskutil list /dev/disk0 (internal): #: ...

b305723的专栏 1351

【转载】树莓派搭建OpenEluer环境(1):烧写镜像

实验环境 获取树莓派 img 镜像 刷写 SD 卡 Windows 环境 格式化 SD 卡 写入 SD 卡 Linux 环境 查看磁盘分区信息 卸载 SD 卡挂载点 写入 SD 卡 Mac 环境 查看磁盘分区信息 卸载 SD 卡挂载点 写入 SD 卡 树莓派使用 实验环境 Windows10/Linux/Mac 树莓派 3B/3B+/4B 8G 及以上的 Micro SD 卡 获取树莓派 img 镜像 下载适配树莓派的最新 openEuler 镜像,下面以获取 openE..

搞IC的小冯 790

mac 树莓派 kali linux系统,MacOS制作树莓派kali系统

MacOS制作树莓派kali系统:准备工具:MacBook一台SD卡一张转接头一个下载kali树莓派专用系统:首先在kali官网下载树莓派专用系统;官网下载链接:https://www.offensive-security.com/kali-linux-arm-images/点击链接进入下载界面,找到RaspberryPi Foundation,选择下载模式,推荐选择Torrent种子下载。 下...

weixin_28692153的博客 282
上一篇: Git从远程的分支获取最新的版本到本地
下一篇: 深入浅出学Spring Data JPA
offbye
offbye 领域专家: 操作系统技术领域 领域专家: 操作系统技术领域
博客等级 码龄24年 1309粉丝 252原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址