Since this has been needed from time to time, and we finally had K9DC and Doug as well as myself KF7QLH compile a list of instructions for 3 different platforms, I thought I would put them into one “easy to search for” message.

This is how you make a BACKUP OF YOUR PiRLP node. Yes, A BACKUP. It is required. Just like cars, they need gas AND OIL. You need a running version of your SD card, and a BACKUP!!!!

*Linux*

-Show the SD Card-

# dmesg [690179.497173] sdb: sdb1 sdb2 [690180.134547] EXT4-fs (sdb2): recovery complete [690180.134555] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)

-Un-Mount The Card (both partitions)-

# umount /dev/sdb1 # umount /dev/sdb2

-Make an IMAGE backup of the entire card-

# dd if=/dev/sdb of=/home/user/Backups/pirlp.img bs=1M

This will take a while, because it's not just copying the files, it's actually taking an image of the entire SD card, which is 4 gigs of data… So be patient.

Then, to reverse the operation to copy the image back onto your SD card… # umount /dev/sdb1 # umount /dev/sdb2

# dd if=/home/user/Backups/pirlp.img of=/dev/sdb bs=1M

Be VERY VERY VERY careful you use the right command when doing a “dd” command, as you can easily over-write anything that is on the card, or over-write the .img file.

If= The “READ” Of=The “WRITE”


*Windows* Using a windows system and card reader this is even easier -

Shutdown the Pi system - 'shutdown -h now' or however you do it.

Take the card out of the Pi and insert it in the windows system reader/writer

Read the card and save the image. I use 'win32diskimager'.

The image is then stored on the hard drive of the windows system. To copy it off to another SD card just insert the card, select the image to write and write it.

No formating, partitioning etc. is needed. The card can be in any state,. It is totally overwritten. An image is an exact copy of what as on the original card. However it was setup including all system settings is the way the new card will be.

Also if you need to create a new install or reinstall from scratch you need to download the OS - Raspbien from the Raspbien download site. Make a few config settings, download the install IRLP script and execute it. This is a simplified description but it is not much more complicated. There is a paper on how to do this.

The downside of doing your own install is that you have to download and install the extra stuff yourself - like the echo bridge and other scripts.

Once you have a Pi system setup though you can clone it and hopefully never have to do all that again.


*Macintosh*

It is also very easy on a Macintosh. Basically the same procedure as making a copy on Linux, although the commands, device names and directory structures are different. You will need to use the terminal program in the Applications/Utilities folder. You also will need to become root, or precede all the commands below with a `sudo' (the root account is disabled by default on Macs, but it can be activated)

Insert the SD card into the memory slot (all recent Macs have an SD slot).

To determine what the SD card is called, use the command below… [If you only have a single drive in your Mac, it will probably be disk1. If the SD card is something else, use that number in all the examples below]

diskutil list

dave@DGingrich-MBPr:~$ diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *751.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Macintosh HD 749.1 GB disk0s2 3: Apple_Boot Recovery HD 1.8 GB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *4.0 GB disk1 1: Windows_FAT_32 58.7 MB disk1s1 2: Linux 3.8 GB disk1s2

Obviously, the SD card is called “disk1” on my Macintosh.

The partitions must be unmounted. Use the command…

diskutil unmountDisk disk1

To make a copy of the SD card to your local drive… [replace <user_dir> with whatever your home directory is called, usually your short user name]

dd if=/dev/disk1 of=/Users/<user_dir>/pirlp.img

Replace the SD card with a new one. The command to copy the file to a new SD…

diskutil unmountDisk disk1

dd if=/Users/<user_dir>/pirlp.img of=/dev/disk1

As with Linux, it can take some time for the copy to complete, like 60-80 minutes. The speed is on the order of 1 MB/sec. You do the math.

Pop the backup SD in your Pi, and power it up. Plus, you now also have a copy in your Mac home directory should you need it again.