how to install Raspbian on an SD Card
Installing Raspbian on an SD Memory Card (Windows)
As so often, you can not do this task with Windows Board resources. For this purpose, however, the program “Win32DiskImager”, which is very easy to use. It is an executable file. You do not have to install the program.
We recommend the following procedure:
- First insert the SD card into the card reader and check if you can even access it in Windows Explorer.
- Then you get the corresponding image of Raspberry Pi operating system. For example, Raspbian. After the download you have to unpack the file if necessary. The image must end in “.img”.
- Then you get the program “Win32DiskImager”. After downloading, run the program.
- In the field “Image File” select the path and the image file. In the “Device” field, select the drive letter of the SD card.
- As a last step, click on the button “Write”. The writing process is then started.
Depending on how big the image and how fast the SD card is, this can take a very long time. You just have to be patient.
After the process is complete, you can eject the SD card, plug it into the SD slot of Raspberry Pi and put it into operation.
Note: If you click on “Read” in the program “Win32DiskImager”, then you can also save the contents of an SD card as an image. Either as a backup or to clone an SD card.
Installing Raspbian on an SD memory card (Linux or macOS)
With Linux and macOS you can use the tool “dd” instead of a program with graphical user interface on the command line or in the terminal. For both operating systems, the solution looks similar.
First, you have to identify the correct drive name. With the following command you can display all drives:
In general, the correct drive will start with “/ dev / sd ..” or similar. Then you have to make sure that the drive is unmounted. If a new drive, such as a USB stick or an SD memory card is automatically integrated, then you have to unmount it or eject it on the software side. Otherwise “dd” will not work.
Then enter the following on the command line to describe the SD card:
sudo dd if = /path/from/image.img of =/path/to/sdcard bs=4M
It should be noted that the parameters “if” and “of” should not be confused. “if” stands for Input File and “of” stands for Output File.
The parameter “bs” indicates the block size. Writing “4M” is a bit faster than “2M” or “1M”. But you waste a little storage space, which is irrelevant.
“dd” does not output any running status information. Therefore, the cursor will not return to the command input for a few minutes.
After writing you have to make sure that the write accesses in the memory card are completed.
This command can be done quickly. But there are also constellations that can take several minutes. Then you can eject the SD memory card, insert into Raspberry Pi and start.
If you eject the memory card in a file manager (software side), then you can save the command “sync”, because this is done automatically when ejecting.
Extension: “dd” with progress bar
The dd tool has the disadvantage that it does not provide a progress bar in the standard execution of the command. You just have to trust that the command will end successfully someday.
However, there is a new version in modern Linux distributions, where you can output the progress bar by option.
dd ... status = progress
Note: Due to the write cache of the kernel, however, the displayed values are inaccurate. So this progress bar only serves to know how long it will take.
Leave a Reply