Skip to content

Commit

Permalink
🌱 detect efi partitions in detect-linux-on-another-disk.sh (#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
guettli committed Mar 18, 2024
1 parent 0e99af3 commit 9cb2d1e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ while read name wwn type; do
fail=1
continue
fi
if echo "$root_directory_content" | grep -Pqi '.*\bEFI\b.*'; then # -i is needed, because grub-fstest prints "efi", but mounted it is "EFI".
echo "FAIL: $name $wwn looks like a Linux /boot/efi partition on another disk."
fail=1
continue
fi
#echo "ok: $name $wwn $parttype, does not look like root Linux partition."
done < <(echo "$lines" | grep -v NAME | grep -i part)
if [ $fail -eq 1 ]; then
exit 1
fi
echo "Looks good. No Linux root partition on another devices"

0 comments on commit 9cb2d1e

Please sign in to comment.