Duplicating an SD Card Image

Once we have created an SD Card image of our base system, updated the OS and configured for SSH access we don’t want to have to do this over and over again, so this section will show you how to make a copy of your original SD Card and then burn it onto all the others

Without plugging in your SD card, from the command line run the command df

df

Filesystem                        512-blocks       Used Available Capacity  iused     ifree %iused  Mounted on
/dev/disk1                        1247961912  377253544 870196368    31% 47220691 108774546   30%   /
devfs                                    378        378         0   100%      656         0  100%   /dev
map -hosts                                 0          0         0   100%        0         0  100%   /net
map auto_home                              0          0         0   100%        0         0  100%   /home
localhost:/FubuLodeAG-ddMZnEma0co 1247961912 1247961912         0   100%        0         0  100%   /Volumes/MobileBackups

Then insert the card, wait for it to appear on your desktop and then df it again. You will notice the only difference is the new line with your card name on it

df

Filesystem                        512-blocks       Used Available Capacity  iused     ifree %iused  Mounted on
/dev/disk1                        1247961912  377253544 870196368    31% 47220691 108774546   30%   /
devfs                                    378        378         0   100%      656         0  100%   /dev
map -hosts                                 0          0         0   100%        0         0  100%   /net
map auto_home                              0          0         0   100%        0         0  100%   /home
localhost:/FubuLodeAG-ddMZnEma0co 1247961912 1247961912         0   100%        0         0  100%   /Volumes/MobileBackups
/dev/disk2s1                          114576      68000     46576    60%      512         0  100%   /Volumes/Untitled

In this instance my card has been mounted as /dev/disk2s1 and its the number 2 that we are interested in so remember it.

To be able to copy the image we first need to unmount it with the unmount command

sudo diskutil unmount /dev/disk2s1

You will notice the card disappears from your desktop

Next we want to make a copy of the image using the dd command

sudo dd bs=1m if=/dev/rdisk2 of=RPi.img

And finally eject the SD card so we can insert another one and copy the new image to that

sudo diskutil eject /dev/rdisk2

Once one card is done you can repeat this for every card for the super computer. As each card is done, you can boot them individually and change the static ip and hostname using the information documented in Setup Stage 2 – Network Configuration

Your email address will not be published. Required fields are marked *