/Carbon Copy Cloner Trouble: Cannot Login after Cloning

Carbon Copy Cloner Trouble: Cannot Login after Cloning

I finally decided to upgrade my MacBook’s hard drive from 60 GB to 120 GB. In preparation, I first cloned the old hard drive to an external hard drive. After cloning, I booted my MacBook to the external hard drive. The booting process seems to be OK. However, I couldn’t login to the system using any user!

That’s very strange. I have used Carbon Copy Cloner to clone quite a few machines and this is the first time I ran into this problem. So, I looked at the online help, and luckily there is a fix for it. Here is the excerpt from the help.

Reboot into single-user mode (hold down command+s during boot). When prompted, type:

fsck -y

[repeat until it no longer says that the Filesystem was modified]

mount -uw /

cd /var/db/

rm .AppleSetupDone

cd netinfo

mv local.nidb local.nidb.bak


As the system boots, you will get the Apple Setup Assistant. Enter your name, password, etc (be sure to use the same short name). You should be able to get in just fine now.

The basic idea is to delete the netinfo database and let the system re-create a new one when you login. That’s a lot of works to do considering you have to re-create all the user accounts and make sure the new user accounts match the old accounts.

I get the idea that the netinfo database wasn’t cloned properly, but how bad is it? I booted up the machine using the original hard drive and I used Terminal application to investigate the difference between the original netinfo database and cloned one. I found that all the files in local.nidb folders are the same, except there is one extra “Index” file in the cloned local.nidb directory. I deleted that file and rebooted the machine using the external hard drive. Guess what? It worked! Here are the steps:

  1. Reboot the machine using the original hard drive with the external hard drive attached.
  2. Open up Terminal application.
  3. Type the following using Terminal. Note that my external hard drive is called MAC. You need to substitute it with your hard drive’s name.

    sudo bash

    cd /Volumes/MAC/var/db/netinfo/local.nidb/

    rm Index

The next time you boot the machine takes a bit longer but it’ fine and you don’t have to re-create user accounts.