Does there exist singular cubic surface containing $27$ distinct lines? It is well-known that a smooth cubic surface $X\subset \mathbb{CP^3}$ contains $27$ distinct lines. But is the converse also true?
I know this is true for general case (then the $27$ lines will become $6$ double lines and $15$ single lines). But I want to know is it true for all cases.
 A: Yes, the converse is also true. This should be possible to show by hand, since the possibilities for singular cubic surfaces are not so many. Instead, I will deduce it using some more general facts. In this case my proof is probably over the top, but it uses some ideas that are useful in other contexts.
Consider the incidence correspondence $I $ defined by 
$$I = \{ (L,S) \mid L \text{ a line}, \ S \text{ a cubic surface}, \ L \subset S \} \subset \mathbf G(1,3) \times \mathbf P^{19}$$
There is a projection map 
$$\pi: I \rightarrow \mathbf P^{19}$$
whose fibre over a point $[S] \in \mathbf P^{19}$ is exactly the set of lines in the surface $S$. So we know that if $S$ is a smooth cubic, the fibre $\pi^{-1}([S])$ consists of exactly 27 points. We want to show that for $S$ non-smooth, the fibre is either infinite or has less than 27 points  in it.
There are two subsets of interest inside $\mathbf P^{19}$: the discriminant locus $\Delta$ consisting of points corresponding to singular surfaces, and the branch locus $B(\pi)$ consisting of points corresponding to surfaces with either infinitely many or strictly fewer than 27 lines. By the result for smooth cubics we know $B(\pi) \subset \Delta$, and we want to prove equality of these two subsets.
To do this we use two facts:


*

*$\Delta$ is an irreducible divisor in $U$

*$B(\pi)$ is a nonempty subset of codimension 1 in $U$


(The first fact is a general statement about the locus of singular hypersurfaces of degree $d$ in $\mathbf P^n$. The second fact is (part of) what is called "purity of the branch locus", as proved by Zariski.)
So since $\Delta$ is irreducible and contains the divisor $B(\pi)$, we must have $B(\pi)=\Delta$ as claimed.
