HOW-TO: Complete CloneZilla backup and recovery of your Linx/Lamina/Windows x86 tablet


#1

This guide will help you create a complete disk-image backup of your linx/lamina tablet.

Technically, it should work for any x86-based tablet with UEFI. It’ll also work for regular PCs though some parts will be obviously different.

Disclaimer + tip

This guide deals with data recovery on an image basis. If you accidentally recover from an image after making some changes that you wish to keep, your data will be lost - the system’s state including disk content will be returned to the time at which the backup was taken. Make sure you know you have nothing important on the device that you wish to recover an image to.

It is possible to interrupt the backup or recovery when inside clonezilla at any point by pressing CTRL+C multiple times or simply by force-shutdown by holding down the power button. Generally, clonezilla will prompt you if you want to rerun the whole process or if you just want to shut the system down. Please note that doing this during a recovery will leave your system in broken state where another - successful/uninterrupted recovery will be the only way to make the system work again

This backup is perhaps not suited for individual file recovery, but it’s perfect in case you want to experiment with your device (install linux or try some crazy stuff with your system that could make it unbootable or potentially cause severe data loss).

This way, you will be able to create a restore point where you will be able to go “back in time” to exactly how your device was at the moment of the restore point creation. Unlike windows’ own restore points, this method of backup is foolproof as it’s stored elsewhere than on the disk you will be experimenting with and doesn’t depend on windows being bootable - so accidentally overwriting your eMMC storage won’t affect you.

It is technically possible - and not that difficult - to do this using wifi + otg keyboard, therefore you can actually avoid the need for a usb hub; for now however, I will assume you have a usb hub and go with the easier (and faster) method.
It is actually also possible to use your microSD card for this, but I prefer something you can then also easily plug into a different computer and make a secondary copy of.

Things you will need:

  • your tablet, preferrably fully charged
  • usb hub
  • usb keyboard
  • 2 usb drives or 1 drive with two partitions. Note that depending on compression used, you may want to have a somewhat large usb drive. I recommend a 32GB+ as everything should fit on such drive. In case of using two, one of them can be very small (256MB+) and the other should be big enough for you to store a complete copy of your device onto, so around 16-32GB)

Stage A: Preparation

Note: I assume you want to create a backup of a working system, so whilst I’m going to say “on your PC” in several steps below, you are completely free to do this on the actual tablet with a usb hub plugged in.

  1. On your PC, go to the Clonezilla website and grab their latest iso from the “testing” branch. For the linx/lamina tablets (and I reckon for all of the bay trail tablets in general), you’ll want the i686-pae architecture, iso file. Leave the source set to auto, it doesn’t really matter. I guess some of their other images/versions might also work, but this is the one I’ve had the most success with.

http://clonezilla.org/downloads/download.php?branch=testing

  1. Once you have the iso, grab a copy of another useful tool - the “Universal USB Installer”. You can find it at the address below.
  1. Plug in the usb that you want to boot from and start the Universal USB Installer. If you’ve never used this program before, it will look like an installation - but don’t be worried. It’s not installing anything; the GUI just looks this way.

  2. After agreeing to the licensing, select “Clonezilla” in the first listbox. It’s somewhat far down the list, in section called “Other distros alphabetical”. Click “Browse” to select the image you’ve downloaded earlier, it should be something like clonezilla-live-2.4.6-3-i686-pae.iso . Afterwards, select the destination drive (the usb you inserted earlier). I also recommend checking the “format the drive” checkbox as you’ll rule out any possibility of bootloader being broken because of entries being stuck in the master boot record of the volume.

  3. Click Create and wait for Universal USB Installer to do its magic. When it finishes, close all of the dialogues and use “safely eject USB drive” to dismount the disk from your system. Obviously not necessary if you’re using usb hub on your tablet as you’ll be needing the drive right after reboot anyway.

  4. Plug in the second USB drive. You don’t necessarily have to format it, but make sure it has enough free space. I also recommend making sure it’s formatted as NTFS as that’s the most hassle-free way of making the backup. FAT32 will also work but you’ll have to specify a size splitting parameter to work around the 4GB filesize limit on FAT32 filesystems. TL;DR, NTFS is your best bet. ( There is some CPU overhead for linux implementation of NTFS, but it’s negligible.). Once it’s set up, unplug the “big” usb drive.

  5. If you were using a different to PC to make the bootable usb flash disk with clonezilla, plug in the usb into your tablet’s hub. Don’t plug in the “big” usb yet, but make sure that the keyboard is connected, and reboot / power on your tablet.

  6. Mash DEL or ESC to get into the boot menu. Navigate to the “Save & Exit” section using arrows and then navigate down the list to locate the UEFI: usb to make the tablet boot from your clonezilla usb. If you are having trouble (for example, the UEFI does not show your usb drive in the list), follow the “PHASE C” section from this thread, post #68 : Linx and Lamina 7/8/10" tablet owners thread - drivers included! , the commands are exactly the same, as the efi boot file is always located in the same place (because of the specification).

  7. Once you manage to bootstrap, you should see a screen similar to this one:

