How to find $\tau$ in this circuit? 1)
2)
I know, that 
$$
τ = \frac{L}{R}
$$
but what is $R$ in this formula? It seems to be the total resistance, but how to find it in 1) and 2)?
 A: 
but what is R in this formula?

Since you're interested in what happens after the switch opens in both cases, redraw the circuit after the switch opens.
In (1), there is just the one resistor R to the left of the switch so that's the resistance in the time constant.
In (2), there is just the two series connected 1k resistors so R = 2k is the resistance to use.

If the formula for $\tau$ given by user007 seems mysterious, here's a derivation.
Assume, for concreteness, an RL circuit with initial current $i_0$.  The current is given by:
$i(t) = i_0 \cdot e^{-t / \tau}, t \ge 0$
where
$\tau = L/R$
Now, take the time derivative of both sides to get:
$\frac{di(t)}{dt} = i_0 \cdot e^{-t / \tau}(-1/\tau)$
Then, evaluate this at $t = 0$:
$\frac{di(0)}{dt} = i_0 \cdot e^{-0 / \tau}(-1/\tau) = -i_0/\tau$
Thus:
$\tau = \dfrac{i_0}{\frac{di(0)}{dt}}$
(the negative sign is required in this case since the current is decaying, i.e., the time rate of change of current is negative)
A: Have derived it myself:
$${\tau}=\dfrac{\underbrace {\large { I}}_{\text{through inductor at steady state}}}{\underbrace {{dI_{\small }}/{dt}}_{\text{initial}}}$$
Also $$V_{\text{inductor}}=L\dfrac{dI}{dt}$$
where $I$ is current through inductor.
