Copy an image file to the SD card: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Imported from Redmine)
 
(Update formatting)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Copy an image file to the SD card =
Given you have file with a name like <code>e300.direct.xz</code> and you need to copy it onto an SD card, there are a couple of methods. Copying the image onto the card has all the needed partition information, saving you from lots of potential errors, on the other hand it can be slower.


Given you have file with a name like e300.direct.xz and you need to copy it onto an SD card, there are a couple of methods. Copying the image onto the card has all the needed partition information, saving you from lots of potential errors, on the other hand it can be slower.
In the past we used the <code>dd</code> command like this:
 
In the past we used the dd command like this:


<pre>$ xzdec e300.direct.xz
<pre>$ xzdec e300.direct.xz
$ sudo dd if=e300.direct of=/dev/sdX</pre>
$ sudo dd if=e300.direct of=/dev/sdX</pre>
where /dev/sdX is the device the card is mounted as. This works, but can be slow.


Recently, we have started working with the bmaptool (http://lwn.net/Articles/563355/) So lets install bmaptool and copy an image that way.
Where <code>/dev/sdX</code> is the device the card is mounted as. This works, but can be slow.
 
Recently, we have started working with the <code>bmaptool</code> (http://lwn.net/Articles/563355/) So lets install <code>bmaptool</code> and copy an image that way.


<pre>$ git clone git://git.infradead.org/users/dedekind/bmap-tools.git
<pre>$ git clone git://git.infradead.org/users/dedekind/bmap-tools.git
Line 16: Line 15:
If you can't run git through your firewall, I places a tarball at https://dl.dropboxusercontent.com/u/14618236/bmap-tools-3.2.tar.gz.
If you can't run git through your firewall, I places a tarball at https://dl.dropboxusercontent.com/u/14618236/bmap-tools-3.2.tar.gz.


Now you should be able to run bmaptool from your path.
Now you should be able to run <code>bmaptool</code> from your path.


<pre>$ sudo bmaptool copy e300.direct.xz /dev/sdX --nobmap</pre>
<pre>$ sudo bmaptool copy e300.direct.xz /dev/sdX --nobmap</pre>
While writing this, I saw that it is possible bmaptool might install from http urls. I need to test this
 
While writing this, I saw that it is possible <code>bmaptool</code> might install from http urls. I need to test this.

Latest revision as of 07:26, 20 March 2017

Given you have file with a name like e300.direct.xz and you need to copy it onto an SD card, there are a couple of methods. Copying the image onto the card has all the needed partition information, saving you from lots of potential errors, on the other hand it can be slower.

In the past we used the dd command like this:

$ xzdec e300.direct.xz
$ sudo dd if=e300.direct of=/dev/sdX

Where /dev/sdX is the device the card is mounted as. This works, but can be slow.

Recently, we have started working with the bmaptool (http://lwn.net/Articles/563355/) So lets install bmaptool and copy an image that way.

$ git clone git://git.infradead.org/users/dedekind/bmap-tools.git
$ cd bmap-tools
$ sudo python setup.py install

If you can't run git through your firewall, I places a tarball at https://dl.dropboxusercontent.com/u/14618236/bmap-tools-3.2.tar.gz.

Now you should be able to run bmaptool from your path.

$ sudo bmaptool copy e300.direct.xz /dev/sdX --nobmap

While writing this, I saw that it is possible bmaptool might install from http urls. I need to test this.