Difference between revisions of "Minnowboard:Preparing microSD Card"

From eLinux.org
Jump to: navigation, search
m (Added navigation bar)
m
 
(23 intermediate revisions by the same user not shown)
Line 33: Line 33:
  
 
=Windows=
 
=Windows=
 +
 +
==Obtaining and extracting the image ==
 +
This section will explain how to download the latest Angstrom image and how to convert the downloaded .xz format image to .img .
 +
 
'''Step-1:'''
 
'''Step-1:'''
  
Line 47: Line 51:
  
  
'''Step-2:'''
+
'''Step-3:'''
  
 
Decompress the previously downloaded Angstrom image using 7-zip as shown in Figure - 1 below. The resulting file should have an extension '.img' .
 
Decompress the previously downloaded Angstrom image using 7-zip as shown in Figure - 1 below. The resulting file should have an extension '.img' .
Line 53: Line 57:
 
[[File:Mwindows6.png|500px|Figure-1: Decompressing the image]]
 
[[File:Mwindows6.png|500px|Figure-1: Decompressing the image]]
  
 +
==Writing the image to the microSD card==
 +
This section explains the three different methods that can be used to write an Angstrom image to the microSD card.
  
'''Step-3:'''
+
===Method -1: Using Image Writer for Windows===
 +
This is the recommended method to be used. Should this method not work out for you, scroll down below and give the other methods a shot.
 +
 
 +
 
 +
'''Step-1:'''
  
 
Image Writer for Windows is needed to write the .img file to a microSD card. Download and install Image Writer using the link below: :
 
Image Writer for Windows is needed to write the .img file to a microSD card. Download and install Image Writer using the link below: :
Line 61: Line 71:
  
  
'''Step-4:'''
+
'''Step-2:'''
 +
 
 +
Insert the mircoSD card into the computer using an appropriate adapter. Next, launch the Image Writer software we just installed earlier.
 +
 
 +
''Note:- You may need to run Image Writer as Administrator! Right-click on the file, and select 'Run as Administrator'''
 +
 
 +
 
 +
'''Step-3:'''
 +
 
 +
Select the Angstrom image and write it to the microSD card as shown in Figure - 2 below:
  
Insert the mircoSD card into the computer using an appropriate adapter. Next, launch the image writer software we just installed earlier. Select the Angstrom image and write it to the microSD card as shown in Figure - 2 below.
 
  
 
[[File:Mwindows7.png|500px|Figure-2: Writing the image to microSD card]]
 
[[File:Mwindows7.png|500px|Figure-2: Writing the image to microSD card]]
 +
 +
 +
