Definition of inductance and volume currents If I have a uniform, infinitely thin current. The relationship between  inductance and current by definition is:
$\phi_{B} = L I$
Where inductance($L$) the proportionality constant between a wires current, and the magnetic flux that it causes on itself.
This definition only works for infinitely thin currents and B closed loops
since an open loop would not even have a surface attached to it this definition cannot be valid( I'm guessing)
$L$
Another formula derived,  is that the total amount of work I would have to do against the back emf is to generate a current $I_{0}$ is
$W =(1/2) LI_{0}^2$
In griffiths, Using the magnetic vector potential and a few "hand wavy " arguments to change this to volume currents
We can also say that this amount of energy is also stored in the fields as.
$\int_{V} \frac{1}{2\mu_0}\vec{|B|}^2$ dv
Comparing the two expressions
$\int_{V} \frac{1}{2\mu_0}\vec{|B|}^2 dv = (1/2) LI_{0}^2$
Clearly
$L =  \frac{2}{I_{0}^2}\int_{V} \frac{1}{2\mu_0}\vec{|B|}^2 dv $
Here in textbooks ,like griffiths, they use this formula to derive the inductance for a straight volume current wire. Where I_{0} is taken to be the flux of current density perpendicular to the length of the wire
So, my question is this
What are the steps in this derivation that specifically allow for inductance to be calculated for straight wires using this method. As the starting formula
$\phi_{B} = L I$
Only makes sense when talking about CLOSED loops and thin currents.
And 2: In his transition to thin currents to volume currents, how can we be sure what  $I_{0}$ is? As this $I_{0}$ is derived in the context of thin currents. So its generalisation to volume currents doesn't make sense to say that $I_{0}$ is a specific flux integral. As we aren't talking about a specific "current enclosed by a surface" so we cannot say $I_{0}$ is J.da for a perpendicular surface to length of the wire. Aka for a thin wire there is only 1 current. But in volume currents the current flowing through a surface depends on what surface I pick
 A: Sorry for my poor english. My native language is french. I only try to answer part 2 of the question.
The definition of the self-inductance from the flux is tricky because it is well known that the flux diverges for a wire-shaped circuit. The problem is not too serious because in elementary courses one usually calculates only the self-inductance of a solenoid or a torus, modeled in reality by surface layers of current for which there is no divergence of the field near the circuit. And in complicated cases, one returns to the energy definition without worrying too much about the coherence of the various definitions.
For the following, I limit myself to a single circuit (in the general case, the self-inductance also depends on the presence of other circuits which modify the current distribution).
We can be more precise, starting from the magnetic energy to arrive at the definition of the proper flux.
$E_m=\iiint{\frac{{\vec{B}}^2}{2\mu_0}d\tau}=\iiint{\vec{j}.\vec{A} d\tau}$
Most often, it is possible to decompose the closed circuit into elementary closed tubes of current $(K)$, each of which has a current $dI_K$ flowing through it. The volume integral is then decomposed into an integral on each tube and an integral along a tube, with the substitution $\vec{j}d\tau=\vec{j}dSdl=dI\vec{dl}$

$E_m=\int_{all\ tubes\ K}\int_{K}{{\rm dI}_K\vec{\ A}.{\vec{dl}}_K}=\int_{all\ tubes\ K}{{\rm dI}_K\int_{K}{\vec{\ A}.{\vec{dl}}_K}}$
We can (without any divergence problem) define the magnetic field flux through the contour of the elementary tube :
$\int_{K}{\vec{\ A}.{\vec{dl}}_K}=\iint{\vec{\ B}.{\vec{dS}}_K}=\Phi_K$
And so we have :
$E_m=\int_{all\ tubes\ K}{\Phi_KdI}_K$
We can define the total flux through the non-wire circuit by:
$\Phi=\frac{1}{I}\int_{all\ tubes\ K}{\Phi_KdI}_K$
As $I=\int_{all\ tubes\ K}{\rm dI}_K$ this total flux is an average over the elementary current tubes.
By construction, this definition of the flux is consistent with that of the magnetic energy $E_m=\frac{1}{2}I\Phi$
