You can insert a bar line at the beginning of a piece
(between the key signature and the time signature), using
\bar "...". However, if you want a double bar line, you probably
want \bar ".|". Note that LilyPond is smart, so that \bar ":|:" will
print a "|:" at the beginning of a line. For the same reason, a
\bar "||" will not print anything at the beginning of a line, since
such a double bar line normally is placed at the end of the previous
line if it occurs at a line break.
Regarding your other question on bar lines at the system start, I did
a futile attempt to redefine the print-function and glyph of the
SystemStartBar object, but it didn't print anything (here's what I
tried:)
\paper{
\context{
\ScoreContext
\override SystemStartBar #'print-function = #Bar_line::print
\override SystemStartBar #'glyph = #".|"
}
}
If you change the print-function to Span_bar::print, it does print
something, but not what you expect ;-).
/Mats