The offered resolutions may differ, but the 640x480 and 800x600 options should work just fine. Just press enter and wait for a while as the linux core loads.

  1. Once the clonezilla distro loads (takes about 60 seconds from most drives), it will ask you about language and keymap - personally, I just leave both as they are; “English” and “Don’t touch keymap”. After a few moments, you should be prompted with an option to “Start Clonezilla”. Confirm it.

  2. On the next screen, select the “device-image” mode.

  3. On the next screen, select “local_dev”. (Alternatively, you can use a samba server, if you want to use wifi or if you have a usb lan card, but I’m sticking with usb local device for this guide. There would be several extra steps but they’re all somewhat self explanatory). Once you select local_dev, Clonezilla will prompt you to plug in your device.

  1. As per the text, before confirming, plug in the “big usb” (the one where you plan to store the copied backup). If it’s a regular usb flash disk, give it several seconds and then confirm that you have plugged in the local device. If it’s something more heavy-weight like a usb harddisk, give it some time to spin up before confirming that you have plugged the device in. Clonezilla will then rule out “busy” devices and present you with a list of partitions on various devices that you can use. (Note, sometimes clonezilla will instead present you with an entirely black window where you can see the currently available devices - the list updates every 3 seconds. Press CTRL+C on the keyboard to close this list and continue with the procedure). You should be able to easily spot the “big” usb - by the offered partition size. Highlight the proper option and confirm it. It will generally be at the very bottom of the list.

  2. On the next screen, select the directory you want to use for clonezilla backups. In general, you can just press enter and leave it in the “Top level directory” AKA the root. Clonezilla will then list the currently attached filesystems, just press enter to go to the next screen.

  3. On the next screen, select the “Expert” mode.

Stage B: Backup

  1. On the following screen, select “savedisk”.

  2. You will be prompted with a possibility to rename the output folder. You can leave it as-is but I recommend giving it a name that you’ll immediately know what it means. For example, something like “prior-to-crazy-linux-experiments”. Avoid using spaces or weird symbols - instead make use of dashes and/or underscores.

  3. Highlight the internal storage of the tablet. It usually has some weird name like “mmcblk0” (mmc block device 0). Make sure only this one is highlighted - you can see the highlight by the star in the square brackets. To toggle your selection, use the spacebar, so that you end with just the mmcblk0 device highlighted before pressing enter.

  4. On the next screen, leave the priority as-is.

  5. On the next screen, leave the options as they are. Optionally, you can opt to toggle-enable the removal of page/hibernation file, but remember that these are important to w8/10 due to “fast boot” - hibernation file is being used for storage of pre-loaded binaries that are used to speed up the boot process. I recommend leaving it off.

  6. On the next screen, select your compression. Mostly, z1p (fast, decent) and z5p (slow, but much better compression) are good. If you want to make your backup as fast as possible and have enough free space, select z0 (no compression).

  7. On the next screen,

  • enter “100000” if your “big” usb drive uses NTFS. Othervise
  • leave the value as-is ( “4096” ), if your “big” usb drive uses FAT32.
  1. On the next screen, select “skip checking/repairing the source file system”

  2. On the next screen, select “No, skip checking the saved image.”. Optionally select checking the saved image - but keep in mind that this will increase the time it takes to perform this activity - all the while your tablet is running from battery and generally using a lot of the CPU.

  3. On the next screen, select “Not to encrypt the image”. Optionally select whichever option you like, depending upon whether or not you have an sensitive data on the device. Encryption will add an additional set of steps related to the password, but it’s very self-explanatory and I will not delve into it here.

  4. On the last screen, select “Do nothing when the clone finishes”. Optionally select whichever option you like.

  5. after pressing enter, clonezilla will ask you a few more times if you are sure you want to proceed. type “y” and confirm.

