2. The area of trapezoid $ABCD$ is $S, AB \parallel CD$, and $AB=b$, $CD=a(a<b)$, the diagonals $AC$ and $BD$ intersect at point $O$, and the area of $\triangle BOC$ is $\frac{1}{7} S$. Then $\frac{a}{b}=(\quad)$.
(A) $\frac{1}{2}$
(B) $\frac{4-\sqrt{15}}{2}$
(C) $\frac{5-\sqrt{21}}{2}$
(D) $\frac{6-\sqrt{26}}{2}$
2. (C).

As shown in Figure 4, we know
$$
\begin{array}{l}
S_{1}+S_{2}=\frac{5}{7} S . \\
\text { Also, } \frac{S_{2}}{S_{\triangle B A C}}=\frac{S_{2}}{\frac{1}{7} S}=\frac{O D}{O B}, \\
\frac{S_{\triangle B A C}}{S_{1}}=\frac{\frac{1}{7} S}{S_{1}}=\frac{O C}{O A} .
\end{array}
$$

Given $A B \parallel C D$, we have $\triangle A O B \sim \triangle C O D$, thus $\frac{O C}{O A}=\frac{O D}{O B}$.
Therefore, $S_{1} S_{2}=\frac{1}{49} S^{2}$.
From equations (1) and (2), we know that $S_{1}$ and $S_{2}$ are the roots of the equation $t^{2}-\frac{5}{7} S t+\frac{1}{49} S^{2}=0$.
Solving, we get $S_{1}=\frac{5+\sqrt{21}}{14} S, S_{2}=\frac{5-\sqrt{21}}{14} S\left(\because S_{1}>S_{2}\right)$.
$$
\text { Also, } \because \frac{a^{2}}{b^{2}}=\frac{S_{2}}{S_{1}}=\frac{(5-\sqrt{21})^{2}}{4}, \therefore \frac{a}{b}=\frac{5-\sqrt{21}}{2} \text {. }
$$