aaronc
Posts: 3
Joined: Wed Aug 08, 2018 12:16 pm

Raspberry Pi Clonezilla Image Failure

Wed Aug 08, 2018 12:27 pm

I asked this over on the Clonezilla forums but they aren't as active as here. At work, I was trying to determine whether Clonezilla is a good solution for replicating our CentOS production servers but I wanted a harmless test subject first. So I choose a Raspberry Pi SD Card. My method was to use Etcher to make the Raspbian Bootable MicroSD card. I then tested it out on the Pi, set up some simple configurations and then went to back it up with Clonezilla.

I did a full disk backup to another external 1TB HDD formatted as a single ext4 partition. Everything went great. I choose the option to let me choose what to do at the end and then selected shutdown, so everything should have been ejected properly.

Then I stuck in a brand new MicroSD Card to restore my image to that. Same brand and size (Samsung 16GB) . It failed once with a bug where the time kept increasing as my write speeds continuously dropped. I made sure to use the 'verify recoverable' and 'resize to fit disk' option and to check SHA1 sums. The second attempt claimed a success.

However, for some reason both microSD cards no longer boot. Upon inspecting them, they appear fine. I mounted both the /boot and / partitions to my Linux Machine and everything looks fine. I first used `lsblk` and `blkid` to verify the UUIDS in /etc/fstab were fine, so I don't think that's the issue. I ran 'fsck -y' to see if anything was there and it detected that the dirty bit was set and removed that. I attempted to boot both again after than and nothing changed.

I'll continue investigating tomorrow morning, but would anyone have insight into why this might be? Any tips on files to look at that might stop it from being bootable? I'll be honest in saying it doesn't give me confidence in performing this on a production server when it could just make my current HDD/configuration unbootable (we do have backups of all files though, it'll just take me a while).

Thanks beforehand.

pcmanbob
Posts: 6968
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspberry Pi Clonezilla Image Failure

Wed Aug 08, 2018 6:43 pm

I've used clonezilla on several occasions on HD's containing both windows and linux operating systems with great success even once on an HD that was failing, I was able to copy 99% of the drive.

I have always used it to copy from on HD to another HD just mirroring the source to the destination drive, never had any problems with the source drive being corrupted by clonezilla.

May be clonezilla just does not do SD cards, I must admit I have never tried using clonezilla to clone and SD card.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
HawaiianPi
Posts: 4634
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Raspberry Pi Clonezilla Image Failure

Wed Aug 08, 2018 7:30 pm

I ran into this awhile ago, and I seem to recall I even figured out why it wasn't working, but I don't remember the specifics at the moment. I tried working it out with the Clonezilla devs, but didn't get much cooperation.

Although I can't imagine why your first micro SD card is failing, since a backup operation should only read from it (and I never encountered problems with the source card).

On more mainstream x86 systems I have used Clonezilla for many years with great success, so the results with Raspbian micro SD cards was as surprising as it was disappointing.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

aaronc
Posts: 3
Joined: Wed Aug 08, 2018 12:16 pm

Re: Raspberry Pi Clonezilla Image Failure

Wed Aug 08, 2018 7:39 pm

I managed to get this resolved actually. It very well could have been my goof. I reflashed a new SD with etcher, did some quick configs so I could see them get picked up on my image, did disk to image, then image to disk again. It worked fine.

So I’m assuming I somehow did remove the microSD early last time and set the dirty bit then the duplication didn’t find it and nuked both. Lame.

Also kinda funny. I have two SD cards. One was from micro center and labeled as 16GB but it was in fact 15.5GB. So it complained that my image from the Samsung SD card (15.9GB) was too large for the target. So I ended up zeroing out the Samsung with dd and restoring from image to test that it worked. So if you are going to do it this way, I would recommend using the same brand or verifying how many blocks the disk has beforehand. Or just burn the smaller one first since Clonezilla can resize the partition. I hilariously didn’t notice this the first time because I went from the 15.5GB to the 15.9GB Samsung.

DirkS
Posts: 9947
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspberry Pi Clonezilla Image Failure

Wed Aug 08, 2018 7:45 pm

aaronc wrote:
Wed Aug 08, 2018 7:39 pm
I would recommend using the same brand or verifying how many blocks the disk has beforehand.
Problem is that even cards from the same batch can have a different size...

Return to “Troubleshooting”