CloneZilla advice needed please

I hate asking what are often dumb questions to knowledgeable people in here. I hate AI, I distrust AI, but I am aware that it’s faster than Googling (and is basically no different, just faster).

I want a bootable clone of my machine. I use PIka, but I want something bootabnle and also a full clone of all settings, files, apps, everything. I loved Carbon Copy Cloner on Mac and relied on it for years for this purpose. So I asked AI to help me set something similar up.

It went well to start with, it explained Clonezilla andhelped me set it up.

I managed to take a full clone using Live USB and external HDD.

It completed, apparently properly.

BUT now i want to TEST BOOT from it to really see with my own eyes that it actually worked, and is a full clone of my internal SSD. I auto distrust AI, so I am happy to follow it up to a point, but always verify what it said would happen, did happen.

I tried to boot from the drive on an old Dell M series. Failed. ChatGPT said it’s ‘because the clone wants the same hardware’. So I tried to boot from it on my real machine (the one I cloned) which is a Dell Latitude D5420 running Fedora 42 WS.

That failed with errors which, after asking GPT, are caused by Dell going into emergency mode due to two Identical bootable devices being attached. So GPT said I have to either pull my SSD out or disable it in BIOS. I did the latter, disabled internal SSD.

Tried again - SAME THING! Emergency Mode. this time GPT said ‘Oh that’s because your external drive has a different UUID/hardware path’…. bla bla. It’s spouting total trash at this point! Now telling me to disable the internal drive again, already did that! I think AI refuses to say ‘I haven’t a clue’, so it makes up answers even if it isn’t sure they will work. But I do NOT want this to become a conversation about AI, I hate it, wish I could wipe it from the earth, but I can’t.

So, I have an ‘apparently’ successful CloneZilla clone of my internal SSD which is encrypted. But I want to boot from it to SEE that it is really a clone of my machine. At this point I don’t think that’s even possible, but I thought I’d open this thread in case anyone knows better!

(GPT basically said I should blindly trust it now as ‘When you actually need to restore from it, booted from LiveUSB (CZ), it WILL work’. That may well be true, but I am not trusting that, at least not unless real humans in here suggest I should! :slight_smile: )

Any advice appreciated. Thanks

Do you mean that Fedora started booting and you ended up in Linux emergency mode?

Or that the BIOS wouldn’t even let you start booting from the external drive?

Sorry, the second one.

Right, this is like the situation I had when I replaced my laptop’s SATA SSD with an NVMe SSD. I cloned everything across, but booting took me into emergency mode, and I had to regenerate the initramfs (sudo dracut regenerate --all -f) to boot successfully.

Others will know more about the details, but it seems that the initramfs is specific to your machine’s hardware, and swapping one drive for another which has identical content but connects by a different interface (NVMe / SATA / USB) will invalidate the initramfs.

If you want a process where Clonezilla gives you a system that’s bootable on replacing the drive, I think (but haven’t tested) that the following would work:

  • Instead of an off-the-shelf USB drive, use a USB enclosure with the same type of drive you have internally (so probably NVMe). Clone the internal drive to that drive in the enclosure.
  • Then if you physically replace the current drive with the one you had in the enclosure, it “should” boot.

Thanks. I am really not very technical so much of this (your thread for example) is very hard for me to understand. This is one of those ‘I wish I was still on a Mac’ things! I do NOT wish that, but at times like these I do, as stuff is designed for people without terminal/code knowledge.

Also I am not sure you understand fully what I am looking to achieve, I will explain a bit better…

I use Pika for data backups. I wanted a full clone for several reasons, mainly just so if I lost my machine, I could buy a new one, run CZ on live usb (stored with the clone backup drive), hook up the backup drive and ‘CLONE’. Hey presto, identical machine, all extensions, settings etc, exactly as before.

The thing is, I want to TEST that it is indeed bootable and cloned properly. Not by replacing the internal drive, without doing that.

I have tried three Dell machines, booting from this clone HDD, it fails every time. GPT told me it’s because they are different hardware, and said it will only boot from this machine I cloned it from. So I tried that, but that still doesn’t work for reasons you clearly understand a lot better than me!

I am now not even convinced I could recover from it if, say, my internal SSD burned up and I replaced it. Obviously if it’s all good, it should work when booted from CZ live usb, but no way to know if the clone worked properly without booting from it and checking through my files etc!

I understand that, but without some additional steps, it won’t work.

Your internal drive (I’m assuming it’s NVMe) has an installation of Fedora, which is bootable from an NVMe drive, but only from an NVMe drive. The reason is that booting depends on the ‘initramfs’ in your boot partition, and by default that contains just the drivers it needs to boot on the hardware it was made on.

You’ve done a perfect bit-by-bit clone of that drive to a USB drive. So what you have now is a USB drive, containing an installation of Fedora which is bootable from an NVMe drive and only from an NVMe drive. That won’t boot successfully.

There should be a way around this - by modifying the initramfs to contain the necessary drivers to support a USB drive - but someone with more knowledge of the dracut tool would need to help with that.

With the clone as you have it now, it should be possible to recover, but not completely painlessly. You would have to boot into emergency mode and run some terminal commands to rebuild the initramfs.

Maybe configure dracut to add in more disk drivers?

thanks.

“You’ve done a perfect bit-by-bit clone of that drive to a USB drive” - Yes, but just to make sure we are on the same page, not USB stick, a Toshiba USB HDD. I am sure you know that but just in case!

I have a clonezilla USB stick, live boot, to perform the backup.

Which leads me to another point…

