raspbian安装步骤:
1.下载raspbian安装包,插入SD卡到电脑
2.打开命令行,切换到root:
Last login: Sat Mar 26 15:34:08 on ttys000
bogon:~ zengchunlai$ su
Password:
3.使用df -h命令查看磁盘,如下/dev/disk4s1对应的是我的SD卡
sh-3.2# df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 930Gi 93Gi 837Gi 10% 24424453 219467769 10% /
devfs 191Ki 191Ki 0Bi 100% 662 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
/dev/disk4s1 15Gi 1.0Mi 15Gi 1% 0 0 100% /Volumes/UNTITLED
4.使用cd切换到raspbian安装包的目录下
sh-3.2# cd /Users/zengchunlai/Documents/
sh-3.2# ls
raspbian-jessie.img
11.mov setup
Arduino vlc-2.1.5.1409130984.dmg
Axure workspace
Axure User Data wp
RDC Connections
5.使用diskutil unmount 删除sd卡的挂载
sh-3.2# diskutil unmount /dev/disk4s1
Volume UNTITLED on disk4s1 unmounted
6.确认设备,如下所示,最后的/dev/disk4是我的SD卡
sh-3.2# diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 999.3 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *999.0 GB disk1
Logical Volume on disk0s2
F56C0B81-CE84-4DC3-B753-A88180AB9D86
Unencrypted
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *18.1 MB disk2
1: Apple_partition_map 32.3 KB disk2s1
2: Apple_HFS Flash Player 18.1 MB disk2s2
/dev/disk4
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk4
1: DOS_FAT_32 UNTITLED 15.9 GB disk4s1
7.开始安装,使用dd命令执行以下语句。
sh-3.2# dd bs=4m if=raspbian-jessie.img of=/dev/rdisk4
984+0 records in
984+0 records out
4127195136 bytes transferred in 532.156523 secs (7755604 bytes/sec)
(注意:由于我下载的是jessie版安装包,总共有4G多,第一次安装半个多小时后,我以为没有正常在安装,所以中途停止掉了,结果导致无法启动,第二次安装换成台式机,也用了一个小时以上。第三次安装也是将近一个小时/532s,而且由于在安装过程不会有任何提示。所以请耐心等待,一直到出现最终的结果之后,就说明是安装成功了。)
8.安装成功后移除SD卡
sh-3.2# diskutil unmountDisk /dev/disk4
Unmount of all volumes on disk4 was successful
9.把SD卡插入你的Pi,开始树莓派之旅吧!