cloning an eMMC card

Post Reply
richard-g8jvm
Posts: 330
Joined: Sun Jan 18, 2015 1:27 am
languages_spoken: english
ODROIDs: C1+ C2, XU4
Location: Telford UK
Contact:

cloning an eMMC card

Unread post by richard-g8jvm » Sun Jan 13, 2019 5:52 am

Hi
My son wnts an C2 to do exactly what I use mine for
so it makes sense to clone my 32GB eMMc card
I can use dd to make a copy of my card, but the new card will have an older version of ubuntu on it
I'm not concerned over that as using dd to copy my card over will over write it.
the question I have is over partitions and card size

1, using dd to copy will that copy the FAT32 patition as well as the ext4

2 I have a 32GB eMMC card and I will be copying to a 16 GB eMMC card, I still have 25 GB free on my card
as its bit by bit process when it get to the end of the 16GB card will it just stop and be useable, or will it get all screwed up

The alternative is to load the ubuntu 18 image and then copy /etc &/home across and load an earlier version of lirc if that still busted

Thanks
BR
Richard G8JVM

lazlo
Posts: 95
Joined: Sun Oct 01, 2017 11:32 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: cloning an eMMC card

Unread post by lazlo » Sun Jan 13, 2019 2:38 pm

There are a lot of ways to do what you want, but two ways stand out as the most direct approach:


1.) Boot off of an SD card and use gparted to resized the partitions and filesystems on the 32GB eMMC card so that they total 16GB and then use dd to clone it. After that is done you can use gparted to restore the 32GB eMMC to it's original state.

2.) Manually create the partitions and filesystems on the 16GB card and then use rsync to make an exact copy of the data on each filesystem from the 32GB eMMC.

Hope that helps.

User avatar
mad_ady
Posts: 5119
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: cloning an eMMC card

Unread post by mad_ady » Sun Jan 13, 2019 3:46 pm

You can't boot from SD while a valid emmc is plugged in into a C2. You can look for and use odroid-backup for this task.

lazlo
Posts: 95
Joined: Sun Oct 01, 2017 11:32 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: cloning an eMMC card

Unread post by lazlo » Sun Jan 13, 2019 5:22 pm

mad_ady wrote:
Sun Jan 13, 2019 3:46 pm
You can't boot from SD while a valid emmc is plugged in into a C2. You can look for and use odroid-backup for this task.
I didn't know that. Thanks for the heads up.

User avatar
rooted
Posts: 6107
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: cloning an eMMC card

Unread post by rooted » Sun Jan 13, 2019 5:26 pm

While I'm sure it's not safe I have installed eMMC into a running system.

richard-g8jvm
Posts: 330
Joined: Sun Jan 18, 2015 1:27 am
languages_spoken: english
ODROIDs: C1+ C2, XU4
Location: Telford UK
Contact:

Re: cloning an eMMC card

Unread post by richard-g8jvm » Sun Jan 13, 2019 6:59 pm

Hi
Try Again
Take the eMMC card out of a running C2 and using the adaptor use dd to make a copy of the 32GB eMMC card to a file on my computer,
then put the card back in ti C2 and carry on using it.
Step 2
using dd load the file copied from my C2 eMMC card, use dd to load the file to the new 16GB eMMC card which will have a copy of 16.04 on it
the original 16.04 would be overwritten by the new file which is 18.04

Step 3
question as original posting

Thanks
BR
Richard G8JVM

User avatar
mad_ady
Posts: 5119
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: cloning an eMMC card

Unread post by mad_ady » Sun Jan 13, 2019 9:50 pm

Step 2 will result in a corrupt rootfilesystem because of the size difference. Odroid-backup handles the resizing for you.

richard-g8jvm
Posts: 330
Joined: Sun Jan 18, 2015 1:27 am
languages_spoken: english
ODROIDs: C1+ C2, XU4
Location: Telford UK
Contact:

Re: cloning an eMMC card

Unread post by richard-g8jvm » Sun Jan 13, 2019 10:13 pm

Thanks for the clarifucation Mad_ady
So If I use odroid-backup to back my working C2 image to a USB pen drive
and then when have the new C2 which will have the stock Unbutu on it, 16.04,
After loading odroid-backup and dependencies on the new C2,
run odroid-backup and restore from the USB pen drive the new C2, it will then run ubuntu 18.04 as on the original C2
Can all this be done on a terminal in a ssh link
as the C2 is effective headless, ( used as a set to kodi machine )
Thanks
BR
Richard G8JVM

User avatar
mad_ady
Posts: 5119
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: cloning an eMMC card

Unread post by mad_ady » Mon Jan 14, 2019 2:12 am

Yes. You can do the backup on a live system (and can use --text to run it from a shell), but you can't restore on a live system. When you get your new sd/emmc, use the adaptor and connect it to the original system and run the restore with the sd/emmc as target.
It would be best for kodi to be off (or at least not scanning for content) while you do the backup.

richard-g8jvm
Posts: 330
Joined: Sun Jan 18, 2015 1:27 am
languages_spoken: english
ODROIDs: C1+ C2, XU4
Location: Telford UK
Contact:

Re: cloning an eMMC card

Unread post by richard-g8jvm » Mon Jan 14, 2019 2:39 am

Thanks
I've got big problems right now,
did a apt update && apt upgrade
Its dumped libs needed by kodi
and it wont connect to the ubuntu repos for an up date
arghhhh !
getting
Could not connect to deb.odroid.in:80 (104.236.30.141), connection timed out

on all !
sorta mega miffed
BR
Richard G8JVM

richard-g8jvm
Posts: 330
Joined: Sun Jan 18, 2015 1:27 am
languages_spoken: english
ODROIDs: C1+ C2, XU4
Location: Telford UK
Contact:

Re: cloning an eMMC card

Unread post by richard-g8jvm » Mon Jan 14, 2019 4:33 am

got that sorted :)

now running odroid-backup.pl on both the C2 and this laptop running linux mint19 which is ubuntu18.04 based
gives this message

Code: Select all

Can't call method "msgbox" on an undefined value at /usr/local/bin/odroid-backup.pl line 936.
Also there is no libui-dialog-perl thats on both machines C2 and this laptop
BR
Richard G8JVM

User avatar
mad_ady
Posts: 5119
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1
Location: Bucharest, Romania
Contact:

Re: cloning an eMMC card

Unread post by mad_ady » Tue Jan 15, 2019 12:18 am

Ubuntu stopped shipping that package with 18.04. Try to install it from cpan instead with:

Code: Select all

sudo perl -MCPAN -e 'install UI::Dialog'
... and try again.

richard-g8jvm
Posts: 330
Joined: Sun Jan 18, 2015 1:27 am
languages_spoken: english
ODROIDs: C1+ C2, XU4
Location: Telford UK
Contact:

Re: cloning an eMMC card

Unread post by richard-g8jvm » Tue Jan 15, 2019 12:24 am

That worked on the laptop thanks
BR
Richard G8JVM

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests