Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicating identical BeagleBone Black setups

After having set-up and customized my "master" BeagleBone Black (BBB) with applications etc. on the on-board eMMC, I want to duplicate it on other BBB boards.

What is the best way to duplicate the BBB?

My understanding of options:

  1. SD-Card: Programming each board by inserting a prepared SD card containing an image and pressing the "boot" switch while powering up.
    • How should I prepare that .img file or the SD card from my master BBB?
    • The image should copy to the on-board eMMC, so that the SD-card can be removed afterwards.
  2. USB: Programming by connecting the board over USB to a (Win7) PC.
    • Is it possible to write the full on-board eMMC from the PC?
    • With which app to do the writing?
    • How to prepare the image which will be written, starting from the master BBB?
  3. Ethernet: Programming over LAN after boot-up with default angstrom distro.
    • Is it even possible over LAN?
    • How to do the writing?
    • How to prepare the image which will be written, starting from the master BBB?

Which is possible/best?

Edit: My current solution is to flash with a standard image (from the BeagleBoe website) and then have a script do all modifications as expected. This includes disabling many services I don't need, installing applications and configuring stuff etc. If there is an easier way for making a SD card with a full image on it, I'm still interested.

like image 801
Philipp Avatar asked Jul 24 '13 12:07

Philipp


3 Answers

As noted at the bottom of the eLinux article, there is a much easier way if you are running the Debian distribution:

  1. Boot master BBB with no SD card in
  2. Insert SD card
  3. Log in (e.g. with serial terminal, SSH etc.) and run sudo /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh. LEDs will flash in sequence whilst SD card is being written.
  4. When the LEDs stop and the script terminates, remove the SD card.
  5. Insert SD card into new BBB then power on.
  6. eMMC will be flashed; LEDs on new BBB will flash in sequence until complete.
like image 83
emorris Avatar answered Nov 06 '22 10:11

emorris


For anyone else that needs this, the best answer I've found to this is to do the following:

First setup your master Beaglebone Black the way you want it.

Backup the eMMC

  • FAT format a 4GB or larger SD card (must be a MBR/bootable formatted microSD card)
  • Download beagleboneblack-save-emmc.zip and extract the contents onto your SD card

    Note: this is an image from Jason Krinder at his github https://github.com/jadonk/buildroot using the save-emmc-0.0.1 tag

  • Put the card into your powered off Beaglebone Black
  • Power on your Beaglebone Black while holding the S2 Button
  • The USR0 led will blink for about 10 minutes, when it's steady on you have an SD card with a copy of your eMMC in a .img file

Use the eMMC to flash a new Beaglebone Black

  • On the SD card edit autorun.sh

    #!/bin/sh
    echo timer > /sys/class/leds/beaglebone\:green\:usr0/trigger 
    dd if=/mnt/<image-file>.img of=/dev/mmcblk1 bs=10M
    sync
    echo default-on > /sys/class/leds/beaglebone\:green\:usr0/trigger
    

    where <image-file> is the image file you got after copying backing up your eMMC

  • Insert the card into your powered off Beaglebone Black
  • Power on your Beaglebone Black while holding the S2 Button
  • The Beaglebone Black should go into rebuilding mode and within about 20 minutes you'll have a newly flashed Beaglebone Black (when all 4 USR LEDs are solid) with a copy of your original

eLinux reference used for this article - http://elinux.org/BeagleBone_Black_Extracting_eMMC_contents

like image 32
Paul Ryan Avatar answered Nov 06 '22 12:11

Paul Ryan


I have the same need and am using dd and nc (NetCat) to save directly on my desktop without having to use an intermediary SD Card. You can do this over the USB connection, or ethernet connection, by changing the IP address in the steps below.

After setting up your BBB with the applications you want, the basic steps are:

  1. On the desktop, run this command in a terminal:

nc -l 19000|bzip2 -d|dd bs=16M of=BBB.img

  1. On the BeagleBone Black, run this command in a terminal (you can SSH into it, or do it directly from the BBB):

dd bs=16M if=/dev/mmcblk0|bzip2 -c|nc 192.168.7.1 19000

The 192.168.7.1 address is for the USB connection. (BBB is 192.168.7.2) If you're doing this over an ethernet connection, you should use your desktop's IP address.

This is taken from instructions here.

Finally, follow any method to install onto the next BBB. Here's an example of how to flash the emmc.

like image 9
SevakPrime Avatar answered Nov 06 '22 11:11

SevakPrime