-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMac write pi
42 lines (33 loc) · 1.73 KB
/
Mac write pi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
https://github.com/ccforward/cc/issues/25
用SD Memory Card Formatter for Mac format https://www.sdcard.org/downloads/formatter_4/eula_mac/index.html
Mac下给SD卡安装 Raspbian 系统
1、安装
系统下载地址
插入SD卡,使用 df 查看当前已经挂载的卷
$ df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 233269248 218788512 13968736 94% 27412562 1746092 94% /
devfs 374 374 0 100% 648 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
/dev/disk2s1 31100416 4992 31095424 1% 0 0 100% /Volumes/Pi
因为已经命名了SD卡为 Pi ,所以SD卡的分区对应的设备文件为:/dev/disk2s1
使用diskutil unmount卸载
$ diskutil unmount /dev/disk2s1
Volume Pi on disk2s1 unmounted
diskutil list 确认设备 我买的是16G的卡
$ diskutil list
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk2
1: DOS_FAT_32 Pi 15.9 GB disk2s1
切换到你下载的raspbian系统镜像的文件夹下,使用dd命令将系统镜像写入
PS /dev/disk2s1是分区,/dev/disk2是块设备,/dev/rdisk2是原始字符设备
$ dd bs=4m if=pi.img of=/dev/rdisk2
781+1 records in
781+1 records out
3276800000 bytes transferred in 194.134151 secs (16879050 bytes/sec)
至此,SD卡上已经刷入了 Raspbian 系统
再用diskutil unmountDisk卸载设备
$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful