Skip to content

Commit b2e494e

Browse files
committed
Give dest disk new disk id right after partition image to avoid remounts.
1 parent 2359c39 commit b2e494e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rpi-clone

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
version=2.0.8
3+
version=2.0.9
44

55
# auto run grub-install if grub detected
66
grub_auto=1
@@ -1217,9 +1217,11 @@ Use -U for unattended even if initializing.
12171217
fi
12181218
done
12191219
printf "\n Resize success.\n\n"
1220-
partprobe "/dev/$dst_disk"
12211220
sleep 2
12221221

1222+
new_id=$(od -A n -t x -N 4 /dev/urandom | tr -d " ")
1223+
qprintf "x\ni\n0x$new_id\nr\nw\nq\n" | fdisk /dev/$dst_disk > /dev/null
1224+
12231225
for ((p = n_image_parts + 1; p <= n_src_parts; p++))
12241226
do
12251227
src_sync_part[p]=0

0 commit comments

Comments
 (0)