Noether Normalization Lemma for affine scheme over DVR? Let $R$ be a DVR and $S$ a finitely generated flat $R$-algebra. How can I prove that there is a subalgebra $C$ of $S$ such that there is a finite and injective morphism $R[t_1,\dots, t_d] \rightarrow C$ and such that $ \operatorname{Spec} S \rightarrow \operatorname{Spec}C$ is an open immersion?
 A: Denote by $X=\mathrm{Spec}(S)$. It is enough to show 

There exists a quasi-finite and dominant morphism $\pi : X\to \mathbb A^d_R$. 

Indeed, Zariski's main theorem then implies that $\pi$ factors into an open immersion $X\to X'$ follow by a finite and surjective morphism $X'\to \mathbb A^d_R$. This implies that $X'$ is affine and $O_{X'}(X')$ is the $C$ you are after. 
To construct such a morphism $\pi$, I need to work with projective schemes. By the usual process of projectivization, we can write $X=D_+(f_0)$ in a projective scheme $\overline{X}=\mathrm{Proj}(B)$ with $f_0$ homogeneous and $X$ dense in $\overline{X}$. Denote by $s$ the closed point of $\mathrm{Spec}(R)$ and by $X(s)$ the Zariski closure of $X_s$ in $(\overline{X})_s$ (in general, $X_s$ may not be dense in $(\overline{X})_s$).  
Let $d=\dim X_s=\dim X_\eta$ (generic fiber). As $X_s\cap V_+(f_0)=\emptyset$, we have 
$$\dim (X(s)\cap V_+(f_0))\le d-1, \quad \dim (\overline{X}_\eta\cap V_+(f_0))\le d-1.$$ 
Using graded avoidance lemma, we can find a homogeneous $f_1\in B$ such that $V_+(f_1)$ doesn't contain any generic point of $X(s)\cap V_+(f_0)$ and of $\overline{X}_\eta\cap V_+(f_0)$. Therefore 
$$\dim (X(s)\cap V_+(f_0)\cap V_+(f_1))\le d-2, \quad \dim (\overline{X}_\eta\cap V_+(f_0)\cap V_+(f_1))\le d-2.$$ 
Repeating the same argument, we find $f_1, \dots, f_d$ such that 
$$X(s)\cap (\cap_{0\le i\le d} V_+(f_i))=\emptyset, \quad \overline{X}_\eta\cap (\cap_{0\le i\le d}V_+(f_i))=\emptyset.$$ 
Replacing each $f_i$ be a suitable positive power, we can suppose the $f_i$ all have the same degree. Then define a rational map
$$\pi: \overline{X} --\to \mathbb P^d_R, \quad x\mapsto [f_0(x),\dots, f_d(x)].$$
It is regular on $\overline{X}\setminus (\cap_{0\le i\le d} V_+(f))\supseteq \overline{X}_\eta\cup X(s)$. On $X(s)$, $\pi: X(s)\to \mathbb P^d_S$ is projective because $X(s)$ is projective, and $\pi^{-1}(D_+(T_i))=X(s)\cap D_+(f_i)\to D_+(f_i)$ is at the same time an affine morphism and a projective morphism. It is then finite. Similarly, $\pi$ is finite on $\overline{X}_\eta$. As $X\subset \overline{X}_\eta\cup X(s)$, we get a quasi-finite morphism $X\to \mathbb P^d_R$. By construction, the image of $X$ is in $D_+(T_0)=\mathbb A^d_R$ because $X=D_+(f_0)=\pi^{-1}(D_+(T_0)$. Finally, the morphism is dominant by comparing the dimensions. 
