You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Deleted private­/var/db folder.... Can't boot

Hi, first I know that what I did was stupid but I didnt know what I was doing.. and I still don’t know what are the consequences.

In order to save space on my MBP 2011 Snow Leopard, I deleted private/var/db folder, yes the whole folder to the trashbin and then I emptied it. Files that were in use weren´t deleted.

So I rebooted and the screen is stuck on apple logo with the turning wheel and safe boot start normally but end up with the turning wheel too.


How can I put fix this issue?

Can I recover the files deleted ? Or at least put back the files that are still in the trash bin ?


Thank you for any help.

MacBook Pro, Mac OS X (10.6.8)

Posted on Mar 14, 2012 2:22 PM

Reply
35 replies

Mar 29, 2012 11:41 AM in response to Serenna

So after trying like 3 dvds of my friends, I got my hand on an original and retail DVD of Snow Leopard. Yet when I try to boot on it, after some time the gray screen with all the languages saying to reboot my laptop appears again.

How come, it's a retail. I'm desperate...


The good thing is that I can access my data with a live CD of Backtrack.

Mar 29, 2012 12:03 PM in response to Serenna

Just jumping on this train, don't mind me... If I understand correctly, you can't even boot on the Install DVD to the point where you can actually reinstall OS X, right? One option then would be to use a partitioning tool such as Gparted to partition your drive, shrink your OS X partition, format the free space in HFS+ file format (now supported by Gparted), install OS X in the newly created partition, transfer your personal data from the old OS X partition to the new one, delete the old partition using Disk Utility in the new partition, and remember never, NEVER to delete system files or folders...


One other option could be to use AppleJack from a USB pendrive (see here for more details), and hope it can somehow let you boot OS X, even in Safe Mode. From there, you can extract the deleted files from the install DVD using Pacifist.


And remember to never, NEVER, er, I've already said that, haven't I...?

Mar 29, 2012 12:53 PM in response to Serenna

MBP 2011 Snow Leopard


I got my hand on an original and retail DVD of Snow Leopard.


You generally can't use an OS version earlier than the one that shipped with your computer, and a retail Snow Leopard DVD is too old for a 2011 MBP. As seen on this support page, the earliest OS version that ever shipped with a 2011 MBP was 10.6.6, and the last retail Snow Leopard DVD was version 10.6.3.

.

User uploaded file

.

You need to get a grey-labeled replacement Install DVD specific for your machine. Apple will send you one for a nominal charge if you call them with your serial number.

Mar 30, 2012 4:06 PM in response to Serenna

I would expect that the USB/Lion thumb drive will boot and enable you to (I guess involuntarily) upgrade to Lion. That thumb drive is $69 from Apple Stores. I do not believe that there is a DVD with Lion to install from.


I am a huge fan of being cautious and making backups, and what I would recommend is, before you go ahead with such a Lion upgrade plan, find a way to boot into target mode to copy all your user data from the existing harddrive to some backup drive or other computer. Presumably you don't have a clone-type backup or you would not be asking for help as you would be able to boot straight to it. Iexpect a totally clean Lion install could still restore user files from a Time Machine backup made under 10.6 but I am guessing you don't have that either.


The reason I suggest this is that the Lion upgrade approach assumes you have a working system in place and conceivably (a small, but probably finite likelihood) could run into trouble if you've deleted certain files that it expects to find. If that happens, and if it's bad enough, you might need to erase before installing Lion. So getting the key files off and backed up somewhere else is important (in my opinion) to do before trying anything else.

Mar 30, 2012 4:35 PM in response to Serenna

Apple's USB Lion Thumb Drive requires Snow Leopard on the target volume for a normal upgrade-install. I suspect it would still accept a SL target volume that is missing the /private/var/db folder, but I'm not sure of this - I don't know what the Lion installer looks at before deciding that a target volume is acceptable. If it does accept the target, it would presumably create a new /var/db folder as part of the Lion installation.


I agree with trying to backup your data before attempting this.

Mar 31, 2012 1:49 AM in response to Serenna

Going out on a limb here, because I've never tried it (never had to, to be honest), but maybe you can boot in Single User mode (press the Command/Apple and S keys down on startup until you see a black screen with white characters), then enter the following commands (press Enter after each command; you may need to enter your admin password):


/sbin/mount -uw /


(press Enter)


mkdir /private/var/db


(press Enter)


Could work, couldn't...

Apr 1, 2012 10:16 AM in response to FrenchToast

FrenchToast wrote:


Going out on a limb here, because I've never tried it (never had to, to be honest), but maybe you can boot in Single User mode (press the Command/Apple and S keys down on startup until you see a black screen with white characters), then enter the following commands (press Enter after each command; you may need to enter your admin password):


/sbin/mount -uw /


(press Enter)


mkdir /private/var/db

(press Enter)


Could work, couldn't...

What would be the purpose of this mkdir command? It would simply create an empty db folder. The problem is not that the folder container itself is gone, it is the hundreds of MB of system files that the db folder contains, and the OP deleted all those, hence the system won't boot at all. Even with an empty db folder, the system will still be unable to boot.

Deleted private­/var/db folder.... Can't boot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.