Installing the Filesystem to an SD Card: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 3: Line 3:
This tutorial will guide you on manually installing the filesystem onto an SD card.
This tutorial will guide you on manually installing the filesystem onto an SD card.


== Locate the filesystem ==
== Insert and mount the SD card ==


Locate the filesystem you want to use as your root filesystemBy default, this is located at <sdk install dir>/fs/fs.
Insert the SD card and locate the right /dev deviceYou can run the following command before inserting the SD card to see where Linux locates the SD card in the /dev directory.


<pre>
<pre>
$ cd <sdk install dir>
$ watch "dmesg | tail -5"
$ FSROOT=$PWD/fs/fs
</pre>
</pre>


== Mount the SD card ==
<pre>
[477930.856298]  sdc: sdc1
[477931.648223] kjournald starting.  Commit interval 5 seconds
[477931.652410] EXT3 FS on sdc1, internal journal
[477931.652470] EXT3-fs: recovery complete.
[477931.652491] EXT3-fs: mounted filesystem with ordered data mode.
</pre>


Create a temporary mount point and mount the SD card.
Create a temporary mount point and mount the SD card.
Line 24: Line 29:


Copy the filesystem to the SD card, ensuring that you preserve all of the file attributes and ownership.
Copy the filesystem to the SD card, ensuring that you preserve all of the file attributes and ownership.
The filesystem built by the SDK is in the SDK install directory under <sdk install dir>/fs/fs


<pre>
<pre>
$ sudo cp -adpr $FSROOT/* temp
$ sudo cp -adpr <sdk install directory>/fs/fs temp
$ sync
$ sync
$ sudo umount temp
$ sudo umount temp

Revision as of 21:56, 23 December 2010

Installing a filesystem to an SD card

This tutorial will guide you on manually installing the filesystem onto an SD card.

Insert and mount the SD card

Insert the SD card and locate the right /dev device. You can run the following command before inserting the SD card to see where Linux locates the SD card in the /dev directory.

$ watch "dmesg | tail -5"
[477930.856298]  sdc: sdc1
[477931.648223] kjournald starting.  Commit interval 5 seconds
[477931.652410] EXT3 FS on sdc1, internal journal
[477931.652470] EXT3-fs: recovery complete.
[477931.652491] EXT3-fs: mounted filesystem with ordered data mode.

Create a temporary mount point and mount the SD card.

$ mkdir temp
$ sudo mount /dev/sdc1 temp

Copy the filesystem to the SD card

Copy the filesystem to the SD card, ensuring that you preserve all of the file attributes and ownership.

The filesystem built by the SDK is in the SDK install directory under <sdk install dir>/fs/fs

$ sudo cp -adpr <sdk install directory>/fs/fs temp
$ sync
$ sudo umount temp
$ rm -rf temp

The filesystem should now be ready to use on your board.

See also:

Formatting a new SD card
Configuring the Avnet S6-OMAP board to use an SD Card root filesystem
Getting Started Guide for the AVNET OMAPL138 EVM