I very much doubt that this is a software problem, although you could always check this by booting into DOS. You could have a problem in the connection between the keyboard and the mobo - in laptops, this is usually a fairly tight-fitting plau at the end of a short tape that fits onto the mobo.
See click here. Should only be a problem if you have recently opened the laptop. Could be that the keyboard has a fault (how old is the laptop - warranty?) that is only allowing the system to 'see' part (and a different part each time) of the keyboard on each boot-up.