Skip to content

Commit

Permalink
Check for /dev/ in findmnt results for source /boot and root
Browse files Browse the repository at this point in the history
There can be multiple findmnt lines (eg systemd and /dev/...) for /boot
on some systems and the device /dev entry is the one needed.
So grep for /dev/ on those findmnt results.
  • Loading branch information
billw2 committed Aug 26, 2019
1 parent 7ac4060 commit 3c5d373
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## rpi-clone
Latest version: 2.0.21
Latest version: 2.0.22

Version 2 is a complete rewrite with improved capability over
the original. See the examples below.
Expand Down Expand Up @@ -111,6 +111,7 @@ usage: sys-clone sdN {-v|--verbose} {-f|--force-initialize} {-f2}
{-L|--label-partitions label} {-l|--leave-sd-usb-boot}
{-a|--all-sync} {-F|--Force-sync} {-x} {-V|--version}
{--convert-fstab-to-partuuid}
{--exclude=PATTERN} {--exclude-from=FILE}
-v - verbose rsync, list all files as they are copied.
-f - force initialize the destination disk by imaging the booted disk
Expand All @@ -137,8 +138,8 @@ usage: sys-clone sdN {-v|--verbose} {-f|--force-initialize} {-f2}
the custom list will be synced instead of the default of all
mounted directories. The root directory is always synced.
Not for when initializing.
-L lbl - label for ext type partitions. If 'lbl' ends with #, replace
the # with a partition number and label all ext partitions.
-L lbl - label for ext type partitions. If 'lbl' ends with '#', replace
the '#' with a partition number and label all ext partitions.
Otherwise apply label to root partition only.
-l - leave SD card to USB boot alone when cloning to SD card mmcblk0
from a USB boot. This preserves a SD card to USB boot setup
Expand Down
6 changes: 3 additions & 3 deletions rpi-clone
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# https://github.com/billw2/rpi-clone


version=2.0.21
version=2.0.22

# auto run grub-install if grub detected
grub_auto=1
Expand Down Expand Up @@ -583,8 +583,8 @@ get_src_disk()

# ==== source (booted) disk info and default mount list
#
src_boot_dev=`findmnt /boot -o source -n`
src_root_dev=`findmnt / -o source -n`
src_boot_dev=`findmnt /boot -o source -n | grep "/dev/"`
src_root_dev=`findmnt / -o source -n | grep "/dev/"`
SD_slot_boot=0
SD_slot_dst=0
src_part_base=""
Expand Down

0 comments on commit 3c5d373

Please sign in to comment.