Having problems cloning eMMC

122 views
Skip to first unread message

br...@forceconstant.com

unread,
Dec 2, 2014, 2:32:08 PM12/2/14
to beagl...@googlegroups.com
I am trying to clone an existing BBB, so my first try is using the scripts on http://elinux.org/BeagleBone_Black_Extracting_eMMC_contents .  So first thing I notice is the .img file created was only 2GB, whereas this is a newer BBB that has 4GB eMMC.  So when I updated script to write the img to new BBB, it no longer boots from eMMC.  i would like to make exact copies including uENV.txt, etc.  Does anyone know why this is not working?

The read command script is

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

janszyma...@gmail.com

unread,
Dec 2, 2014, 5:22:47 PM12/2/14
to beagl...@googlegroups.com, br...@forceconstant.com
there is another thread here Duplicate BeagleBone black setup dated Nov 28, where you will find a solution to your problem.
Good luck.
Jan

br...@forceconstant.com

unread,
Dec 2, 2014, 6:57:16 PM12/2/14
to beagl...@googlegroups.com, br...@forceconstant.com, janszyma...@gmail.com
So in that other thread, it was instructed to use the same dd command "dd if=/dev/mmcblk1 of=/mnt/BeagleBoneBlack-eMMC-image-$RANDOM.img bs=10M" to create image, so why would mine only end up 2GB instead of 4GB?  I cannot follow those instructions exactly, as I only have a 4GB SD card, so maybe this is the problem since the eMMC is 4GB also.

Graham

unread,
Dec 2, 2014, 11:20:13 PM12/2/14
to beagl...@googlegroups.com, br...@forceconstant.com, janszyma...@gmail.com
I think you will have two problems.

First, you can not put a 4GB file on a 4 GB card, because there must also be room for the
Linux OS, and depending on the version, this can be another 1 GB, or more.

Second problem is that when you install a 2 GB image on a 4 GB card, the partition as
installed is typically about 2 GB, and the rest of the card can not be used, until you
expand the partition to the full size of the card.

So, for working with the 4 GB eMMC version of the Beaglebone Black, you must use
at least an 8 GB card.  I use 16 GB, so that there is room for about three images
that are not compressed.  You can not go larger than 32 GB at this time.

--- Graham

==

br...@forceconstant.com

unread,
Jan 20, 2015, 9:07:39 AM1/20/15
to beagl...@googlegroups.com, br...@forceconstant.com, janszyma...@gmail.com
So I got my 8gb flash, and resized original boards partition to be smaller than second board.  So now the problem is I have flashed new board, and it will not boot up.  I can mount and view both partitions correctly, and everything looks ok, but I only get "CCC" when trying to boot and viewing with FTDI cable.   Any ideas?

Disk /dev/mmcblk1: 3867 MB, 3867148288 bytes
                                 
4 heads, 16 sectors/track, 118016 cylinders, total 7553024 sectors
           
Units = sectors of 1 * 512 = 512 bytes
                                       
Sector size (logical/physical): 512 bytes / 512 bytes
                         
I
/O size (minimum/optimal): 512 bytes / 512 bytes
                             
Disk identifier: 0x00000000
                                                   
                             
                                                 
       
Device Boot      Start         End      Blocks   Id  System
           
/dev/mmcblk1p1   *        2048      198655       98304    e  W95 FAT16 (LBA)
 
/dev/mmcblk1p2          198656     7571455     3686400   83  Linux

Graham Haddock

unread,
Jan 20, 2015, 10:45:02 AM1/20/15
to beagl...@googlegroups.com, br...@forceconstant.com, Jan Szymanski
Did you set the "boot" bit on the 8gb flash card?

The later versions of the OS can not see or boot from the uSD card unless the "boot" bit is set.

The "CCCCCC" string means that the BBB can not see the card, and is trying to boot from
the serial port.

--- Graham

==

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/u12eEHlfvmE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Wagener

unread,
Jan 20, 2015, 12:19:50 PM1/20/15
to Graham Haddock, beagl...@googlegroups.com, Jan Szymanski

It is not a uSD but internal eMMC. And you can see from fdisk output boot flag is set.

Robert Nelson

unread,
Jan 20, 2015, 12:23:49 PM1/20/15
to Beagle Board, Graham Haddock, Jan Szymanski
On Tue, Jan 20, 2015 at 11:19 AM, Brian Wagener <br...@forceconstant.com> wrote:
> It is not a uSD but internal eMMC. And you can see from fdisk output boot
> flag is set.

