If you start with a note (or rest), add a time value, then add a multiplication symbol with the fraction of rhythmic value, you will arrive at your desired note.
So, for instance,
a1 means "the note A at the full value of a whole note." But
a1*6/8 means "the note A, written as a whole note, but taking up only sixth-eighths of the value of a whole note." This fraction may incidentally be whatever you want.
I've more often used a whole note to indicate a note lasting the entire measure when it's longer than usual (e.g.,
a1*11/8 to make a whole note fill a measure of 11/8 time; or
s1*24 to mean "make an invisible spacer rest that lasts the length of twenty-four whole notes"), but marking a whole note to mean less than the normal value seems out of the ordinary. For 6/8 time, a dotted half note is normal to fill in the measure.
One last note about rests. You do see a "whole" rest fill a measure of any time signature. In Lilypond, that is not represented by
r1 --- that will still get you the whole rest taking up its normal value --- but rather by
R1 which denotes a "MultiMeasureRest," which will always appear as a whole note, but also be directly centered in the measure.
As found in the documentation on full-measure rests, the number after an uppercase R will denote such a rest. Therefore, since
2. fills the entirety of a 6/8 time signature (as well as 3/4), use
R2.. You will end up seeing something that looks more like what you normally would encounter.