Where is the entity ID stored? I have an installation which I am trying to upgrade from Drupal 6 without much success. I have decided to manually port the database over. 

I realized that in a fresh installation of Drupal 7, node has entity ID = 1 whereas in another installation, node has entity ID = 2. 

Where is the table storing this data located?
Check for hook_entity_info and entity_extract_ids. The former specified a base table and the id key, the latter allows to extract the ID from the entity.