Graham,

 You saved me a lot of time and frustration. Thank you, much appreciate it.
My teacher at uni used to quote Alber Einstein - “If you can't explain it 
to a six year old, you don't understand it yourself.” 
Your comprehensive instruction is easy and logical.
I am getting a new uSD cards for that exercise and I had a feeling I should 
be fine from here.
In a meantime, I have a an SD card console image, that you recommended and 
as a surprise it has to SSH on USB.
I put a FTDI cable and I see it is booting and outputs to the serial 
console.
Can I easily add the SSH over USB to that image and if yes, how?

Thank again

Jan

On Friday, November 28, 2014 3:13:40 AM UTC+11, Graham wrote:
>
> Jan:
>
> I also had problems restoring and copying a BBB image for the Rev.C (4 GB 
> eMMC) and
> the new larger Debian distributions, particularly if you have added 
> additional code and
> updates to the distribution for your application.
>
> I suspect that the existing instructions/methods assume smaller code and 
> memory sizes. 
>
> I have been successful duplicating a Debian 8 (jessie) that has had 
> upgrades
> and my application code added to it on a Rev.C BBB.
>
> 1.) Use a uSD card larger than 4 GB.  You will need something larger than 
> 4 GB to 
> save a 4 GB image using dd.   I used 16 GB, but you can not go larger than
> 32 GB at this time.  
>
> 2.) Install one of the Debian distributions on the uSD card.  I chose
> bone-debian-7.7-console-armhf-2014-11-19-2gb.img
>
> 3.) If you examine the installation, it is using less than 2 GB of the 
> card.
> Use Gparted to expand the partition size to the full size of the card.  In 
> my case,
> 16 GB, which gives me room on the card to hold multiple 4 GB ".img" files.
>
> 4.) Plug the uSD card into the BBB for which you want to copy the eMMC and
> apply power. The console distribution I chose boots straight onto the uSD
> card, without pressing the S2 button.  If you use some other distribution,
> things may work differently.
>
> 5.) Sign in as 'root' and enter
> dd if=/dev/mmcblk1 of=/mnt/BeagleBoneBlack-eMMC-image-$RANDOM.img bs=10M
>
> 6.) Wait 9 minutes for the command to return to the command line. It takes 
> about
> 2 minutes per GB to build the ".img" file. type sync. The completed file 
> will be located
> at /mnt/   The ".img" file will be slightly less than 4 GB in size
>
> 7.) Shutdown this BBB, and plug the uSD card in the target BBB.
>
> 8.) Power up the target BBB and sign in as root, and type on the command 
> line
> dd if=/mnt/BeagleBoneBlack-eMMC-image-NUMBER.img of=/dev/mmcblk1 bs=10M
> where NUMBER is the random number of the img that was generated in step 
> (5).
>
> 9.) Wait 9 minutes for the command to return, sync, shutdown, remote uSD 
> card
> and re-power the target.  The target should now be a duplicate.
>
> Other thoughts:
> You can compress the "img" file on the BBB by
> xz BeagleBoneBlack-eMMC-image-NUMBER.img
> BUT it will take 2 Hours on the BBB to compress a 4 GB file, when booted 
> on an uSD card.
> You are much better off moving the file to an external machine to compress 
> it.
>
> You can do a SSH copy of the "img" file to an external (Linux) machine via
> the Ethernet connection by doing something like:
> scp [email protected]:/mnt/BeagleBoneBlack-eMMC-image-NUMBER.img  
> /home/your-name/Images/
> It will transfer at around 8 MB per second, if the BBB is otherwise idle.
>
> --- Graham
>
> ==
>
>
>
> On Wednesday, November 26, 2014 8:19:30 PM UTC-6, [email protected] 
> wrote:
>>
>> I was able to save the contents of eMMC as an *.img following this link 
>> http://elinux.org/BeagleBone_Black_Extracting_eMMC_contents 
>> <http://www.google.com/url?q=http%3A%2F%2Felinux.org%2FBeagleBone_Black_Extracting_eMMC_contents&sa=D&sntz=1&usg=AFQjCNGM_Ak68pR603ZNyLkvVfB48DSN2A>
>>  
>> ,
>> into 4GB FAT32 uSD card, no button pressing. After that I modified 
>> autorun.sh as per instruction from the same side.
>> The restore on the same board doesn't hapen, however. Any hints?
>> Jan
>>
>> On Sunday, 23 November 2014 01:22:06 UTC+11, [email protected] wrote:
>>>
>>> Just in case somebody finds it useful:
>>>
>>> The duplication has worked now!
>>> I did it according to first stack overflow answer and the reference here:
>>> http://elinux.org/BeagleBone_Black_Extracting_eMMC_contents 
>>> <http://www.google.com/url?q=http%3A%2F%2Felinux.org%2FBeagleBone_Black_Extracting_eMMC_contents&sa=D&sntz=1&usg=AFQjCNGM_Ak68pR603ZNyLkvVfB48DSN2A>
>>>
>>> The preparation of the microSD card can only be done under a Linux 
>>> environment - at least I did not manage to prepare it under Windows.
>>> The root file system was now 2GB in size - although the Rev C has 4 GB.
>>> Resizing was done exactly like in
>>>
>>> http://blog.asiantuntijakaveri.fi/2014/05/flashing-beaglebone-black-rev-b-2gb.html
>>>
>>> ----" 
>>> What you want to do next is resize root partition to fill entire eMMC, 
>>> otherwise you're leaving few hunded megabytes of capacity unused and rev B 
>>> internal 2GB eMMC is already a bit on small side for full blown Linux 
>>> install. Below steps will of course work for SD card rootfs as well.
>>>
>>> # Switch to root
>>> sudo su -
>>>
>>> # Delete and recreate root partition using entire disk
>>> # internal eMMC is called mmcblk0 now as we don't have any SD cards 
>>> connected
>>> fdisk /dev/mmcblk0
>>> # Delete partition #2 (type "d" and then "2")
>>> # Create new partition (type "n" and hit enter four times to accept 
>>> defaults)
>>> # Write changes (type "w")
>>>
>>> # Reboot so new partition table gets read
>>> reboot
>>>
>>> # Login again as root and resize root fs
>>> resize2fs /dev/mmcblk0p2
>>>
>>>  "---
>>>
>>> Works like a charm!
>>>
>>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to