Singularities of curves that are moving Let $k$ be an algebraically closed field, let $d\ge 2$ be an integer and let $f,g\in k[x,y,z]$ be two homogeneous polynomials of degree $d$ without common factor. 
We want to know what are the singularities of the curve $C_{[\lambda:\mu]}$ given by $\lambda f+\mu g=0$, for  a general $[\lambda:\mu]\in \mathbb{P}^1$. If a point $p\in\mathbb{P}^2$ is a singular point of the curves $C_{[1:0]}$ and $C_{[0:1]}$ given by $f=0$ and $g=0$ then it is of course singular for each $C_{[\lambda:\mu]}$. If $\mathrm{char}(k)=0$, then by Bertini there are no other singularities. If $\mathrm{char}(k)=p>0$, it is false: take for instance $f=x^p$ and $g=y^p$. Are all counterexamples of this type ? One can of course replace $p$ by a power of $p$ and maybe do some more general examples. For instance, if $d<2p$, is the case $f=x^p$ and $g=y^p$ the only possibility (up to change of coordinates)?
 A: I am just writing an answer summarizing the counterexamples from the comments and adding one positive result for small degree.  
Let $k$ be an algebraically closed field.  Let $X$ and $Y$ be quasi-projective, connected, smooth $k$-schemes.  Let $f:X\to Y$ be a flat $k$-morphism.
Problem.  Is $f$ smooth over a dense open subset of $Y$?
By Generic Smoothness / Sard's Lemma, this is true if $\text{char}(k)$ equals $0$.  However, if $\text{char}(k)=p$ is positive, this can fail.  As the OP explains, the induced map of function fields might be inseparable, in which case $f$ is nowhere smooth.  However, there are other examples, such as the ones from the comments.  In particular, for $$\mathbb{P}^1_k=\text{Proj}\ k[\lambda,\mu],\ \ \mathbb{P}^2_k = \text{Proj}\ k[x,y,z],$$ $$f = x^dz^{p-d} + (y-x)^p, \ \ g = x^dz^{p-d} + (y-z)^p, \ \ 1\leq d \leq p-1,$$
$$Y=\mathbb{P}^1_k \setminus\{[1,1]\}, \ \ U = \mathbb{P}^2_k \setminus\{[1,0,1]\},$$
$$ X\subset Y\times_{\text{Spec}\ k} U, \ \ X =\text{Zero}(\lambda f - \mu g),$$ the projection $f$ from $X$ to $Y$ is a flat, surjective morphism of quasi-projective, connected, smooth $k$-schemes that is smooth on a dense open of $X$, yet the singular locus of $f$ surjects to $Y$.
There is a positive result.  Let $Y$ be a quasi-projective, connected, smooth $k$-scheme.  Let $X$ be a locally closed subscheme of $Y\times_{\text{Spec}\ k} \mathbb{P}^N_k$ that is connected and smooth.  Assume that the projection $f$ from $X$ to $Y$ is flat.  Denote the dimension of the generic fiber of $f$ by $n$.  Denote the projective degree of the (closure) of the generic fiber by $e$.  In the PhD thesis of Jan Gutt, there is the following result.
Jan Gutt 
Hwang-Mok rigidity of cominuscule homogeneous varieties in positive characteristic 
https://arxiv.org/pdf/1305.5296.pdf 
Lemma 4.2.5  If the singular locus of the generic fiber of $f$ has dimension $d$, then the projective degree of the associated $d$-cycle is $\leq e(e-1)^{n-d}$. In particular, if $p> e(e-1)^n$, then the generic fiber of $f$ is smooth.
I recall that Will Sawin showed me examples demonstrating the sharpness of the inequality.  If Will wants to add those examples, that would be great.  Otherwise, I will try to add those myself in a few days.
