billw2 / rpi-clone

A shell script to clone a booted disk.
BSD 3-Clause "New" or "Revised" License
2.57k stars 334 forks source link

Cloning Ubuntu 20.04 Server (Work-around found) #128

Closed slowrunner closed 3 years ago

slowrunner commented 3 years ago

For some reason "sudo rpi-clone sda" from booted SDcard to USB Adapter/SDcard was not resulting in a bootable backup SDcard.

RaspberryPi 3B+ Ubuntu 20.04 64-bit Server LTS

Work-around found: 1) Flash backup card with Ubuntu 20.04 64-bit LTS Server 2) Boot w/o the target card inserted, then insert the target card 3) $sudo rpi-clone sda

chrishuan9 commented 3 years ago

I ran the same command sudo ./rpi-clone sda

on a RaspberryPI 4B (4G) running Ubuntu 20.04.3 64-Bit Server LTS

and it worked flawlessly.

Here is the log from the clone

ubuntu@ubuntu:~/rpi-clone$ sudo ./rpi-clone sda

Booted disk: mmcblk0 15.9GB                Destination disk: sda 500.1GB
---------------------------------------------------------------------------
Part               Size    FS     Label           Part   Size    FS     Label
1 /boot/firmware   256.0M  fat32  --              1      256.0M  fat32  --
2 root              14.6G  ext4   writable        2      465.5G  ext4   writable
---------------------------------------------------------------------------
== SYNC mmcblk0 file systems to sda ==
/boot/firmware        (60.5M used)   : SYNC to sda1 (256.0M size)
/                     (2.2G used)    : SYNC to sda2 (465.5G size)
---------------------------------------------------------------------------
Run setup script       : no.
Verbose mode           : no.
-----------------------:

Ok to proceed with the clone?  (yes/no): y
Destination disk has same Disk ID as source, changing it.
Disk identifier changed from 0xf66f0719 to 0xdb89624e.

Syncing file systems (can take a long time)
Syncing mounted partitions:
  Mounting /dev/sda2 on /mnt/clone
  => rsync // /mnt/clone with-root-excludes ...
  Mounting /dev/sda1 on /mnt/clone/boot/firmware
  => rsync /boot/firmware/ /mnt/clone/boot/firmware  ...

===============================
Done with clone to /dev/sda
   Start - 13:34:47    End - 13:36:02    Elapsed Time - 1:15

Cloned partitions are mounted on /mnt/clone for inspection or customizing. 

Hit Enter when ready to unmount the /dev/sda partitions ...
fjpdevries commented 3 years ago

Ik ben tot en met vrijdag 22 oktober 2021 afwezig en zal mijn email niet of beperkt kunnen lezen en beantwoorden. Neem voor dringende zaken contact op met mijn collega André de Jonge, email @.***, tel. 0224-297819.

Met vriendelijke groet, FSE Turnstiles b.v. Jos de Vries