geerlingguy / rpi-clone

A shell script to clone a booted disk on a Raspberry Pi.
https://rpi-clone.jeffgeerling.com/
BSD 3-Clause "New" or "Revised" License
172 stars 10 forks source link

Cloning from running SD card to external card fails - cannot boot from cloned card #13

Open carylewis opened 3 months ago

carylewis commented 3 months ago

I recently started using bookworm on my raspberry pi 4b, and since then the rpi-clone utility does not work.

It does not generate any errors, but the system will not boot from a cloned card.

The Pi reports "Firmware not found" on the display.

Using the Pi's sd card clone utility works fine.

Please let me know how I can troubleshoot rpi-clone.

fmarzocca commented 3 months ago

Did you install latest version 2.0.23?

carylewis commented 3 months ago

Yes, I did a fresh install before posting.

carylewis commented 3 months ago

I ran sudo rpi-clone -x -v -f sdb | tee out,and didn't see any references to making the the sd card bootable? Is rpi-clone supposed to do that, or is there a manual step I should be performing?

Here is the start of the log:

Initializing
  Imaging past partition 1 start.
  => dd if=/dev/mmcblk0 of=/dev/sdb bs=1M count=8 ...
  Resizing destination disk last partition ...
    Resize success.
  Changing destination Disk ID ...
  => mkfs -t vfat -F 32  /dev/sdb1 ...
  => mkfs -t ext4  /dev/sdb2 ...
carylewis commented 3 months ago

If I use piclone to copy the running system to an external card, that card boots fine, and then I can use rpi-clone without the -f option to update it, it continues to boot correctly.

fmarzocca commented 3 months ago

If I use piclone to copy the running system to an external card, that card boots fine, and then I can use rpi-clone without the -f option to update it, it continues to boot correctly.

That's interesting, Some developer should jump in....

fmarzocca commented 3 months ago

An interesting test could be this:

carylewis commented 1 month ago

An interesting test could be this:

  • initialize the SD with sudo rpi-clone -f sdb
  • at the end run a simple update with sudo rpi-clone sdb
  • check if the clone boots

This did not work.