https://arm.mini-box.com/index.php?title=Using_dd&feed=atom&action=historyUsing dd - Revision history2024-03-28T21:00:20ZRevision history for this page on the wikiMediaWiki 1.35.9https://arm.mini-box.com/index.php?title=Using_dd&diff=63&oldid=prevAdmin: Created page with "=Identifying the microSD device name= pico-SAM9G45 can boot an operating system from the microSD card slot on the back of the board. See [http://arm.mini-box.com/index.php?tit..."2020-10-19T19:19:38Z<p>Created page with "=Identifying the microSD device name= pico-SAM9G45 can boot an operating system from the microSD card slot on the back of the board. See [http://arm.mini-box.com/index.php?tit..."</p>
<p><b>New page</b></p><div>=Identifying the microSD device name=<br />
pico-SAM9G45 can boot an operating system from the microSD card slot on the back of the board. See [http://arm.mini-box.com/index.php?title=Installing_the_microSD installing the microSD page] for mounting info.<br><br />
To install the operating system to microSD, you will need to connect the microSD card through a USB card reader to a computer follow the steps below.<br />
<br />
==Windows XP==<br />
In this example we used a 1GB micro SD card.<br><br />
Download [http://www.chrysocome.net/dd dd.exe]<br><br />
Open up a command prompt. Change to the directory where dd.exe is unpacked and run:<br> <br />
<br />
<pre style="font-size: medium"><br />
dd --list --filter=removable<br />
</pre><br />
This command lists only the removable devices attached to the PC.<br><br />
A sample output should contain, on the last few lines, something similar with:<br />
<pre style="font-size: medium"><br />
\\?\Device\Harddisk6\Partition0<br />
link to \\?\Device\Harddisk6\DR27<br />
Removable media other than floppy. Block size = 512<br />
size is 988282880 bytes<br />
</pre><br />
In our example the microSD device name is: '''\\?\Device\Harddisk6\DR27'''<br><br />
Please pay attention if your card reader has multiple slots and choose the right volume. Usually, it's the last one from the list showing the actual size of the microSD card in bytes<br><br />
Use this command to write the image to the microSD card:<br />
<pre><br />
dd.exe if=<image name> of=<your microSD device name> bs=512 --progress<br />
</pre><br />
where:<br><br />
''[http://en.wikipedia.org/wiki/Dd_(Unix)#Block_size bs]'' is the block size.<br><br />
''--progress'' option will print the status of the bytes written on the microSD card.<br />
<br />
==Linux OS==<br />
In this example we used a 4GB micro SD card.<br><br />
To identify the device name plug a microSD card in a USB card reader and issue a [http://www.linfo.org/dmesg.html dmesg] command on your linux box terminal.<br> <br />
A sample output should contain, on the last few lines, something similar with:<br />
<br />
<pre style="font-size: medium"><br />
sd 8:0:0:3: [sdf] Attached SCSI removable disk<br />
sd 8:0:0:3: [sdf] 7677952 512-byte logical blocks: (3.93 GB/3.66 GiB)<br />
</pre><br />
<br />
In our example the microSD device name is '''/dev/sdf'''<br />
<br />
=Writing the OS image to the microSD=<br />
The prebuilt images available for download [http://arm.mini-box.com/index.php?title=Releases here], must be unpacked with unzip <file_name> and then written on the microSD card using the [http://en.wikipedia.org/wiki/Dd_(Unix) dd command] in Linux environment.<br><br />
Example:<br />
<pre style="font-size: medium"><br />
sudo dd if=<image name> of=<your microSD device name> bs=1M<br />
</pre><br />
Note that the "--progress" option is not available on all Linux distributions.<br><br />
To see progress on distros that don't supply the option, open a second terminal and find the PID of your command by looking for part of the image name.<br><br />
Example:<br />
<pre style="font-size: medium"><br />
ps aux | grep angstrom<br />
</pre><br />
You will see something similar to:<br />
<pre style="font-size: medium"><br />
root 15200 17.0 0.0 12068 1676 pts/0 D+ 12:36 0:00 dd if=angstrom-gpe-2011-10-12.img of=/dev/sdi bs=1M<br />
</pre><br />
So the PID is 15200. Now in the second terminal you can enter <br />
<pre style="font-size: medium"><br />
sudo kill -USR1 15200<br />
</pre><br />
dd will respond by showing the progress.<br />
<br />
Or easier (note the <b>&</b> at the end of first command): <br />
<pre style="font-size: medium"><br />
dd if=<image name> of=<your microSD device name> &<br />
watch -n 5 -e kill -USR1 $! || echo "Done writing"<br />
</pre></div>Admin