2. Roll a die six times, let the number obtained on the $i$-th roll be $a_{i}$. If there exists a positive integer $k$, such that $\sum_{i=1}^{k} a_{i}=6$ has a probability $p=\frac{n}{m}$, where $m$ and $n$ are coprime positive integers. Then
$$
\log _{6} m-\log _{7} n=
$$
2. 1.

When $k=1$, the probability is $\frac{1}{6}$;
When $k=2$,
$$
6=1+5=2+4=3+3 \text {, }
$$

the probability is $5\left(\frac{1}{6}\right)^{2}$;
When $k=3$,
$$
6=1+1+4=1+2+3=2+2+2 \text {, }
$$

the probability is $(3+6+1)\left(\frac{1}{6}\right)^{3}=10\left(\frac{1}{6}\right)^{3}$;
When $k=4$,
$$
6=1+1+1+3=1+1+2+2 \text {, }
$$

the probability is $(4+6)\left(\frac{1}{6}\right)^{4}=10\left(\frac{1}{6}\right)^{4}$;
When $k=5$,
$$
6=1+1+1+1+2 \text {, }
$$

the probability is $5\left(\frac{1}{6}\right)^{5}$;
When $k=6$, the probability is $\left(\frac{1}{6}\right)^{6}$.
$$
\begin{array}{l}
\text { Hence } p=\frac{1}{6}+5\left(\frac{1}{6}\right)^{2}+10\left(\frac{1}{6}\right)^{3}+10\left(\frac{1}{6}\right)^{4}+ \\
\quad 5\left(\frac{1}{6}\right)^{5}+\left(\frac{1}{6}\right)^{6} \\
=\frac{1}{6}\left(1+\frac{1}{6}\right)^{5}=\frac{7^{5}}{6^{6}} \\
\Rightarrow n=7^{5}, m=6^{6} \\
\Rightarrow \log _{6} m-\log _{7} n=1 .
\end{array}
$$