1
1
## rpi-clone
2
- Latest version: 2.0.22
2
+ Latest version: 2.0.23
3
+
4
+ This updated code is located in a fork of Bill Willsons git repository
5
+ https://github.com/billw2/rpi-clone at https://github.com/framps/rpi-clone
3
6
4
7
Version 2 is a complete rewrite with improved capability over
5
8
the original. See the examples below.
@@ -45,7 +48,7 @@ only Debian packages with apt-get.
45
48
46
49
#### On a Raspberry Pi:
47
50
```
48
- $ git clone https://github.com/billw2 /rpi-clone.git
51
+ $ git clone https://github.com/framps /rpi-clone.git
49
52
$ cd rpi-clone
50
53
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin
51
54
```
@@ -66,7 +69,7 @@ add them to the rpi-clone-setup script.
66
69
To install on another OS, rpi-clone may be renamed to suit. For example,
67
70
on my Debian desktop I rename:
68
71
```
69
- $ git clone https://github.com/billw2 /rpi-clone.git
72
+ $ git clone https://github.com/framps /rpi-clone.git
70
73
$ cd rpi-clone
71
74
$ sudo cp rpi-clone /usr/local/sbin/sys-clone
72
75
$ sudo cp rpi-clone-setup /usr/local/sbin/sys-clone-setup
@@ -256,7 +259,7 @@ Booted disk: mmcblk0 16.0GB Destination disk: sdb 8.0GB
256
259
---------------------------------------------------------------------------
257
260
Part Size FS Label Part Size FS Label
258
261
1 /boot 58.4MB fat16 -- 1 8.0GB fat32 --
259
- 2 root 16.0GB ext4 SD-RPI-s1
262
+ 2 root 16.0GB ext4 SD-RPI-s1
260
263
---------------------------------------------------------------------------
261
264
== Initialize: IMAGE mmcblk0 partition table to sdb - FS types mismatch ==
262
265
1 /boot (22.5MB used) : IMAGE to sdb1 FSCK
@@ -271,7 +274,7 @@ Verbose mode : no
271
274
272
275
Initialize and clone to the destination disk sdb? (yes/no): yes
273
276
Optional destination rootfs /dev/sdb2 label (16 chars max): SD-RPI-8a
274
- ...
277
+ ...
275
278
```
276
279
277
280
#### 2) Subsequent clone to the same SD card in USB card reader as example 1
@@ -299,7 +302,7 @@ Run setup script : rpi-clone-setup rpi2
299
302
Verbose mode : no
300
303
-----------------------:
301
304
302
- Ok to proceed with the clone? (yes/no):
305
+ Ok to proceed with the clone? (yes/no):
303
306
```
304
307
305
308
#### 3) Cloning a Pi3 when fstab uses PARTUUID
@@ -407,7 +410,7 @@ and using rpi-clone for a clone back to the SD card slot will not work.
407
410
408
411
409
412
#### 6) Clone to smaller 4GB SD card
410
- I happen to have an old 4GB SD card and here's a try to clone to it:
413
+ I happen to have an old 4GB SD card and here's a try to clone to it:
411
414
```
412
415
root@rpi2: ~$ rpi-clone sda
413
416
@@ -513,8 +516,8 @@ Booted disk: sda 64.2GB Destination disk: sdb 31.5GB
513
516
---------------------------------------------------------------------------
514
517
Part Size FS Label Part Size FS Label
515
518
1 /boot 104.4MB fat32 -- 1 31.5GB fat32 --
516
- 2 root 16.8GB ext4 Samsung 64GB A
517
- 3 /home/pi/media 47.3GB ext4 --
519
+ 2 root 16.8GB ext4 Samsung 64GB A
520
+ 3 /home/pi/media 47.3GB ext4 --
518
521
---------------------------------------------------------------------------
519
522
== Initialize: IMAGE sda partition table to sdb - FS types mismatch ==
520
523
1 /boot (21.5MB used) : IMAGE to sdb1 FSCK
@@ -528,7 +531,7 @@ Verbose mode : no
528
531
: The partition structure will be imaged from sda.
529
532
-----------------------:
530
533
531
- Initialize and clone to the destination disk sdb? (yes/no):
534
+ Initialize and clone to the destination disk sdb? (yes/no):
532
535
```
533
536
Note that if I had partitioned the 64GB disk with more than three
534
537
partitions it would have been more difficult to clone down to the
@@ -550,8 +553,8 @@ Booted disk: sda 64.2GB Destination disk: mmcblk0 15.8GB
550
553
---------------------------------------------------------------------------
551
554
Part Size FS Label Part Size FS Label
552
555
1 /boot 104.4MB fat32 -- 1 15.8GB fat32 --
553
- 2 root 16.8GB ext4 Samsung 64GB A
554
- 3 /home/pi/media 47.3GB ext4 --
556
+ 2 root 16.8GB ext4 Samsung 64GB A
557
+ 3 /home/pi/media 47.3GB ext4 --
555
558
---------------------------------------------------------------------------
556
559
Initialize required : partition - types mismatch.
557
560
: The minimum destination disk size is 16.9GB
@@ -572,8 +575,8 @@ Booted disk: sda 64.2GB Destination disk: mmcblk0 15.8GB
572
575
---------------------------------------------------------------------------
573
576
Part Size FS Label Part Size FS Label
574
577
1 /boot 104.4MB fat32 -- 1 15.8GB fat32 --
575
- 2 root 16.8GB ext4 Samsung 64GB A
576
- 3 /home/pi/media 47.3GB ext4 --
578
+ 2 root 16.8GB ext4 Samsung 64GB A
579
+ 3 /home/pi/media 47.3GB ext4 --
577
580
---------------------------------------------------------------------------
578
581
== Initialize: IMAGE sda partition table to mmcblk0 - forced by option ==
579
582
1 /boot (21.5MB used) : IMAGE to mmcblk0p1 FSCK
@@ -587,7 +590,7 @@ Verbose mode : no
587
590
: The partition structure will be imaged from sda.
588
591
-----------------------:
589
592
590
- Initialize and clone to the destination disk mmcblk0? (yes/no):
593
+ Initialize and clone to the destination disk mmcblk0? (yes/no):
591
594
```
592
595
I'm using PARTUUID in /etc/fstab, but if I weren't, this clone would also
593
596
automatically edit mmcblk0p names into the destination disk fstab.
@@ -600,14 +603,14 @@ I get an error requiring another initialize. This time the
600
603
error is because rpi-clone wants to clone the mounted third partition and
601
604
there is no destination third partition:
602
605
```
603
- pi@rpi2: ~$ sudo rpi-clone mmcblk0
606
+ pi@rpi2: ~$ sudo rpi-clone mmcblk0
604
607
605
608
Booted disk: sda 64.2GB Destination disk: mmcblk0 15.8GB
606
609
---------------------------------------------------------------------------
607
610
Part Size FS Label Part Size FS Label
608
611
1 /boot 104.4MB fat32 -- 1 104.4MB fat32 --
609
612
2 root 16.8GB ext4 Samsung 64GB A 2 15.7GB ext4 SD-16c
610
- 3 /home/pi/media 47.3GB ext4 --
613
+ 3 /home/pi/media 47.3GB ext4 --
611
614
---------------------------------------------------------------------------
612
615
Initialize required : partition 3 /home/pi/media - destination missing.
613
616
: Unmount source partitions or use -m
@@ -626,7 +629,7 @@ Booted disk: sda 64.2GB Destination disk: mmcblk0 15.8GB
626
629
Part Size FS Label Part Size FS Label
627
630
1 /boot 104.4MB fat32 -- 1 104.4MB fat32 --
628
631
2 root 16.8GB ext4 Samsung 64GB A 2 15.7GB ext4 SD-16c
629
- 3 /home/pi/media 47.3GB ext4 --
632
+ 3 /home/pi/media 47.3GB ext4 --
630
633
---------------------------------------------------------------------------
631
634
== SYNC sda file systems to mmcblk0 ==
632
635
/boot (21.5MB used) : SYNC to mmcblk0p1 (104.4MB size)
@@ -636,7 +639,7 @@ Run setup script : no
636
639
Verbose mode : no
637
640
-----------------------:
638
641
639
- Ok to proceed with the clone? (yes/no):
642
+ Ok to proceed with the clone? (yes/no):
640
643
```
641
644
642
645
#### 11) Clones from my Debian desktop
@@ -654,11 +657,11 @@ Booted disk: sda 275.1GB Destination disk: sdb 320.1GB
654
657
---------------------------------------------------------------------------
655
658
Part Size FS Label Part Size FS Label
656
659
1 1.0GB ext4 SSD-275-G6-p1 1 320.1GB -- --
657
- 2 root 52.4GB ext4 SSD-275-G6-p2
658
- 3 12.6GB swap --
659
- 4 209.0GB EXT --
660
- 5 /home 62.9GB ext4 SSD-275-G6-p5
661
- 6 /mnt/sda 146.1GB ext4 SSD-275-G6-p6
660
+ 2 root 52.4GB ext4 SSD-275-G6-p2
661
+ 3 12.6GB swap --
662
+ 4 209.0GB EXT --
663
+ 5 /home 62.9GB ext4 SSD-275-G6-p5
664
+ 6 /mnt/sda 146.1GB ext4 SSD-275-G6-p6
662
665
---------------------------------------------------------------------------
663
666
== Initialize: IMAGE sda partition table to sdb - FS types mismatch ==
664
667
1 : IMAGE to sdb1
@@ -675,7 +678,7 @@ Verbose mode : no
675
678
: The partition structure will be imaged from sda.
676
679
-----------------------:
677
680
678
- Initialize and clone to the destination disk sdb? (yes/no):
681
+ Initialize and clone to the destination disk sdb? (yes/no):
679
682
```
680
683
And a subsequent sync to the same disk after I have manually labeled all
681
684
the partitions:
@@ -703,7 +706,7 @@ Run grub : grub-install --root-directory=/mnt/clone /dev/sdb
703
706
Verbose mode : no
704
707
-----------------------:
705
708
706
- Ok to proceed with the clone? (yes/no):
709
+ Ok to proceed with the clone? (yes/no):
707
710
```
708
711
709
712
0 commit comments