We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11a38f8 commit 307a33aCopy full SHA for 307a33a
rpi-clone
@@ -940,7 +940,12 @@ then
940
exit 1
941
fi
942
943
-cmdlinedir=$(awk '$1 !~ "^#" && $2 ~ "^/boot" && $3 == "vfat" { print substr($2, 2); exit }' /etc/fstab)
+# Starting with bookworm /boot/firmware/cmdline.txt is used. All previous RaspbianOS releases use /boot/cmdline.txt
944
+cmdlinedir=$(mount | awk '$3 ~ "^/boot(/firmware)?$" && $5 == "vfat" { print substr($3, 2); exit }' )
945
+if [[ -z "$cmdlinedir" ]]; then
946
+ echo "Unable to locate boot device"
947
+ exit 1
948
+fi
949
950
if ((convert_to_partuuid))
951
then
0 commit comments