sdhayes
Posts: 4
Joined: Sun Nov 11, 2012 7:39 am

Copy SD card O/S

Thu Dec 13, 2012 1:07 pm

Hi,

I've spent a l-o-n-g time compiling MongoDB on a single R Pi. I have 5 and am attempting to build a MongoDB cluster with data sharded across each Pi (node).

It takes an age (overnight, at least!) to install mongodb.

After having successfully done it (not without problems), is it possible to just clone the memory card ie stick it in my laptop card reader and write it to a card reader in another USB slot.

Or, will I need to compile stuff that a straight copy won't cover?

Thank you
Stuart

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Copy SD card O/S

Thu Dec 13, 2012 1:11 pm

It should just copy. I assume anything Pi specific can be changed on the specific Pi.

Disconnect
Posts: 12
Joined: Fri Nov 16, 2012 7:37 pm

Re: Copy SD card O/S

Thu Dec 13, 2012 4:31 pm

sdhayes wrote:Hi,
After having successfully done it (not without problems), is it possible to just clone the memory card ie stick it in my laptop card reader and write it to a card reader in another USB slot.
There is nothing inherently wrong with doing that, but be sure to use a DD tool (same tool you used to write the card to begin with should work) rather than just a copy. Under windows/mac only the boot partition will show up.

And FYI if performance continues to be an issue you can set it up to run off of a usb key. (There are a lot of reports of the sd card being much slower than usb.) Just use the pi (or an extfs-capable computer) to create a new filesystem on USB and copy (or rsync) the sd root filesystem over, then change the kernel commandline to point to the new partition instead of /dev/mmcblk0p2 (/dev/sdXY where X is the disk number starting at 'a' and Y is the partition number, starting with 1. So it will probably /dev/sda1..)

That also gets around the core_freq SD corruption issues, as you can set the card to read-only (or not mount it at all by commenting out the /boot line in fstab) and overclock much farther.

I run my "general server" pi that way, OC'd to (non-warranty-voiding) 1ghz. The only drawback is having to pull the card to update the firmware.

Return to “General discussion”