and how exactly did you install the bootloader to the eMMC?

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

br...@forceconstant.com

unread,
Jan 20, 2015, 12:38:17 PM1/20/15
to beagl...@googlegroups.com, gra...@flexradio.com, janszyma...@gmail.com
I'm not sure what you mean by bootloader.  But I just read in entire mmcblk1 (When booting off a SD card to image) on one BBB using dd, and output to another using dd.  

// BBB 1
dd bs=4M if=/dev/mmcblk1 of=image.bin

// BBB 2
dd bs=4M if=image.bin of=/dev/mmblk1

Robert Nelson

unread,
Jan 20, 2015, 12:46:40 PM1/20/15
to Beagle Board, Graham Haddock, Jan Szymanski
On Tue, Jan 20, 2015 at 11:38 AM, <br...@forceconstant.com> wrote:
> I'm not sure what you mean by bootloader. But I just read in entire mmcblk1
> (When booting off a SD card to image) on one BBB using dd, and output to
> another using dd.
>
> // BBB 1
> dd bs=4M if=/dev/mmcblk1 of=image.bin
>
> // BBB 2
> dd bs=4M if=image.bin of=/dev/mmblk1

At which point, it's likely your original "/dev/mmcblk1" didn't have
the bootloader installed either.

br...@forceconstant.com

unread,
Jan 20, 2015, 12:54:52 PM1/20/15
to beagl...@googlegroups.com, gra...@flexradio.com, janszyma...@gmail.com
So the original BBB does boot fine.  But how can I re-install bootloader for BBB2?  But it is my understanding, the bootloader is what is in the Fat32 partition?  It looks the same as the other one.  

total 9820
                                                                    
drwxr-xr-x 2 root root    2048 Apr 23 16:22 App
                               
-rwxr-xr-x 1 root root     223 Apr 23 16:22 autorun.inf
                       
drwxr-xr-x 2 root root    2048 Apr 23 20:21 debug
                             
drwxr-xr-x 4 root root    4096 Apr 23 16:22 Docs
                              
drwxr-xr-x 5 root root    2048 Apr 23 16:22 Drivers
                           
drwxr-xr-x 2 root root    2048 Apr 23 16:22 dtbs
                              
-rwxr-xr-x 1 root root      51 Apr 23 16:22 ID.txt
                            
-rwxr-xr-x 1 root root 2869999 Apr 23 20:20 initrd.img
                        
-rwxr-xr-x 1 root root   41174 Apr 23 16:22 LICENSE.txt
                       
-rwxr-xr-x 1 root root   81264 Apr 23 20:22 MLO
                               
-rwxr-xr-x 1 root root   16822 Apr 23 16:22 README.htm
                        
-rwxr-xr-x 1 root root     292 Apr 23 16:22 README.md
                         
drwxr-xr-x 2 root root    2048 Apr 23 16:22 scripts
                           
-rwxr-xr-x 1 root root     313 Apr 23 16:22 SOC.sh
                            
-rwxr-xr-x 1 root root   16822 Apr 23 16:22 START.htm
                         
drwxr-xr-x 2 root root    2048 Aug 15  2014 System Volume Information
         
-rwxr-xr-x 1 root root  401800 Apr 23 20:22 u-boot.img
                        
-rwxr-xr-x 1 root root    1513 Sep 15  2014 uEnv.txt
                          
-rwxr-xr-x 1 root root    1514 Aug 21  2014 uEnv.txt~
                         
-rwxr-xr-x 1 root root 2870063 Apr 23 20:20 uInitrd
                           
-rwxr-xr-x 1 root root 3717760 Apr 23 16:22 zImage
  

Robert Nelson

unread,
Jan 20, 2015, 12:59:12 PM1/20/15
to Beagle Board, Graham Haddock, Jan Szymanski
On Tue, Jan 20, 2015 at 11:54 AM, <br...@forceconstant.com> wrote:
> So the original BBB does boot fine. But how can I re-install bootloader for
> BBB2? But it is my understanding, the bootloader is what is in the Fat32
> partition? It looks the same as the other one.

MLO/u-boot.img is the bootloader..

MLO must be the first thing copied to the partition.
Reply all
Reply to author
Forward
0 new messages