|
| 1 | + |
1 | 2 | ## rpi-clone
|
2 | 3 |
|
3 | 4 | Version 2 is a complete rewrite with improved capability over
|
@@ -457,6 +458,15 @@ Verbose mode : no
|
457 | 458 |
|
458 | 459 | Initialize and clone to the destination disk sdb? (yes/no):
|
459 | 460 | ```
|
| 461 | +Note that if I had partitioned the 64GB disk with more than three |
| 462 | +partitions it would have been more difficult to clone down to the |
| 463 | +32GB card. If there had been 4 partitions, then a smaller disk has |
| 464 | +to be large enough to image the sizes of the first three source partitions. |
| 465 | +If the disk is too small for that, then an initilize clone would be |
| 466 | +limited to a two partition clone as the next example shows. The other |
| 467 | +alternative would be a manual partition. The take away is that you need |
| 468 | +to consider how you would be cloning to smaller disks when you partition |
| 469 | +a larger disk for a Pi. |
460 | 470 |
|
461 | 471 | #### 9) Clone 64GB USB disk with extra partitions to new 16GB SD card
|
462 | 472 | With a USB boot, the SD card slot is available for use, so I plugged in
|
@@ -556,86 +566,6 @@ Verbose mode : no
|
556 | 566 | Ok to proceed with the clone? (yes/no):
|
557 | 567 | ```
|
558 | 568 |
|
559 |
| - |
560 |
| - |
561 |
| -#### 10) Cloning to manually partitioned hard drive with swap and extended partitions |
562 |
| -This is an additional demonstration of flexibility in partition structure |
563 |
| -when partitions are manually created. The manual partition included a swap |
564 |
| -partition I might use later and an extended partition with two logical |
565 |
| -partitions. I run rpi-clone from a SD card boot and it will sync only |
566 |
| -the first two partitions: |
567 |
| -``` |
568 |
| -pi@rpi0: $ sudo rpi-clone sdc |
569 |
| -
|
570 |
| -Booted disk: mmcblk0 16.0GB Destination disk: sdc 160.0GB |
571 |
| ---------------------------------------------------------------------------- |
572 |
| -Part Size FS Label Part Size FS Label |
573 |
| -1 /boot 58.4MB fat16 -- 1 104.4MB fat16 -- |
574 |
| -2 root 16.0GB ext4 SD-RPI-s1 2 34.4GB ext4 -- |
575 |
| - 3 10.7GB swap -- |
576 |
| - 4 114.8GB EXT -- |
577 |
| - 5 53.7GB ext4 -- |
578 |
| - 6 61.1GB ext4 -- |
579 |
| ---------------------------------------------------------------------------- |
580 |
| -== SYNC mmcblk0 file systems to sdc == |
581 |
| -/boot (22.5MB used) : SYNC to sdc1 (104.4MB size) |
582 |
| -/ (6.0GB used) : SYNC to sdc2 (34.4GB size) |
583 |
| ---------------------------------------------------------------------------- |
584 |
| -Run setup script : no |
585 |
| -Verbose mode : no |
586 |
| ------------------------: |
587 |
| -
|
588 |
| -Ok to proceed with the clone? (yes/no): |
589 |
| -``` |
590 |
| -After running this command, I powered down the Pi, removed the SD card |
591 |
| -and powered back on into a hard drive boot. I had previously boot |
592 |
| -enabled the Pi3. |
593 |
| - |
594 |
| - |
595 |
| - |
596 |
| -#### 11) USB disk clone to large USB disk |
597 |
| -A final example shows a clone from the hard drive set up |
598 |
| -in example 11 to another hard drive. For this example I'm |
599 |
| -plugging in a drive I happen to use for backing up my desktop, |
600 |
| -so the partition types won't match and rpi-clone will want to do an |
601 |
| -initialize. rpi-clone duplicates the partition structure and makes |
602 |
| -the swap partition. This example gives a clue |
603 |
| -how rpi-clone would work if run on a Linux desktop. |
604 |
| -``` |
605 |
| -pi@rpi0: ~$ sudo rpi-clone sda |
606 |
| -
|
607 |
| -Booted disk: sdb 160.0GB Destination disk: sda 320.1GB |
608 |
| ---------------------------------------------------------------------------- |
609 |
| -Part Size FS Label Part Size FS Label |
610 |
| -1 /boot 104.4MB fat16 -- 1 52.4GB ext4 -- |
611 |
| -2 root 34.4GB ext4 -- 2 52.4GB ext4 gkrellm6-p2 |
612 |
| -3 10.7GB swap -- 3 12.6GB swap -- |
613 |
| -4 114.8GB EXT -- 4 202.6GB EXT -- |
614 |
| -5 /mnt/mnt 53.7GB ext4 -- 5 167.8GB ext4 gkrellm6-p5 |
615 |
| -6 61.1GB ext4 -- 6 34.9GB ext4 -- |
616 |
| ---------------------------------------------------------------------------- |
617 |
| -== Initialize: IMAGE sdb partition table to sda - FS types mismatch == |
618 |
| -1 /boot (21.5MB used) : IMAGE to sda1 FSCK |
619 |
| -2 root (6.0GB used) : MKFS SYNC to sda2 |
620 |
| -3 : MKSWAP |
621 |
| -4 : |
622 |
| -5 /mnt/mnt (54.3MB used) : MKFS SYNC to sda5 |
623 |
| -6 (1.9GB used) : RESIZE(221.2GB) MKFS SYNC to sda6 |
624 |
| ---------------------------------------------------------------------------- |
625 |
| -Run setup script : no |
626 |
| -Verbose mode : no |
627 |
| ------------------------: |
628 |
| -** WARNING ** : All destination disk sda data will be overwritten! |
629 |
| - : The partition structure will be imaged from sdb. |
630 |
| ------------------------: |
631 |
| -
|
632 |
| -Initialize and clone to the destination disk sda? (yes/no): |
633 |
| -``` |
634 |
| -If I do this initialize clone then the next time I clone to the disk |
635 |
| -it will be a sync clone and will only want to sync whatever partitions |
636 |
| -happen to be mounted. But there is a "-a" option to rpi-clone that |
637 |
| -will make it clone all partitions even if unmounted. |
638 |
| - |
639 | 569 | ## Author
|
640 | 570 | Bill Wilson
|
641 | 571 | billw--at--gkrellm.net
|
0 commit comments