Skip to content

Commit 9cb2d1e

Browse files
authored
🌱 detect efi partitions in detect-linux-on-another-disk.sh (#1215)
1 parent 0e99af3 commit 9cb2d1e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/services/baremetal/client/ssh/detect-linux-on-another-disk.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ while read name wwn type; do
6767
fail=1
6868
continue
6969
fi
70+
if echo "$root_directory_content" | grep -Pqi '.*\bEFI\b.*'; then # -i is needed, because grub-fstest prints "efi", but mounted it is "EFI".
71+
echo "FAIL: $name $wwn looks like a Linux /boot/efi partition on another disk."
72+
fail=1
73+
continue
74+
fi
7075
#echo "ok: $name $wwn $parttype, does not look like root Linux partition."
7176
done < <(echo "$lines" | grep -v NAME | grep -i part)
7277
if [ $fail -eq 1 ]; then
7378
exit 1
7479
fi
7580
echo "Looks good. No Linux root partition on another devices"
76-

0 commit comments

Comments
 (0)