您的位置:首页 > 运维架构

Copying the Image to a microSD Card on Mac OS / Windows

2013-09-16 23:17 1126 查看
注:转自http://learn.adafruit.com/beaglebone-black-installing-operating-systems/

其中使用terminal的部分和linux下是一样的,高潮是GUI部分,虽然我可能依然会选择terminal,还是转一下



Mac OS


Once you've downloaded the img.xz file, in my case it is titled BBB-eMMC-flasher-2013.05.08.img.xz, you'll need to extract the archive. I've found the easiest utility to use is called "The Unarchiver". You can find it on the app store, orfrom
their site. Once you've installed "The Unarchiver", just navigate to the .img.xz file, typically located in Finder in the "Downloads" section, and double click the file to begin extraction.

It will take a minute or two to extract the file, and you should then end up with a 3.66 GB .img file (notice that the .xz is removed from the file extension).

There are now a few ways to continue. You can use terminal commands, or software that will guide you through it. Let's start with the guided software using a graphical interface.

Using
a GUI

First, you'll want to
download PiFiller. It was designed to install images onto SD cards for the Raspberry PI, but there isn't any reason why it wouldn't work for BeagleBone images as well.

Once you've downloaded Pi Filler, locate it in Finder (typically Downloads), and double click it to extract it. You may want to copy it to your Applications folder.

Remove your SD card prior to launching Pi Filler.

Launch Pi Filler, and follow the on-screen prompts. The first thing it will ask is for you to locate your .img file. It mentions the Raspberry Pi, but you can ignore that, it doesn't make any difference.





Select the appropriate .img file, and click "Choose".

Then, insert your microSD card into your Mac, and click Continue. Pi Filler will look for your SD Card, and then notify you once it finds it.





Ensure the SD Card you are choosing is correct, rename it to BEAGLE_BONE if you're unsure.





Click Continue once you're certain its found the correct SD card.





It can take 15-20 minutes to write the image to the microSD card. Once it's complete, remove the microSD card and insert it into the powered down BeagleBone Black. You will only be able to insert the card one way, and it needs
to snap in fully.

Navigate to the
Flashing the BeagleBone Black page, and follow the instructions on how to flash the newly copied image onto the on-board flash memory of the BeagleBone Black.

Using
the command line

Another alternative is to flash the microSD card entirely from the command line. You'll first want to extract the img.xz file you've downloaded, and the best program for that is still "The Unarchiver" mentioned in the GUI instructions. Once you've got the extracted
.img file, open a terminal to get started.

Execute the following command to see the list of connected storage devices:

Next, insert your microSD card, and then execute the following command again:

df -h


Compare the two outputs, and find the newly added device. In my case, the microSD card was '/dev/disk4s1'.

Once you've got the name of the device, you'll want to unmount that disk using the following command, but replacing the specifics with your card details:

sudo diskutil unmount /dev/disk4s1


Now, you'll want to execute the command that actually copies the image onto the SD card. You have to be really careful here, and make sure you're entering the correct device details. You could end up copying over the wrong
drive, such as your master hard disk, and then you'd end up having a bad day. Double check everything!

Note that we subtly changed the device name from "/dev/disk4s1" to "/dev/rdisk4". You'll want to do the same when you execute the below command.

Also, choose the right file location for your .img file in the input file field (if=...).

sudo dd bs=1m if=~/Downloads/BBB-eMMC-flasher-2013.05.08.img of=/dev/rdisk4


This process can take anywhere from 15-30 minutes depending on the speed of your computer and microSD card. Once it has completed, remove the microSD card, and insert it fully into the BeagleBone Black microSD card slot.

Navigate to the
Flashing the BeagleBone Black page, and follow the instructions on how to flash the newly copied image onto the on-board flash memory of the BeagleBone Black.

Windows

Once you've downloaded the img.xz file, in my case it is titled BBB-eMMC-flasher-2013.05.08.img.xz, you'll need to extract the archive. To extract the archive, you'll want todownload
and install 7zip. 7zip is a free and open source utility that is able to extract img.xz files (among many other file types!).





It will take a minute or two to extract the file, and you should then end up with a 3.66 GB .img file (notice that the .xz is removed from the file extension).

Next,
download the free Win32 Disk Imager software that we'll use to copy the image to the microSD card. After downloading the software, extract it from the zip file (7zip can be used here as well).

Launch the Win32 Disk Imager Software by double clicking the "Win32DiskImager" file in the folder that you extracted it to. You should see the following screen once it launches:





Click the folder icon (arrow pointed to it above), and choose the image file, and click Open:





Next, insert your SD card, and choose the correct "Device" drive letter. You may want to open windows explorer to help figure out which one to choose. Another way is to view the drive letters by clicking the dropdown below
"Device", and then inserting your SD card to see which one gets added to the list.

Make sure you choose the correct drive letter, or risk losing data on your other devices!





Once you've made your selections, click the "Write" button illustrated above, and wait for it to complete writing to your SD Card.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