Hi, i'm using Clonezilla since 2016 and i have no issue at all. I did hundreds of clones, so i really know what i'm doing :) This preamble just to say that i'm not a newbie of Clonezilla, so this issue is really blows my mind!
Let's talk about this issue: i've got a simply Atom N2600 with Debian 10 on EXT4 (MBR), and i want to backup it and restore it. It's sound simple.
So, i run Clonezilla, i save the disk with verify and everything works fine.
Reboot, try to restore the same image with verify (i save it locally on a USB Pen) , everything works fine.
But when i try to boot in the restored system, i have a lot of segmentation fault (XOrg doesn't start at all, for example) and the system hangs.
I've tried several times this whole procedure, changing the USB key, changing the clonezilla version (i've tried 2.6.4, 2.6.0, 2.5.4), i've tried using only dd, i've tried failsafe mode, EVERYTHING, but i have always the same issue with this system.
So i think it's a hardware related issue (the system works good if i don't restore the image).
I've attached some useful file from my clonezilla backup, i hope that could point you somewhere.
If you need other infos, please ask me.
Yes, I believe it's hardware issue. Did you run a memtest check? Or make sure the CPU fan is working well, etc...
Besides, you can also try a similar test on different machine, maybe that helps to clarify this issue.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Steven, thanks for your answer. Memory test works well; there is no fan in this system because is an Intel Atom fanless.
I saw the same issue on other PC with the same CPU + motherboard.
Other PC with different CPU works well.
I can't understand where this issue came from. Do you have any suggestion? Maybe something in some log files...I think the issue is in the backup process, not in the restore, because if i try to restore the image on a VM on my PC the corruption issue is visible there too. (same Xorg corruption).
The system itself runs well, so i can't understand why only clonezilla has some problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually I have no idea, but I still believe it's related to hardware.
Maybe your CPU or motherboard is too hot due to the design issue? Since when compressing, the system loading is higher than decompressing.
Or try to enter expert mode, choose different compression, like -z8* or -z9*.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i've tried with standard option and no compression, and only with dd and no compression: the result is the same :(
i tried even building the md5 (so if it was a CPU issue, this should be broken too) but the md5 was ok!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it normal the multithread SMP on Memtest doens't work? It doesn't start at all! (i press F2 and it stops there, the counter remains to 0 forever).
This CPU has 2 core with hyperthreading
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, maybe it is. However, since the different hardware works, and it works here. I have no idea how to fix it...
Maybe you try the i686-pae or i686 version of Clonezilla live.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
other test: from the clonezilla live, i've mounted the partition, compressed in tar.gz the partition on a usb, formatted with mkfs.ext4 the partition and uncompressed the tar.gz again back. Everything worked as expected.
In this way i guess i've tested cpu, ram, SSD and USB. So what does clonezilla different from these steps?
Now i would try to do a dd by hand, in order to verify if it will work or not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for sharing this. I also got the contribution on gitlab: https://gitlab.com/stevenshiau/clonezilla/merge_requests/42
However, instead of adding the option "-nobs" I believe it's better to give a variable in /etc/drbl/drbl-ocs.conf about the buffer size. E.g.,
partclone_dd_bs=512
and user can edit that so that the size can be more flexible.
I will do that in the later version of Clonezilla. Thanks.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My bad, the buffer size should be at least >= 1024 bytes.
In the next release (Clonezilla live >= 2.6.5-8) we will have a variable "partclone_dd_bs" in /etc/drbl/drbl-ocs.conf. You can change it before running Clonezilla.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know how much notice dd takes of the blocksize, but modern HD's have a physical sector size of 4096 bytes (even when they have a "logical" sector size of 512 bytes).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Steve, unfortunately i have bad news.
I've tried the newest clonezilla (testing 2.6.5-8): i booted it, and before starting clonezilla i've changed the "partclone_dd_bs" parameter to "512".
So i've started the backup with "advanced" anche choosing "only dd" option.
Unfortunately, when i try to restore this image i have the same error as before. So i think that partclone.dd is not the same as dd.
How could we move now?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i'm using Clonezilla since 2016 and i have no issue at all. I did hundreds of clones, so i really know what i'm doing :) This preamble just to say that i'm not a newbie of Clonezilla, so this issue is really blows my mind!
Let's talk about this issue: i've got a simply Atom N2600 with Debian 10 on EXT4 (MBR), and i want to backup it and restore it. It's sound simple.
So, i run Clonezilla, i save the disk with verify and everything works fine.
Reboot, try to restore the same image with verify (i save it locally on a USB Pen) , everything works fine.
But when i try to boot in the restored system, i have a lot of segmentation fault (XOrg doesn't start at all, for example) and the system hangs.
I've tried several times this whole procedure, changing the USB key, changing the clonezilla version (i've tried 2.6.4, 2.6.0, 2.5.4), i've tried using only dd, i've tried failsafe mode, EVERYTHING, but i have always the same issue with this system.
So i think it's a hardware related issue (the system works good if i don't restore the image).
I've attached some useful file from my clonezilla backup, i hope that could point you somewhere.
If you need other infos, please ask me.
Thanks in advance
Roberto
Yes, I believe it's hardware issue. Did you run a memtest check? Or make sure the CPU fan is working well, etc...
Besides, you can also try a similar test on different machine, maybe that helps to clarify this issue.
Steven
Hi Steven, thanks for your answer. Memory test works well; there is no fan in this system because is an Intel Atom fanless.
I saw the same issue on other PC with the same CPU + motherboard.
Other PC with different CPU works well.
I can't understand where this issue came from. Do you have any suggestion? Maybe something in some log files...I think the issue is in the backup process, not in the restore, because if i try to restore the image on a VM on my PC the corruption issue is visible there too. (same Xorg corruption).
The system itself runs well, so i can't understand why only clonezilla has some problems.
I've tried also to backup via SMB instead of using USB, but the issue still remains.
Actually I have no idea, but I still believe it's related to hardware.
Maybe your CPU or motherboard is too hot due to the design issue? Since when compressing, the system loading is higher than decompressing.
Or try to enter expert mode, choose different compression, like -z8* or -z9*.
Steven
i've tried with standard option and no compression, and only with dd and no compression: the result is the same :(
i tried even building the md5 (so if it was a CPU issue, this should be broken too) but the md5 was ok!
Is it normal the multithread SMP on Memtest doens't work? It doesn't start at all! (i press F2 and it stops there, the counter remains to 0 forever).
This CPU has 2 core with hyperthreading
the same hardware, using norton ghost, works fine. Backup and restore done. So it's definetely something on Clonezilla.
Well, maybe it is. However, since the different hardware works, and it works here. I have no idea how to fix it...
Maybe you try the i686-pae or i686 version of Clonezilla live.
Steven
i've tried also i686-pae and i686 and the issue is still the same.
I've tried to mount the image as you said here ( https://drbl.org/faq/fine-print.php?path=./2_System/43_read_ntfsimg_content.faq#43_read_ntfsimg_content.faq ) and the files are already corrupted, so i absolutely sure that the issue is in the backup side.
Do you think that run a backup via rsync could say something? If rsync will work and clonezilla doesn't, is this info will point you somewhere?
Which other tests should i do?
Thanks
other test: from the clonezilla live, i've mounted the partition, compressed in tar.gz the partition on a usb, formatted with mkfs.ext4 the partition and uncompressed the tar.gz again back. Everything worked as expected.
In this way i guess i've tested cpu, ram, SSD and USB. So what does clonezilla different from these steps?
Now i would try to do a dd by hand, in order to verify if it will work or not.
i've also tried to clone only the partition and the issue still remains
Ok, even plain dd fails
dd if=/dev/sda1 status=progress bs=2M | gzip -c > /home/partimage/image.gz
gunzip -c /home/partimage/image.gz | dd of=/dev/sda1 status=progress
recreate the issue, so i think is a dd issue. Any idea to how can i try to understand it?
Last edit: Cagnulein 2019-12-19
Finally i've got a solution! using the same commands as before, without the bs options does the trick!
So i did for the backup:
dd if=/dev/sda1 status=progress | gzip -c > /home/partimage/image.gz
and for the restore:
gunzip -c /home/partimage/image.gz | dd of=/dev/sda1 status=progress
Now i have to check if there is some options to force clonezilla to run dd without bs
Hi Steven, i think you have to put an option to choose the bs parameter
I saw that now it's hardcoded to 1M here https://github.com/stevenshiau/clonezilla/blob/d9fded340ae7a569ec67bb68a9f588583e7f9a53/sbin/ocs-onthefly#L1187
Last edit: Cagnulein 2019-12-19
Thank you for sharing this. I also got the contribution on gitlab:
https://gitlab.com/stevenshiau/clonezilla/merge_requests/42
However, instead of adding the option "-nobs" I believe it's better to give a variable in /etc/drbl/drbl-ocs.conf about the buffer size. E.g.,
partclone_dd_bs=512
and user can edit that so that the size can be more flexible.
I will do that in the later version of Clonezilla. Thanks.
Steven
BTW, could you please verify that when running partclone.dd, using
--buffer-size 0
works for you?
Steven
My bad, the buffer size should be at least >= 1024 bytes.
In the next release (Clonezilla live >= 2.6.5-8) we will have a variable "partclone_dd_bs" in /etc/drbl/drbl-ocs.conf. You can change it before running Clonezilla.
Steven
I don't know how much notice dd takes of the blocksize, but modern HD's have a physical sector size of 4096 bytes (even when they have a "logical" sector size of 512 bytes).
Sure, larger buffer size normally works better for the modern storage.
Steven
Thanks, i will try on 7th Jan.
Hi Steve, unfortunately i have bad news.
I've tried the newest clonezilla (testing 2.6.5-8): i booted it, and before starting clonezilla i've changed the "partclone_dd_bs" parameter to "512".
So i've started the backup with "advanced" anche choosing "only dd" option.
Unfortunately, when i try to restore this image i have the same error as before. So i think that partclone.dd is not the same as dd.
How could we move now?
Thanks
Hi Steven, do you have other ideas?
According to the dd man page , the numbers seem to a bit misleading for bs.
It appears to suggest that 512 or 512c means 512 bytes, whilst 512b means 512 x 512 bytes!
Perhaps CZ is inserting a suffix?
no it seems fine to me https://gitlab.com/stevenshiau/clonezilla/commit/383051d723fa0763515e04067d1d6154d0a75548