Posted on January 30, 2017 at 12:00 PM
Creating a bootable SD card for your Raspberry Pi project.
Writing an OS to an SD for the RaspberryPi is sometimes tricky. Corrupt OS installs and SD cards are common among Pi projects, so it is important to know how to clear an SD properly of a corrupt OS, and how to reinstall a new one. Another handy trick is making backups of your favorite OS's after you have made some modifications. This guide will lead you down the path to all of these.
I'm going to start this guide assuming you know absolutely nothing about the RaspberryPi, SD cards, or Linux. So lets start with a brief overview of each. These are the things you need to know to get up and running, from scratch, with a RaspberryPi.
Now, lets get to the good stuff. Actually creating your SD image:
Start by downloading the .iso or .img file. Raspberrypi.org has a lot of great options, whether you are looking for retropie for your retro gaming needs, or raspbian to get up and running for the first time. Visit the site, navigate to the downloads section, and get your file. Download here.
After the file is downloaded, it should show up in your downloads folder, navigate there and you should see a .zip or similar folder with the name of your download. Go ahead and extract the folder (using winrar, 7zip, or your choice of program). Now, you should have access to your image file.
Go ahead at this point, and plug your microSD card into your computer using either a micro-sd to USB adaptor, or microSD to SD, or any other adaptor of your choice. It should pop up as a new location, just as any USB device does, and be assigned a letter.
Load up win32diskimager, and click "yes" when it asks for permissions. On the left had side, you will see two boxes near the top. One looks like a folder, one should have a device letter. If the device letter matches that of your microSD card, perfect. If not, go ahead and click on it and navigate to the device letter of your microSD card. The other box, the folder, is where you need to go next.
Click on it, and a file explorer box will open. Navigate to where your image is, and click on it then hit open. If your image isn't showing up, make sure on the right, instead of "Disk Images" you click on the text and select *.*. This will show all files in your location, and you should see your file. Once you have each of the two boxes set right, the image source and device letter, the "Write" letters should go from gray to black. Click on that and the write will begin. Depending on the quality of your SD card, and adaptor, it may error halfway though. This happens from time to time, just reformat the SD in SDFormatter, and go again.
Congrats, you have now created a boot disk for the Pi! Go ahead and put the SD into your Pi, power it up, and wait. First time bootups usually take extra time, as the disk image will do a few additional things itself.
To clear a corrupt os:
If you find yourself with a corrupt SD card, connect the SD card to your windows machine, load up SD formatter, make sure the correct
drive letter is select (as we did in creating the image) and hit format. You will want exFAT or FAT32 format.
Note on raspbian: The default username is "pi" and default password is "raspberry". I recommend changing these by opening a terminal and typing "sudo raspi-config". This will run the raspbian configuration screen, where you can make some changes to the OS/device if you so choose.
This guide should work for any current OS images (as of January 2017). If any problems do arise, email me and I'll look into it.
For anyone looking to make their own image file from a currently working SD, a lot of the steps are the same. Hook your microSD up to the computer using an adaptor, load up win32diskimager. In the "Image File" box, where we previously selected an image downloaded from the internet, go ahead and click on the folder icon, navigate to where you want to save your disk image file, and in the "File Name" field, enter the name you want your file to have. For example, type in "MyOS.iso" to create a disk image file, .iso format, with name "MyOS". hit ok, and the "read" button should have gone from gray, to black. Hit the "read" button, give it time, and you will have made your own disk image file.
Enter your Name and Email to receive notifications about new posts
Feel free to email me at firstname.lastname@example.org with any questions!