Backup Linux SD Cards for Embedded Boards

Developers who are using SD Cards for booting the OS for your embedded boards needs to backup the SD Card with modifications done such as installing new programs for the future use or for cloning the OS for another board. These steps will help you for the purpose.

 

Beaglebone Open Hardware

Beaglebone Open Hardware

OpenCV in Beagleboard, Embedded Linux

For this purpose we make use of ‘dd’ command which is a part of GNU Coreutils package. The method which is described below doesn’t require embedded boards in hand, instead user can use any desktop PC running Linux OS.

After inserting the prebuild SD Card into the card reader and connecting to your PC/Laptop, you need to unmount the volume pointed by the SD Card.

To find out the Volume name type the following in the terminal

 dmesg | tail

 

Find entry similar to /dev/sdX, note that /dev/sda must be most probably your HardDrive.

Type unmount /dev/sdX to unmount the volume.

Note: GUI users can unmount the device by simply right clicking the device icon and select Unmount. However, don’t eject the volume by selecting eject option.

Backup the SD Card by typing the following command in the terminal.

Note: Replace X in sdX with the suitable entry found by the command `dmesg | tail` previously.

 dd if=/dev/sdX of=<path>/myimage.img

 

Note: This may take minutes depending upon the amount of volume of your SD Card. Wait for terminal process to return and do not eject the SD Card in the meanwhile.

For cloning the image into the new SD Card use the following command.

 sudo dd if=<path>/my_image.img of=/dev/sdX

 

User can compress the file to 7z format by running the command

7z a <file_name>.7z <path>/my_image.img    // a-compress e-extract

Note: install 7z tools by sudo apt-get install  p7zip-full

Put the new SD Card back to your embedded board and enjoy Linux!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s