Skip to content

Commit dd5aeab

Browse files
committed
Add remount of /boot and /
1 parent df635fb commit dd5aeab

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

rpi-clone

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
# This updated code is located in a fork of Bill Wilson's git repository
1111
# at https://github.com/geerlingguy/rpi-clone
1212

13-
version=2.0.23-1
13+
version=2.0.25
1414

15+
# prefix debug statements with line numbers when -x is used
1516
declare -r PS4='|${LINENO}> \011${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
1617

17-
echo "@@@ rpi5 branch version from framp @@@"
18-
echo
19-
2018
# setup trusted paths for dependancies (like rsync, grub, fdisk, etc)
2119
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2220

@@ -297,8 +295,11 @@ rsync_file_system()
297295
src_dir="$1"
298296
dst_dir="$2"
299297

300-
qprintf " => lsblk $(lsblk)\n"
298+
qprintf " => rsync $1 $2 $3 ..."
301299

300+
# make sure the partition is mounted
301+
# sometimes it happens on RPi5 /boot is no longer mounted and then
302+
# the cloned boot partition will be empty
302303
if ! findmnt "$src_dir" &>/dev/null; then
303304
if ! mount "$src_dir"; then
304305
echo "??? Remount failure of $1."
@@ -309,8 +310,6 @@ rsync_file_system()
309310
fi
310311
fi
311312

312-
qprintf " => rsync $1 $2 $3 ..."
313-
314313
if [ "$3" == "with-root-excludes" ]
315314
then
316315
rsync $rsync_options --delete \

0 commit comments

Comments
 (0)