[SOLVED] Cloning the image of an UP board

Hello there everyone!
I've recently purchased a bunch of UP-Boards and I want to deploy a custom linux installation to all of these.
Here's my current situation:
I have four up-boards laying around here of which I have one of them completely configured with UBILINUX (Let's name this one COMPLETE). Now what I want to do is either clone the complete system from COMPLETE or make a custom image which I can deploy on the other three up-boards. I just don't seem to be able to figure out how to make this happen.
Things I've tried already:
Re-Do Backup & Recovery Tool - Didn't work because I can't seem to make a normal bootable USB that is recognized by the UP-Board in the boot-menu.
Clonezilla - I've tried this option right here MANY times. In the beginning I kept getting the error that it couldn't read/write a certain part of the system ( I didn't document it, pretty silly but I can't give you guys any error messages right now ) and as of now it's completely buggy when I'm trying to make an image of the system. I've already tried making a new Clonezilla bootable USB-drive thinking it might be a problem with the software after so many attempts but this didn't work either. When this didn't work I completely reset the UP-Board and made the same configuration base as I had before thinking it might be a problem with the configured up-board, however, this also doesn't fix the errors I'm getting in Clonezilla
DD full system copy to USB - This option I'm actually trying right now, which is basically using the command sudo dd if=/dev/mmcblk0 of=/dev/sda which according to online tutorials should copy the entire disk 1:1. Only after doing this and putting into the INCOMPLETE up-board I can't seem to find a way to copy the entire USB to the harddisk of the UP-board because I can't seem to figure out how to do this in an EFI shell.
If anyone of you have any experience considering cloning or making an image of an UP-board please give me some guidance in a solution for this issue.
I thank you all in advance!
Hisoka-
I've recently purchased a bunch of UP-Boards and I want to deploy a custom linux installation to all of these.
Here's my current situation:
I have four up-boards laying around here of which I have one of them completely configured with UBILINUX (Let's name this one COMPLETE). Now what I want to do is either clone the complete system from COMPLETE or make a custom image which I can deploy on the other three up-boards. I just don't seem to be able to figure out how to make this happen.
Things I've tried already:
Re-Do Backup & Recovery Tool - Didn't work because I can't seem to make a normal bootable USB that is recognized by the UP-Board in the boot-menu.
Clonezilla - I've tried this option right here MANY times. In the beginning I kept getting the error that it couldn't read/write a certain part of the system ( I didn't document it, pretty silly but I can't give you guys any error messages right now ) and as of now it's completely buggy when I'm trying to make an image of the system. I've already tried making a new Clonezilla bootable USB-drive thinking it might be a problem with the software after so many attempts but this didn't work either. When this didn't work I completely reset the UP-Board and made the same configuration base as I had before thinking it might be a problem with the configured up-board, however, this also doesn't fix the errors I'm getting in Clonezilla
DD full system copy to USB - This option I'm actually trying right now, which is basically using the command sudo dd if=/dev/mmcblk0 of=/dev/sda which according to online tutorials should copy the entire disk 1:1. Only after doing this and putting into the INCOMPLETE up-board I can't seem to find a way to copy the entire USB to the harddisk of the UP-board because I can't seem to figure out how to do this in an EFI shell.
If anyone of you have any experience considering cloning or making an image of an UP-board please give me some guidance in a solution for this issue.
I thank you all in advance!
Hisoka-
Comments
I have found a way to clone the image of an UP board using CloneZilla, turned out that there were just a few extra tweaks that were necessary after putting back the image.
I have made a guide on how to clone the image, but as of now it is in Dutch.
If you have any interest in the file please let me know and I will translate it to English and share it here.
Kind Regards,
Kamarasu
HELP.
My usb3 connector of my firt upboard is dead and I need urgently to clone it to a second one... same hardware. ( 64Gb memory, 8Gb ram)
Please if you have any solution or tutorial to share with me/us about cloning it would help me.
Even if it is in Dutch, you can explain me in private and I will translate for everybody thanks to google translate ;-)
thanks a lot in advance
RAPHAËL
Raphael, are you sure you have an Up Board with 8GB RAM / 64GB Flash?
It sounds to me like either you have an Up Board with 4GB RAM / 64GB Flash or an Up Squared with 8GB RAM / 64GB Flash.
Either way, these instructions are almost identical and I have tested them both myself just now on both an Up Board 4GB/32GB and an Up Squared n4200/8GB/64GB.
Here's the full guide with extra everything. The guide assumes you have a Windows machine handy:
1) Creating a Linux USB Stick.
Take 1 trustworthy USB stick that you have nothing on (or nothing you can't lose).
Download your favorite Linux distributions. I used Kubuntu 17.04beta2. Make sure it's the 64bit one and that it's the desktop (not server in case you're using normal Ubuntu).
Go to https://rufus.akeo.ie/
Download "Rufus", latest version (2.12 latest right now).
Insert USB stick into your computer.
Start Rufus and accept any security prompts (UAC).
Under "Device", make sure that it displays the correct USB Stick and if not, change it to it.
Under "Partition scheme and target system type", pick "GPT partition scheme for UEFI".
Under "File system", pick "FAT32 (Default)" or "Large FAT32 (Default)" if the USB memory stick is larger than 32GB.
Uncheck "Check device for bacd blocks" unless you have spare time and want to make sure it's ok (not a bad idea really).
Make sure "Quick format" is checked.
Make sure "Create a bootable disk using..." is checked.
Click on the Disc icon to the right of where it normally says "FreeDOS".
Select your Linux .iso image.
Verify all settings are correct.
Click Start.
Wait for a bit.
You now have a Linux USB installer that works. Congratulations.
2) Preparing for boot.
Connect the USB Stick, keyboard, mouse and display to your Up Board / Up Squared Board.
Connect the power and if your board is set to boot from flash (and not USB), keep pressing DEL over and over until the BIOS screen appears. Go into BIOS, set it to boot from the USB stick instead of the built in flash (eMMC).
Save settings and tell it to reboot.
3) Preparing for extracting image.
Make it boot into some kind of Live image. Although maybe not strictly necessary it's easier.
When you have the UI up, fire up a command prompt using your favorite method. If in Kubuntu, simply wait a few seconds and type "konsole" (yes, with a k) and press enter.
4) Becoming root. You are now root.
5) Making sure the USB stick you want to write to is read/write and not read only.
In your fancy console write: If it says "ro" after the "(", it's read only, if it's "rw" then you don't have to change it, you're already read write. No space around the comma between remount and rw.
Now your USB stick in in read/write mode.
6) Extracting the image.
First of all you have to decide if you want to compress it at once or not. The command line is slightly different.
Second you need to figure out if you have an Up Board (credit card size) or Up Squared (which would then be... square..).
The ONLY difference is the device: So - the instructions below are written for an Up Squared, i.e. I use /dev/mmcblk1. use "0" instead of "1" for an Up Board.
a) To extract it without compression: It will now show you a progress display of how fast it's extracting and writing it. I hope you have space on the USB stick or some other media you're writing to...
b) To extract it with compression:
use gzip, bzip2 or xz as per your own choice, gzip is worst and fastest, xz is best and slowest. My example uses "gzip": This will extract it and instead of writing it to a file (which will obviously be as big as your flash), it compresses it using gzip which then writes it to the file.
If you want to you can check that the file is OK by just running (or bzip2/xz if you used one of them).
Ok, so now you have the whole image on the USB stick (compressed or not).
6) Gracefully shut down the system.
Start by remounting the usb stick into read only mode if it was. Shut down the OS as normal.
7) Prepare target system.
Remove all cables from the old board and basically do points 2), 3) and 4) on the new board.
So, I am now assuming you're up and running in your spiffy root shell on the new board.
8) Write the image to the flash.
Remember to use mmcblk0 for Up Board and mmcblk1 for Up Squared.
a) If your image is uncompressed:
b) If your image is compressed (substitute gzip with bzip2/xz if you used any of those):
Wait until it completes and you are done.
Yes, it's long and this is clearly just one way to do it but this is how I do it.
Good luck and keep us posted if you do it this way so that others can know, etc.
// Stefan
I've tried to quickly translate both of my manuals ( Creating an image / Restoring an image ) and uploaded them on this website:
How to create an image for an up-board:
https://www.scribd.com/document/343499153/Creating-an-Image-Up-Board
How to restore an image for an up-board:
https://www.scribd.com/document/343499210/Restoring-Image-Up-Board
I believe you can read the documents while you're on the website, so no need to download anything.
If it's against the rules to post links to files I apologize, I simply don't have the time to type all of this in a neat way on the forum, unfortunately I also have to work!
I hope these manuals can help you all, please let me know if it did!
Kind Regards,
Kamarasu
the output is :
error:no such partition
Entering rescue mode
Grub rescue
I recently got a damaged emmc in my upboard 2 and I was wondering if I could boot the cloned image from external disk
try to use Clonezilla?
Hi Kamarasu
Thanks for sharing these, could you kindly upload these to Google drive or somewhere free, Scribd seems to be the worst place to read this since they dont let you view files for long nor download these without paying them
Please email the documents to inbox at zubairahmed dot net
Hello everybody.
Please, could you share the guide in another place more readable? Scribd is limited...
Anoter question, I have only one user set to my board, let's call it myuser.
When I login I use:
And of course when I use su or sudo, I must type the password mypassword.
Why must I remove it before cloning? I am a little worried about that because I tried to modify the sudoers file using visudo but I closed myself out of the system all the times...
Thanks.
Silvano
Eng. Silvano Bertoldo, PhD
Actually nothing special is required.
If you properly use clonezilla, everything works without any problems!
No problem with password, root permissions etc.
_Clonezilla _makes just an image of your system and you can restore it in another system with the same characteristics and hardware.
I used it and succesfully make a clone and a restore of my system.
Silvano
Eng. Silvano Bertoldo, PhD