2. Let $a$ and $b$ be integers, and the equation
$$
a x^{2}+b x+1=0
$$

has two distinct positive roots both less than 1. Then the minimum value of $a$ is
2. 5 .

Let the two roots of the equation be $x_{1}, x_{2}$.
From $x_{1} x_{2}=\frac{1}{a}>0$, we know $a>0$.
Also, $f(0)=1>0$, so according to the problem, we have
$$
\left\{\begin{array}{l}
\Delta=b^{2}-4 a>0, \\
00 .
\end{array}\right.
$$

Since $a$ is a positive integer, from equations (2) and (3), we get
$-(a+1)<b<0$;
From equation (1), we get $b<-2 \sqrt{a}$.
Therefore, $-(a+1)<b<-2 \sqrt{a}$.
When $a=1,2,3,4$, there are no integers $b$ that satisfy equation (4);

When $a=5, b=-5$, the equation is $5 x^{2}-5 x+1=0$, and the two roots are between 0 and 1.
Thus, the minimum value of $a$ is 5.