by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

foreword

In this article, share the use of built-in instructions on MacOS to install the operating system of Raspberry Pi.
Regarding the dd command during this installation process, please carefully specify the parameter of your of, which is the location of the write output to the file,
If you make a mistake, your system will be destroyed.

step

Go to the official website to download the official operating system. In this article, I use RASPBIAN.
https://www.raspberrypi.org/downloads/


1. First, connect the Micro SD card to the Mac through a USB card reader, and then use the command to view the mount.
diskutil list
As you can see, in my example, my Micro SD card is in /dev/disk3.



2. The command to unmount is as follows: Please adjust the disk number of disk[n] according to your actual situation .
diskutil unmountDisk /dev/disk3

After successfully unmounting, you should be able to see the text as follows, I successfully unmounted all files on disk3.
Unmount of all volumes on disk3 was successful

3. Next, you can use the dd command to write the downloaded img file to the sd card.
Write the image to rdisk3, the speed of using rdisk3 will be faster, if you fail to use rdisk[n], you can use disk[n] instead, where [n] is the number of the disk.
Do not copy the disk number (disk[n]), please know exactly what number you want to write to the sd card, for example /dev/disk4 .
sudo dd bs=1m if=2018-03-13-raspbian-stretch.img of=/dev/rdisk3 conv=sync

Here is a supplement to the description reference of rdisk:
/dev/rdisk nodes are character-special devices, but are "raw" in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel's filesystem code.

Regarding the usage instructions of the dd command, we can view it by typing man dd on the terminal, and press q to leave.
In the Linux world, for Linux system administrators, the dd command should be an easy-to-use and basic must-learn command.
If we use the memory of English words as an example, then the dd command must be a word worth remembering, and it will not be the kind of unpopular word that does not need to be memorized that may not be seen once in a lifetime.

Listed here, the instructions for conv=sync.
sync Pad every input block to the input buffer size. Spaces are used for pad bytes if a block oriented con-
version value is specified, otherwise NUL bytes are used.
The result is as follows:


After the completion, you can take out the micro sd card and install it on the Raspberry Pi to start watching.
desktop

 

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


cli,linux,macos

How to use find to delete old files based on the creation time

This function is very useful, but be very careful, read it first and then delete it, if you make a wrong directory, you will die miserably 

Laravel linux

My mobile computer, install Laravel 8 on Sony xperia 5 II

This is my first Android phone. It's no problem to try to install Laravel. Basically, I installed vim and mariadb. After executing sshd, you can log in through 8022, it is completely a mobile computer: p. The software I use is Termux...

linux

The old version of CentOS 6.2 compiles the git process

This article uses CentOS 6.2 to rebuild curl and git. The main reason is that the operating system is too old, so I directly build the latest version of git from source.