— wait for clonezilla to finish its magic, and then power off or restart your device depending upon the option you selected in step 20

Yay! Backup done! You should now have a folder on your “big USB” drive. I recommend making another copy of this folder to a safe location, just in case.

Stage C: Recovery

This guide will help you recover your device from a backup. The guide assumes you took the backup as per the instructions in the first part of this post.

Initially, carry out the “Stage A: Preparation” part of this guide, as they are the same regardless of whether you’re restoring or creating a backup. Obviously, you can skip the steps that you’ve already done, so for example don’t reformat your usb drive if you have the backup on it. Once you finish with the preparation stage and get to the “main” clonezilla menu, you should be prompted with a set of options.

  1. Select “restoredisk”

  2. On the next screen, select the image you wish to use for the restoration. If you have pointed clonezilla to the right device and directory, it should already show you a list of valid images for restoration. If you only have one, simply press enter.

  3. On the next screen, select the target device - the one you want to restore the image to, so for the tablets this will be the internal storage. It should probably be the only option on the list, but if not, it will again have that strange name, mmcblk0 (or similar).

  4. On the next screen, you can actually leave all of the options as they are. Optionally, untoggle options -g auto , -c and -r . Since leaving them on doesn’t harm anything, I recommend simply leaving everything as-is. Once you’ve made your choices, press enter.

  5. On the next screen, select “Use the partition table from the image”.

  6. On the next screen, select “No, skip checking the image before restoring”. Optionally - if you want to be sure - leave this option set to yes and proceed.

  7. On the next screen, select “-p poweroff”. Optionally select whichever option you like.

  8. Press enter to confirm the helpful message from Clonezilla about how you can run this command from the commandline next time.

  9. Clonezilla will ask several times if you are really sure you want to overwrite your tablet. If you are sure you set everything properly, press y and confirm.

  10. The restoration process will begin. It will take some time. Don’t be alarmed even if you see some red lines saying that some EFI changes have failed, this is normal and as far as I can tell it doesn’t affect the restore in any way.

  11. If you’ve selected poweroff option in one of the choices before, the tablet should power off when the procedure is done.

  12. Unplug all the flash drives and boot! Everything is now the way it was when you created the backup.

If you have any questions, let me know and I’ll try to update or fix up this guide, but it should be pretty complete. Phew! :slight_smile:


Linx and Lamina 7/8/10" tablet owners thread - drivers included!
#2

Couple of additions:

  • This guide is for the x86/Intel based tablets with file systems compatible with CloneZilla. (Guide title should be slightly modified)
  • for .ISO -> USB writing on the Windows platform I recommend Rufus. A very efficient open source tool for .ISO to USB dumping.

#3

Ah, good point about the platform. I haven’t realized that this was a place for other than just linx/lamina tablets so I sort of neglected to point that out. Added a note + changed the title.

I haven’t used rufus as much, seems like a matter of preference - but an open source tool is always nice.


#4

Yeah, writing an .ISO file to USB should be a trivial task and it should not make much of a difference what tool you use. Rufus however claims to be faster than competition and I know from personal experience that it is more reliable than UNetBootin.

Oh, and Rufus is fast. For instance it’s about twice as fast as UNetbootin, Universal USB Installer or Windows 7 USB download tool, on the creation of a Windows 7 USB installation drive from an ISO. It is also marginally faster on the creation of Linux bootable USB from ISOs.

And what comes to the content of this forum - everything technology related that tickles the brain is allowed. Linx topics just happen to be one of the most popular ones currently. In the mid-term future I will be splitting this forum into a few sub-categories, as now we have everything under generic discussion.