To double check if the image was written properly, open 'Disk Management' utility in Windows. Follow [http://www.softwareok.com/?seite=faq-Win-7&faq=15 this link] here on how to open it. You should see an outout similar to the one shown below:
 +
 +
 +
[[File:Minnow_windows_sdcard_success.png]]
 +
 +
 +
===Method-2: Using Roadkil Disk Image===
 +
If method -1 does not work for you, give this method a shot.
 +
 +
 +
'''Step-1:'''
 +
 +
Disk Image is needed to write the .img file to a microSD card. Download and install Disk Image using the link below: :
 +
 +
[http://www.roadkil.net/program.php/P12/Disk%20Image Roadkil's Disk Image]
 +
 +
 +
'''Step-2:'''
 +
 +
Insert the mircoSD card into the computer using an appropriate adapter. Next, launch the Disk Image software we just installed earlier.
 +
 +
''Note:- You may need to run Image Writer as Administrator! Right-click on the file, and select 'Run as Administrator'''
 +
 +
 +
[[File:Raodkil_minnow_1.png|500px|RoadKil's Disk Image]]
 +
 +
 +
'''Step-3:'''
 +
 +
Select the Angstrom image in the 'source file' tab. Then, select the microSD card in the 'Write Image to' tab. Next, click on the 'Start' button to write the image to the microSD card:
 +
 +
 +
[[File:Roadkil_minnow_2.png|500px|Selecting the Angstrom image]]
 +
 +
 +
[[File:Roadkil_minnow_3.png|500px|Writing the image to microSD card]]
 +
 +
 +
===Method -3: Using dd for Windows===
 +
This is a bit complex method in itself. If both of the earlier methods don't work out for you, then give this a shot.
 +
 +
 +
'''Step-1:'''
 +
 +
dd for Windows is a windows port of the linux utility dd. Download it from [http://www.chrysocome.net/downloads/dd-0.6beta3.zip here]:
 +
 +
 +
'''Step-2:'''
 +
 +
Extract the downloaded package and you should see 'dd.exe' file. It is advised to move this file to a location which can be easily conveniently accessed using the Command Prompt. In my case I moved it to the C:\Temp directory along with the Angstrom image.
 +
 +
[[File:Dd_windows_minnow_1.png]]
 +
 +
 +
'''Step-2:'''
 +
 +
Next run Command Prompt(aka cmd) as an administrator. Refer this section for more information on how to do it. Navigate to the directory where you have stored the 'dd.exe' file via the command prompt. Next run the command below in the prompt:
 +
 +
dd --list
 +
 +
This command lists all the disks residing or attached currently on the computer.
 +
 +
 +
'''Step-3:'''
 +
 +
Now insert the microSD card in the computer using an appropriate adapter. Repeat Step -2 again and observe the difference in output.
 +
 +
 +
[[File:Dd_windows_minnow_2.png]]
 +
 +
 +
The most important information that we need to infer from this is the drive letter of the microSD card. In my case it is 'e'.
 +
 +
 +
'''Step-3:'''
 +
 +
Now, the command to write the Angstrom image to microSD card is :
 +
 +
dd bs=1M if=<path to image> od=<microSD card drive letter>.
 +
 +
In, my case the command became:
 +
 +
dd bs=1M if=production-Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img od=e.
 +
 +
 +
[[File:Dd_windows_minnow_3.png]]
 +
 +
 +
''Note:- First, I have directly used the Angstrom image name instead of providing the path as both the dd.exe and Angstrom image are in the same folder. Second, I have used 'of' instead of od and also a different destination header ' \\?\DeviceHarddiskVolume11 ' than the drive letter 'e'. That header actually points to the drive 'e' only.  This is un-necessarily a bit more complex than the above command(I realized this later on)''
 +
 +
==Formatting a microSD card with an Angstrom image on it==
 +
 +
Once you a write an Angstrom image to a microSD card and want to for some reason erase the contents of the microSD card or use it for some other purpose, you cannot just plugin into a Windows computer and format it like you are used to doing. You will not be able to see the microSD card like you would normally do when you plug in a USB flash drive. This is because the new partitions created on the microSD card while writing the Angstrom image are in a file format which cannot be natively read by Windows.
 +
 +
This section shows how you can accomplish the same in Windows using Diskpart utility.
 +
 +
 +
'''Step-1:'''
 +
 +
Go to the Start/Windows icon and search for Command Prompt(aka cmd). Now run it as an administrator by right clicking on it and selecting the same.
 +
 +
 +
[[File:Minnow_windows_format_card_1.png]]
 +
 +
[[File:Minnow_windows_format_card_2.png]]
 +
 +
 +
'''Step-2:'''
 +
 +
Now type the command below in the prompt to start Diskpart utility
 +
 +
diskpart
 +
 +
 +
[[File:Minnow_windows_format_card_3.png]]
 +
 +
 +
'''Step-3:'''
 +
 +
Now we need to identify our microSD card. So, type the command below in the prompt:
 +
 +
list disk
 +
 +
This command will list all the disks available/connected to the computer. In my case, I already know the storage for my microSD card(14GB) and hence 'Disk 1' is the microSD card in my case.
 +
 +
 +
[[File:Minnow_windows_format_card_4.png]]
 +
 +
 +
'''Step-4:'''
 +
 +
Select the partition the disk that represents your parition
 +
 +
select <Disk #>
 +
 +
In my case the command becomes
 +
 +
select Disk 1
 +
 +
 +
[[File:Minnow_windows_format_card_5.png]]
 +
 +
 +
'''Step-5:'''
 +
 +
To see the different partitions on our disk, type the command below
 +
 +
list partition
 +
 +
As you can see from the figure below, there are three partitions on the microSD card and we have to delete all of them, one by one.
 +
 +
 +
[[File:Minnow_windows_format_card_6.png]]
 +
 +
 +
'''Step-6:'''
 +
 +
We will begin the destruction by destroying partition-1 first. So, select the partition:
 +
 +
select partition 1
 +
 +
Now, to delete it, type the command below
 +
 +
delete partition override
 +
 +
To confirm the deletion, run the command 'list partition' again:
 +
 +
list partition
 +
 +
 +
[[File:Minnow_windows_format_card_8.png]]
 +
 +
 +
'''Step-7:'''
 +
 +
Repeat the above steps for the remaining two partitions and then run the 'list partition' for confirmation
 +
 +
  list partition
 +
 +
[[File:Minnow_windows_format_card_9.png]]
 +
 +
 +
'''Step-8:'''
 +
 +
At this point, you should be prompted by the Windows Format utility, asking to format the microSD card. Go ahead and follow the simple on screen utilities to do the same. If that does not work out for you(just like me), read along.
 +
 +
 +
[[File:Minnow_windows_format_card_10.png]]
 +
 +
 +
'''Step-9:'''
 +
 +
Open the disk management utility on Windows as documented [http://www.softwareok.com/?seite=faq-Win-7&faq=15 here]. You will see that the entire storage space on your microSD card at the moment is un-allocated.
 +
 +
 +
[[File:Minnow_windows_format_card_11.png]]
 +
 +
 +
'''Step-10:'''
 +
 +
Now right click on the drive corresponding to your microSD card and click on the 'New Simple Volume' option
 +
 +
 +
[[File:Minnow_windows_format_card_12.png]]
 +
 +
 +
'''Step-11:'''
 +
 +
You will then be greeted by the on 'New Simple Volume Wizard' . Click on the next button.
 +
 +
 +
[[File:Minnow_windows_format_card_13.png]]
 +
 +
 +
'''Step-12:'''
 +
 +
Select the appropirate size for your new volume.
 +
 +
 +
[[File:Minnow_windows_format_card_14.png]]
 +
 +
 +
'''Step-13:'''
 +
 +
Name your new volume and click on the 'next' button
 +
 +
 +
[[File:Minnow_windows_format_card_15.png]]
 +
 +
 +
'''Step-14:'''
 +
 +
If all went well, you should see a similar output as the one shown below. Now unplug your microSD and feel free to use it as you please.
 +
 +
 +
[[File:Minnow_windows_format_card_16.png]]
 +
  
  
Line 108: Line 365:
 
Now unpack the image to the microSD card by typing the command below in a terminal window:  
 
Now unpack the image to the microSD card by typing the command below in a terminal window:  
  
  $ sudo dd if=Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img of=/dev/rdiskN
+
  $ sudo dd bs=1m if=Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img of=/dev/rdiskN  
  
 
''Note:- In the above command we subtly replaced “diskN” with “rdiskN” because in the latter case, you are writing to a buffered device and hence the process becomes much faster!''
 
''Note:- In the above command we subtly replaced “diskN” with “rdiskN” because in the latter case, you are writing to a buffered device and hence the process becomes much faster!''

Latest revision as of 02:42, 15 November 2013

Mlogo.png Back to the MinnowBoard home page


Getting Started:

Where to buy? - for advice on buying the MinnowBoard.

MinnowBoard Basics - box contents, different components on the board

microSD Card Setup - for information on how to prepare the microSD Card used to boot your MinnowBoard.

Booting Angstrom Embedded Linux Distribution - running Angstrom and accessing the MinnowBoard serial console on Windows/Mac/Linux

Beginner Guides - you are up and running, now what can you do?.

MinnowBoard Google Group - Got any questions? Feel free to ask here

Linux

Please note that this section is completely optional. The MinnowBoard already comes with a microSD card that is preloaded with a working Angstrom Linux image. In case you want to use a newer image or want to program the microSD from scratch, this section covers it all. These steps were created using an Ubuntu 12.10 64-bit system.

Step-1:

First download the latest Angstrom Linux image for MinnowBoard using the following link:

Latest Angstrom Image for the MinnowBoard

At the time of writing this guide, the latest image available for download was 'Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img.xz'

Step-2:

Insert the microSD card into a microSD compatible writer in your desktop computer. Now, identify the disk device filename for your microSD card. You can do this by opening the Disk Utility application (sometimes also called Disks) in Ubuntu and clicking on the microSD card entry. See the Device field to determine the raw device name of your microSD card. Note that this device name should specify an entire disk device (e.g, /dev/sde), and not an individual disk partition (e.g, /dev/sde1)

Step-3:

Now, make sure all possible disk partitions from the microSD card are unmounted by typing the command below into your terminal:

$ sudo umount /dev/sdX?* 

Here 'sdX' stands for the raw device id of the microSD card.

Step-4:

Now unpack the image to the microSD card by typing the command below in a terminal window:

$ xzcat Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img.xz | sudo dd of=/dev/sdX


Windows

Obtaining and extracting the image

This section will explain how to download the latest Angstrom image and how to convert the downloaded .xz format image to .img .

Step-1:

First, download the latest Angstrom Linux image from the link below:

Latest Angstrom Image


Step-2:

Next, download the 7-zip utility from the link below and install it:

7zip


Step-3:

Decompress the previously downloaded Angstrom image using 7-zip as shown in Figure - 1 below. The resulting file should have an extension '.img' .

Figure-1: Decompressing the image

Writing the image to the microSD card

This section explains the three different methods that can be used to write an Angstrom image to the microSD card.

Method -1: Using Image Writer for Windows

This is the recommended method to be used. Should this method not work out for you, scroll down below and give the other methods a shot.


Step-1:

Image Writer for Windows is needed to write the .img file to a microSD card. Download and install Image Writer using the link below: :

Image Writer for Windows


Step-2:

Insert the mircoSD card into the computer using an appropriate adapter. Next, launch the Image Writer software we just installed earlier.

Note:- You may need to run Image Writer as Administrator! Right-click on the file, and select 'Run as Administrator'


Step-3:

Select the Angstrom image and write it to the microSD card as shown in Figure - 2 below:


Figure-2: Writing the image to microSD card


To double check if the image was written properly, open 'Disk Management' utility in Windows. Follow this link here on how to open it. You should see an outout similar to the one shown below:


Minnow windows sdcard success.png


Method-2: Using Roadkil Disk Image

If method -1 does not work for you, give this method a shot.


Step-1:

Disk Image is needed to write the .img file to a microSD card. Download and install Disk Image using the link below: :

Roadkil's Disk Image


Step-2:

Insert the mircoSD card into the computer using an appropriate adapter. Next, launch the Disk Image software we just installed earlier.

Note:- You may need to run Image Writer as Administrator! Right-click on the file, and select 'Run as Administrator'


RoadKil's Disk Image


Step-3:

Select the Angstrom image in the 'source file' tab. Then, select the microSD card in the 'Write Image to' tab. Next, click on the 'Start' button to write the image to the microSD card:


Selecting the Angstrom image


Writing the image to microSD card


Method -3: Using dd for Windows

This is a bit complex method in itself. If both of the earlier methods don't work out for you, then give this a shot.


Step-1:

dd for Windows is a windows port of the linux utility dd. Download it from here:


Step-2:

Extract the downloaded package and you should see 'dd.exe' file. It is advised to move this file to a location which can be easily conveniently accessed using the Command Prompt. In my case I moved it to the C:\Temp directory along with the Angstrom image.

Dd windows minnow 1.png


Step-2:

Next run Command Prompt(aka cmd) as an administrator. Refer this section for more information on how to do it. Navigate to the directory where you have stored the 'dd.exe' file via the command prompt. Next run the command below in the prompt:

dd --list

This command lists all the disks residing or attached currently on the computer.


Step-3:

Now insert the microSD card in the computer using an appropriate adapter. Repeat Step -2 again and observe the difference in output.


Dd windows minnow 2.png


The most important information that we need to infer from this is the drive letter of the microSD card. In my case it is 'e'.


Step-3:

Now, the command to write the Angstrom image to microSD card is :

dd bs=1M if=<path to image> od=<microSD card drive letter>.

In, my case the command became:

dd bs=1M if=production-Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img od=e.


Dd windows minnow 3.png


Note:- First, I have directly used the Angstrom image name instead of providing the path as both the dd.exe and Angstrom image are in the same folder. Second, I have used 'of' instead of od and also a different destination header ' \\?\DeviceHarddiskVolume11 ' than the drive letter 'e'. That header actually points to the drive 'e' only. This is un-necessarily a bit more complex than the above command(I realized this later on)

Formatting a microSD card with an Angstrom image on it

Once you a write an Angstrom image to a microSD card and want to for some reason erase the contents of the microSD card or use it for some other purpose, you cannot just plugin into a Windows computer and format it like you are used to doing. You will not be able to see the microSD card like you would normally do when you plug in a USB flash drive. This is because the new partitions created on the microSD card while writing the Angstrom image are in a file format which cannot be natively read by Windows.

This section shows how you can accomplish the same in Windows using Diskpart utility.


Step-1:

Go to the Start/Windows icon and search for Command Prompt(aka cmd). Now run it as an administrator by right clicking on it and selecting the same.


Minnow windows format card 1.png

Minnow windows format card 2.png


Step-2:

Now type the command below in the prompt to start Diskpart utility

diskpart


Minnow windows format card 3.png


Step-3:

Now we need to identify our microSD card. So, type the command below in the prompt:

list disk

This command will list all the disks available/connected to the computer. In my case, I already know the storage for my microSD card(14GB) and hence 'Disk 1' is the microSD card in my case.


Minnow windows format card 4.png


Step-4:

Select the partition the disk that represents your parition

select <Disk #>

In my case the command becomes

select Disk 1


Minnow windows format card 5.png


Step-5:

To see the different partitions on our disk, type the command below

list partition

As you can see from the figure below, there are three partitions on the microSD card and we have to delete all of them, one by one.


Minnow windows format card 6.png


Step-6:

We will begin the destruction by destroying partition-1 first. So, select the partition:

select partition 1

Now, to delete it, type the command below

delete partition override

To confirm the deletion, run the command 'list partition' again:

list partition 


Minnow windows format card 8.png


Step-7:

Repeat the above steps for the remaining two partitions and then run the 'list partition' for confirmation

 list partition 

Minnow windows format card 9.png


Step-8:

At this point, you should be prompted by the Windows Format utility, asking to format the microSD card. Go ahead and follow the simple on screen utilities to do the same. If that does not work out for you(just like me), read along.


Minnow windows format card 10.png


Step-9:

Open the disk management utility on Windows as documented here. You will see that the entire storage space on your microSD card at the moment is un-allocated.


Minnow windows format card 11.png


Step-10:

Now right click on the drive corresponding to your microSD card and click on the 'New Simple Volume' option


Minnow windows format card 12.png


Step-11:

You will then be greeted by the on 'New Simple Volume Wizard' . Click on the next button.


Minnow windows format card 13.png


Step-12:

Select the appropirate size for your new volume.


Minnow windows format card 14.png


Step-13:

Name your new volume and click on the 'next' button


Minnow windows format card 15.png


Step-14:

If all went well, you should see a similar output as the one shown below. Now unplug your microSD and feel free to use it as you please.


Minnow windows format card 16.png


Mac

Step-1:

First, download the latest Angstrom Linux image from the link below:

Latest Angstrom Image


Step-2:

Next, install the “The Unarchiver” application(it is free) from the app store on Mac OS X as shown in Figure - 1

Figure-1: The Unarchiver


Step-3:

Then unpack the downloaded angstrom image using the unarchiver application as shown below in Figure -2

Figure-2: Unpacking the Angstrom image


Step-4:

Insert the microSD card into a microSD compatible writer in your computer. Now, identify the disk device filename for your microSD card. You can do this by typing the command below, before and after you insert the microSD card and comparing the outputs to see the newly added device:

$ df-h

Note:- If you notice closely, the microSD card entry will be in the form of /dev/diskNsX where 'N' and 'X' are numbers. diskNsX is basically the device id of your microSD card. So, to obtain the raw device id from this, remove the 's' and 'X' from the device id. The raw device id should be in the form of diskN .


Step-5:

Now, make sure all possible disk partitions from the microSD card are unmounted by typing the command below into your terminal: $ sudo umount /dev/diskN?* Here 'diskN' stands for the raw device id of the microSD card.


Step-6:

Now unpack the image to the microSD card by typing the command below in a terminal window:

$ sudo dd bs=1m if=Angstrom-development-GNOME-image-eglibc-ipk-v2012.12-minnow-2013.07.10.img of=/dev/rdiskN 

Note:- In the above command we subtly replaced “diskN” with “rdiskN” because in the latter case, you are writing to a buffered device and hence the process becomes much faster!