I wonder if it may actually be painlessly, because as far as I am aware, to actually restore the clone to the internal, wouldn’t require any booting from the clone HDD. It would require booting from Clonezilla live USB, which then performs the restore by copying byte-for-byte the data from the external HDD to the internal SSD. That’s my understanding thus far anyway!

Oh, and yes it’s an NVMe internal SSD.

My understanding (from ChatGPT) was that it isn’t about ‘drivers’, it is apparently about the security/firmware/BIOS on the Dell 5420 which ‘refuses’ to boot from any other device than the internal NVMe SSD. That may be wrong, but just saying, so you can correct me if that’s wrong!

Yes, got it - I assumed not a stick, but wasn’t sure if it was HDD or SSD (not that it makes a difference here) so avoided using a more specific term.

Sorry, yes I see. That indeed should just work, but obviously is a hassle to test without getting a “spare” SSD and testing out the recovery.

That would prevent you getting even as far as emergency mode. Some BIOSes do have “security” features like that, but it doesn’t seem to be what’s going on here.

1 Like

Folks,
If this is a true “binary Image” of the original drive’s data … then the UUID of the backup dirve’s partitions will be the same as the original drive … you are going to have a real time of it if you try to boot and use the drive while the original is still in the machine …
In this case you are going to need to do a couple of things before the backup is usable:

  1. either remove the original drive OR regenerate the UUID for each partition on the backup drive
  2. IF you regenerated and relabled the backup/replacement dirve, you are going to need to fix /etc/fstab
  3. and to finish things off, you will need to regenerate the boot block of the replacement disk (easily done via dracut)

Also, the drives do NOT have to match the original as long as the replacement drive is large enough to hold the data from the original. The important things are that the partition mapping matches the new drive (UUID for /boot on the new drive matches the new drive’s /etc/fstab for the /boot partition for example) and that BIOS is set according to the boot method of the original (If is was UEFI then it must remain UEFI for eaxmple). The replacement drive does not have to match the technology of the original drive (can sub an SSD for an NVME, can sub an HDD for and SSD … an so on)

That’s out of my knowledge scope sadly.
All I know is I was told (not necessarily correctly although I thought so) that CloneZilla can replicate Carbon Copy Cloner which I used for a decade or more on Mac. To produce a ‘Bootable like for like clone of my internal drive’.

It now seems I ‘probably’ have that perfect clone, but it’s not bootable to actually check. Which is a bit worrisome. Shame :frowning:
I guess I’ll just carry on using CloneZilla to redo the clone once a month (as originally intended) and ‘hope’ that when/if it’s ever needed, it will ‘work’ using CZ on live USB to clone the backup to a new internal drive.
Thanks

1 Like

There is also the option of buying an NVMe and an appropriate enclosure with USB connection, and clone the internal disk to the external NVMe. The verification would then involve swapping the internal (old) drive with the new one.

I’m not sure the purchase is well worth it though.

Thanks Mike.

I think I agree. When you say you’re not sure it’s well worth it, do you mean because you’d expect it to work so the verification is fairly unimportant for the cost/hassle? (Cost and hassle is a significant issue for me.)

Considering the fact this isn’t my only backup I have the same view now. I would really like to verify and just see this ‘bootable backup’ (I was promised) working! But that’s more my OCD!

The fact is, I take Pika backups regularly, so I have data backed up well. This CZ clone was a way to ensure I have a really nice easy way to get EVERYTHING installed again, if I had a disaster. I have tons of keyboard combos, extensions and little tweaks I made (such as in Gnome Tweaks!), and remembering what they all were will be impossible.

But having all the data is the main thing, worst case in a disaster situation, I’d have to restore all my data to a new Fedora installation, and spend quite a few hours learning how to make my weird keyboard do what I want, etc! Not the end of the world, just a headache. And of course it will probably work anyway, to clone back my entire set up.

I will carry on my routine of running regular Pika backups,with a CZ clone maybe once a month.

I meant it might not be worth it to purchase another NVMe media, given that you already back up your home folder. I did full-disk image copies in the past, mainly before upgrading to new major versions, but now I don’t bother with it, as it takes time, and I am happy reinstalling the system and restoring my home folder if needed, given that most of the system “tweaks” are user-level configurations.

There is also the option for you to continue with cloning the disk to your HDD, and for the event that disaster occurs (e.g. internal disk fails), only then buy a new NVMe, and restore the existing disk image to it. But you still have no full reassurance that the backup is bootable.

Except for apps and extensions (which would need reinstalling), the usual tweaks are residing inside the home folder (in the dconf database and the specific applications’ config files). Hence restoring the home folder would already save a lot of work, should the need of reinstalling the system occur.

Useful to know, thanks very much

1 Like

Clonezilla makes a 1:1 copy of your drive, that’s true. It’s not true that you need the same hardware, but if the hardware is too different, it might not work. A spinning disk is not the same as a NVME. Another pitfall are the UUID’s, a UUID should be unique so the original and the clone should be no way on the same system.

Fedora creates a dedicated initramfs adapted to your hardware, with one exception: the rescue kernel. This contains all drivers, so it has a bigger chance to work. There is one problem with this rescue kernel: the initramfs is used for initial boot, but after mounting the root partition, further kernel components are grabbed from /lib/modules/kernelversion. That means that after 3 updates, the rescue kernel has lost it’s modules. So to keep it functional, you have to delete the rescue kernel from /boot after two updates, it will be recreated on kernel install.

You can try to boot the rescue kernel, if it goes a step further than now but ends with tons of failing services, then it works but the modules directory is updated away.
Then boot a live iso, follow instructions how to rescue a system in chroot mode, and install the latest kernel into the clone.