#5

I used Rufus mainly when making a bootable usb WinXP installer. None of the other tools would let me do this, so rufus certainly does things well. As for the speed, I’d imagine it’s true, but at the same time the clonezilla distro is like ~150 megabytes, so it takes a couple of seconds anyway.

And I see! I read through the history of the site as it seemed odd to me that a site called “cd-rw” would have things about tablets on it, but after finishing that topic, it kind of makes sense. It’s about cool tech things (which cd-rws were back in their hayday :smiley: )


#6

Dear Vulpix
Some problems:
I have a USB-harddisk with 250 GB. I made 3 Partitions F: (containing backup files) size 140Gb, Partition G:300 Mb with Clonezilla installed there with the Universal USB installer as proposed:
And last Partition drive H: with 32Gb all formated NTFS.
1´st and 2`nd attempt: Only the empty filenames were on the disk on drive H.
3’rd: altered the Blocksize value as described in the Clonezilla Helptext to 1.000.000 same result.
4’th attempt: Increased Drive H from 32 to 64 Gb and used Blocksize 100.000 And now I succeeded :slight_smile: Here is a clip of the result:


The Fist Directory Lamina7W81 contains exactly the same filenames as the second Lamina7W8-1
but they are all empty, So obviously the Size of the partition was to small! Checking it with the diskmanager it says:

that 81% in drive H is free!!
I had the same problem with mounting the Clonezilla. First attemp 100Mb Partition was to small. Second attempt with 200 Mb allocation - same result. Third attempt with 300 Mb allocation was succesfull.
I don’t get it. You see on the list that 33% is free. Any explanation?
I guess I could shrink them back to the sizes proposed but will await any comment from you or Admin - I don’t understand why I need 3 times the space as needed.
If we disregard the recommended Disksizes for the USB-harddrives all the rest of the instructions are flawless - couldn’t be better. So in order to keep things simple i suggest that if my findings are korrekt please alter the description and dump this reply.
Very kind regards
LarsN


#7

Quite strange with the empty folders. Could you post the clonezilla log from the empty folders ?


#8

Do You really want me to post it here?:

Starting /usr/sbin/ocs-sr at 2016-03-30 13:59:01 UTC…
*****************************************************.
Clonezilla image dir: /home/partimag
Shutting down the Logical Volume Manager
Finished Shutting down the Logical Volume Manager
The selected devices: mmcblk0
PS. Next time you can run this command directly:
/usr/sbin/ocs-sr -q2 -c -j2 -z0 -i 1000000 -scs -p true savedisk 2016-03-30-13-imgLamina7W81 mmcblk0
*****************************************************.
The selected devices: mmcblk0
Searching for data partition(s)…
Searching for swap partition(s)…
The data partition to be saved: mmcblk0p1 mmcblk0p2 mmcblk0p3 mmcblk0p4
The selected devices: mmcblk0p1 mmcblk0p2 mmcblk0p3 mmcblk0p4
The following step is to save the hard disk/partition(s) on this machine as an image:
*****************************************************.
Machine: T701BR.SE
mmcblk0 (15.6GB_Unknown_model_0xf31deccc)
mmcblk0p1 (100M_vfat_0x41:_Dirty__0xf31deccc)
mmcblk0p2 (128M_Microsoft_0xf31deccc)
mmcblk0p3 (9.9G_ntfs_Windows_0xf31deccc)
mmcblk0p4 (4.5G_ntfs_Images_0xf31deccc)
*****************************************************.
-> “/home/partimag/2016-03-30-13-imgLamina7W81”.
Shutting down the Logical Volume Manager
Finished Shutting down the Logical Volume Manager
Saving block devices info in /home/partimag/2016-03-30-13-imgLamina7W81/blkdev.list…
Saving block devices attributes in /home/partimag/2016-03-30-13-imgLamina7W81/blkid.list…
Checking the integrity of partition table in the disk /dev/mmcblk0…
Reading the partition table for /dev/mmcblk0…RETVAL=0
*****************************************************.
Saving the primary GPT of mmcblk0 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0-gpt-1st by dd…
34+0 records in
34+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.0147127 s, 1.2 MB/s
*****************************************************.
Saving the secondary GPT of mmcblk0 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0-gpt-2nd by dd…
32+0 records in
32+0 records out
16384 bytes (16 kB, 16 KiB) copied, 0.0180039 s, 910 kB/s
*****************************************************.
Saving the GPT of mmcblk0 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0-gpt.gdisk by gdisk…
The operation has completed successfully.
*****************************************************.
Saving the MBR data for mmcblk0…
1+0 records in
1+0 records out
512 bytes copied, 0.00678901 s, 75.4 kB/s
Starting saving /dev/mmcblk0p1 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p1.XXX…
/dev/mmcblk0p1 filesystem: vfat.
*****************************************************.
*****************************************************.
Use partclone with cat to save the image.
Image file will be split with size limit 1000000 MB.
*****************************************************.
If this action fails or hangs, check:

  • Is the disk full ?
    *****************************************************.
    Run partclone: partclone.vfat -z 10485760 -N -L /var/log/partclone.log -c -s /dev/mmcblk0p1 --output - | cat | split -a 2 -b 1000000MB - /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p1.vfat-ptcl-img.uncomp. 2> /tmp/split_error.TTcaLs
    *****************************************************.
    Failed to save partition /dev/mmcblk0p1.
    Starting saving /dev/mmcblk0p2 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p2.XXX…
    /dev/mmcblk0p2 filesystem: Microsoft.
    *****************************************************.
    This file system is not supported by smart programs, e.g. partclone, partimage or ntfsclone, or you force to use dd to save the file system: Microsoft
    dd will save and restore all the blocks in the harddrive, no matter if the block is used or not.
    Use this method to save the image instead of partclone, partimage or ntfsclone: partclone.dd + cat
    Image file will be split with size limit 1000000 MB.
    If this action fails or hangs after several minutes, check:
  • Is the disk full ?
    *****************************************************.
    Run partclone: partclone.dd -z 10485760 -N -L /var/log/partclone.log -s /dev/mmcblk0p2 --output - | cat | split -a 2 -b 1000000MB - /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p2.dd-img. 2> /tmp/split_error.jQtInq
    *****************************************************.
    Finished saving /dev/mmcblk0p2 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p2.dd-img
    *****************************************************.
    Failed to save partition /dev/mmcblk0p2.
    Starting saving /dev/mmcblk0p3 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p3.XXX…
    /dev/mmcblk0p3 filesystem: ntfs.
    *****************************************************.
    *****************************************************.
    Use partclone with cat to save the image.
    Image file will be split with size limit 1000000 MB.
    *****************************************************.
    If this action fails or hangs, check:
  • Is the disk full ?
    *****************************************************.
    Run partclone: partclone.ntfs -z 10485760 -N -L /var/log/partclone.log -c -s /dev/mmcblk0p3 --output - | cat | split -a 2 -b 1000000MB - /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p3.ntfs-ptcl-img.uncomp. 2> /tmp/split_error.yms1Hu
    *****************************************************.
    Failed to save partition /dev/mmcblk0p3.
    Starting saving /dev/mmcblk0p4 as /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p4.XXX…
    /dev/mmcblk0p4 filesystem: ntfs.
    *****************************************************.
    *****************************************************.
    Use partclone with cat to save the image.
    Image file will be split with size limit 1000000 MB.
    *****************************************************.
    If this action fails or hangs, check:
  • Is the disk full ?
    *****************************************************.
    Run partclone: partclone.ntfs -z 10485760 -N -L /var/log/partclone.log -c -s /dev/mmcblk0p4 --output - | cat | split -a 2 -b 1000000MB - /home/partimag/2016-03-30-13-imgLamina7W81/mmcblk0p4.ntfs-ptcl-img.uncomp. 2> /tmp/split_error.Awpotq
    *****************************************************.
    Failed to save partition /dev/mmcblk0p4.

And the size of the Folder:

Kind regards
LarsN


#9

Looks like some clonezilla silliness, no idea why this happened :o well good thing that it eventually started working for you. I mean it failed to save even 100MB partition, which is clearly impossible :smiley: