2. Find all integer-coefficient polynomials $f(x)$ such that for all positive integers $n$, we have $f(n) \mid (2^n - 1)$.

 untranslated text:
2. 求所有的整系数多项式 $f(x)$, 使得对所有的正整数 $n$, 均有 $f(n) \mid\left(2^{n}-1\right)$. 

translated text:
2. Find all integer-coefficient polynomials $f(x)$ such that for all positive integers $n$, we have $f(n) \mid (2^n - 1)$.
Assume $f(x)$ is not a constant, and without loss of generality, let the leading coefficient of $f(x)$ be positive.
Then there exists an integer $N$, such that when $x \geqslant N$, $f(x) \geqslant 2$.
Take any positive integer $n, n \geqslant N$, and take a prime factor $p$ of $f(n)$.
Since $f(n) \mid\left(2^{n}-1\right)$, it follows that $2^{n} \equiv 1(\bmod p)$.
Also, $f(n+p) \equiv f(n) \equiv 0(\bmod p)$,
and $f(n+p) \mid\left(2^{n+p}-1\right)$,
thus, $2^{n+p} \equiv 1(\bmod p)$.
Therefore, $2^{p} \equiv 1(\bmod p)$.
By Fermat's Little Theorem, $2^{p} \equiv 2(\bmod p)$, which is a contradiction.
Therefore, $f(x)$ is a constant, let $f(x)=a$.
Since $f(1) \mid\left(2^{1}-1\right)$, i.e., $a \mid 1$, hence $a= \pm 1$.
Therefore, the required integer-coefficient polynomial is $f(x)= \pm 1$.