2. Given that $a$, $b$, and $c$ are three distinct real numbers. If any two of the quadratic equations
$$
\begin{array}{l}
x^{2}+a x+b=0, \\
x^{2}+b x+c=0, \\
x^{2}+c x+a=0
\end{array}
$$

have exactly one common root, find the value of $a^{2}+b^{2}+c^{2}$.
2. From equations (1) and (2), we know their common root is $p=\frac{b-c}{b-a}$.

Similarly, the common roots of equations (2) and (3), and equations (1) and (3) are $q=\frac{c-a}{c-b}$ and $r=\frac{a-b}{a-c}$, respectively.
Thus, $p q r=-1$.
If any two of $p, q, r$ are equal, assume without loss of generality that $p=q$, then the three equations have a common root $p$. Therefore,
$$
p=r \Rightarrow p=r=q=-1 \Rightarrow a=b=c,
$$
which is a contradiction.
Now assume $p, q, r$ are distinct. Then the three equations have the form
$$
\begin{array}{l}
(x-p)(x-r)=0, \\
(x-p)(x-q)=0, \\
(x-q)(x-r)=0 .
\end{array}
$$

Thus, $a=-p-r=q r, b=-q-p=r p$, $c=-r-q=p q$.
Hence, $-2(p+q+r)=p q+q r+r p$,
$$
\begin{array}{l}
-1=(q+1)(p+1)(r+1) \\
=p q+q r+r p+p+q+r .
\end{array}
$$

Therefore, $p+q+r=1, p q+q r+r p=-2$.
Then $a^{2}+b^{2}+c^{2}$
$$
=2\left(p^{2}+q^{2}+r^{2}+p q+q r+r p\right)=6 \text {. }
$$