Upgrading wordpress 2.7 to 4.1 – posts are not listing after importing old db to new

You should probably upgrade one step at a time from one version to the next. All the code of all the versions are listed at the http://wordpress.org site. It will be a long process but the best to ensure proper upgrades. You can try to make it faster by skipping several versions at each step, just always keep a backup before doing such skipping.

@ialocin points out there is actually a codex section for that http://codex.wordpress.org/Upgrading_WordPress_-_Extended_Instructions#Upgrading_Across_Multiple_Versions

Note: it is most likely that the minimal requirements for running wordpress had changed over that time. Make sure you are running a recent enough php version and have enough memory. It might be that your problems are related to php errors and not to the actual upgrade process.