Cloning MicroSD to a new card, doesn't boot?

Made a complete disk backup on a Windows application called AOMEI Backupper. If I restore to the same MicroSD I have no issues. But as soon as I try to restore to a new MicroSD it doesn’t boot.
I have plugged in the new MicroSD on another Linux computer to check the UUID, which is exactly the same as the UUID that is in dietpiEnv.txt and fstab.
Because it is a full clone, the UUID is also cloned.

The only thing that isn’t the same is the PARTUUID if I understand correctly, but I cannot find this used in any of the files, only UUID.

How do I get it to boot on the new MicroSD?

The location where you have to set the PARTUUID depends on the device. What SBC do you use?

To get the PARTUUID of your new card you need to mount it on a different machine and execute:

blkid

Rock 4C+

Yes I got the UUID and confirmed it is the same as the original microsd. But where is PARTUUID used?

How does /etc/fstab looks like on the new card?

Identical, and uses the same UUID.

This is dietpiEnv.txt

rootdev=UUID=2ca1b578-e696-4fc5-a176-1e9af7cb7656
rootfstype=ext4
# The init system logs to the console defined last.
consoleargs=console=ttyS2,1500000 console=tty1
usbstoragequirks=17ef:455c:u
extraargs=net.ifnames=0
docker_optimizations=off
overlay_path=rockchip
overlay_prefix=rockchip
overlays=dwc3
user_overlays=rk3399-dwc3-0-peripheral
param_dwcore.dr_mode=peripheral
fdtfile=rockchip/rk3399-rock-4c-plus.dtb

This is etc/fstab (removed parts where its just comments)

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1930M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid

#----------------------------------------------------------------
PHYSICAL DRIVES
#----------------------------------------------------------------
UUID=2ca1b578-e696-4fc5-a176-1e9af7cb7656 / ext4 noatime,lazytime,rw,ro 0 1
LABEL=backingfiles /backingfiles xfs auto,rw,noatime 0 2
LABEL=mutable /mutable ext4 auto,rw 0 2
/backingfiles/cam_disk.bin /mnt/cam teslausb noauto 0 0
/backingfiles/boombox_disk.bin /mnt/boombox teslausb noauto 0 0
tmpfs /var/log/nginx tmpfs nodev,nosuid 0 0
tmpfs /var/lib/nginx tmpfs nodev,nosuid 0 0
mount.ctts#/mutable/TeslaCam /var/www/html/TeslaCam fuse defaults,nofail,x-systemd.requires=/mutable 0 0
tmpfs /var/tmp tmpfs nodev,nosuid 0 0
tmpfs /var/spool tmpfs nodev,nosuid 0 0
tmpfs /var/lib/ntp tmpfs nodev,nosuid 0 0

And this is running blkid on a Linux machine with the MicroSD that’s not working mounted in an USB adapter:

/dev/sdg1: UUID=“2ca1b578-e696-4fc5-a176-1e9af7cb7656” BLOCK_SIZE=“4096” TYPE=“ext4” PARTUUID=“540d64d4-01”

Here is blkid when I run it on the working microSD with DietPi running:

/dev/mmcblk1p1: UUID=“2ca1b578-e696-4fc5-a176-1e9af7cb7656” BLOCK_SIZE=“4096” TYPE=“ext4” PARTUUID=“a51dc6fe-01”

As you can see, PARTUUID is not used anywhere in these files. And still I am unable to boot with the new microSD which has the exact same UUID and a full disk clone.

My best guess is that AOMEI Backupper did not clone the whole drive, only the partitions, so the bootloader is missing.

To check that, you can mount the card on a linux sytem an do

sudo fdisk -l /dev/sdX

where sdX is the SD card.

Best way to clone would be to use dd, to make a bit perfect clone

Will try that. But the problem is that I want to keep an image as a backup. With dd I can only clone from one to the other right?

What about Win32 Disk Imager?

You can also use dd to create an image
sudo dd if=/dev/sdX of=~/rockpi4_backup.img bs=4M status=progress conv=fsync

you can also use the dietpi-imager for that, which will also use dd under the hood:

bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-imager')"

Imager would need to be executed on a different Unix system to allow creating a consistent image. You can connect the SD card to a different linux system and run the imager app from there