Supply microcontroller and solenoid with the same battery at different voltage levels
Here is the first one I found- there are likely better ones for you. Look for adjustable boost converters. 6V is not a common fixed output voltage.

Edit: In general for adjustable regulators to make the output voltage what you want you'll pick a pair of resistors (connected as a voltage divider) such that the divided output voltage is equal to the nominal reference voltage of the chip. Sometimes you may have to take the bias current into account too, and that should be spelled out in the datasheet. In the case of the above chip, here is the schematic for a 12V-output circuit: 



The reference voltage is specified as 1.242V. They've picked R1 and R2 such that 

FB = 12V \$(\frac {R2}{R1+R2})\$= 1.237V, so the nominal voltage at the output will be a bit higher than 12V (ignoring bias current, which at 40nA is pretty small). 

Other parts may have to change besides R1/R2 for your 6V output voltage so be sure to read the datasheet carefully and understand all the nuances. Be particularly careful of the inductor selection and compensation with switching regulators. Some manufacturers have automated online SMPS design pages that will suggest actual part numbers.