Skip to content

Commit 34dda4f

Browse files
Support Ubuntu by modifying /boot/firmware/cmdline.txt
On Ubuntu, cmdline.txt is stored in a subdirectory, so if the file does not exist in the usual location, fall back to the Ubuntu location (and fall back to the Armbian version if the Ubuntu version does not exist either). Note that this does not support Ubuntu completely out of the box, since it uses filesystem labels instead of UUIDs for mounting, but if you manualy change them to UUIDs, this change allows cloning to work.
1 parent ec4405b commit 34dda4f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rpi-clone

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,11 @@ qecho ""
17911791
fstab=${clone}/etc/fstab
17921792
cmdline_txt=/boot/cmdline.txt
17931793
cmdline_boot=/boot/cmdline.boot
1794+
if [ ! -f "${clone}${cmdline_txt}" ]; then
1795+
# Ubuntu
1796+
cmdline_txt=/boot/firmware/cmdline.txt
1797+
cmdline_boot=/boot/firmware/cmdline.boot
1798+
fi
17941799
if [ ! -f "${clone}${cmdline_txt}" ]; then
17951800
cmdline_txt=/boot/armbianEnv.txt
17961801
cmdline_boot=/boot/armbianEnv.boot

0 commit comments

Comments
 (0)