Is this an intermittant problem or does it happpen all the time? If it is intermittant, it could be a number of things, including bad sectors on the drive itself, a faulty controller or cables.
Your first port of call is to check the power and data cables, replacing them with new or known-working ones if possible. Next, try loading a set of disk utilities to scan the drive for errors.
Another possibility is that the hard drive isn't spinning up quickly enough during boot - you can increase the delay before the drive is accessed in the BIOS.
These will all cause intermittant problems that may or may not be solved by a slight movement of the cables as you have noticed.