Serenna

Q: 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

Close

Q: Deleted private/var/db folder.... Can't boot

  • All replies
  • Helpful answers

first Previous Page 3 of 3
  • by steve626,

    steve626 steve626 Apr 1, 2012 10:16 AM in response to FrenchToast
    Level 4 (1,551 points)
    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.

  • by FrenchToast,

    FrenchToast FrenchToast Apr 1, 2012 11:05 AM in response to steve626
    Level 3 (645 points)
    Apr 1, 2012 11:05 AM in response to steve626

    When OS X installs, it starts by creating the directories and folders where the systems files will be placed. You've got to start somewhere, but in effect, if the OP's system won't boot at all, then there isn't much left to do but to do a clean install and forget about the personal data on her drive.

     

    I'm not even sure creating a new "db" folder in one shot is possible. She'd probably have to navigate through the folder treeline one step at a time anyway. It's worth a try, in any case, provided she can boot in Single User mode at all... Extracting the system files from the install DVD can then be done, also in Single User mode.

  • by FrenchToast,

    FrenchToast FrenchToast Apr 1, 2012 1:46 PM in response to FrenchToast
    Level 3 (645 points)
    Apr 1, 2012 1:46 PM in response to FrenchToast

    (Feels strange replying to my own post... Is this how schizophrenia starts?) (Anyway...)

     

    Though technically there's no archiving-and-installing in Snow Leopard as it existed on previous versions of OS X, some users claim they've performed SL clean installs without actually losing any personal data. I'm more than circumspect about this, but there's a way to back-up your personal data after booting from the install disk.

     

    Once you've booted from the install DVD, and after selecting your install language, you'll reach a screen that looks like a Desktop. Click on Utilities, then on Terminal.

     

    In the Terminal window, type "cd /Volumes/MacintoshHD" (supposing your startup volume name is "MacintoshHD", which is the name the OS X installer will give it natively) and press Enter;

     

    At the next prompt, type "mkdir PersonalData" and press Enter. This will create a new folder at the root of your MacintoshHD volume.

     

    Type "mv /Volumes/MacintoshHD/Users/Your_Account/ ./PersonalData/" (there IS a space between "Your_Account/" and "./PersonalData/"; don't forget the period before the slash in the latter's name), then press Enter.

     

    This should create a hidden folder in your MacintoshHD volume called PersonalData, and move (the "mv" command) the content of your home folder into it. Depending on the amount of data, this could take a while, so wait until you see the prompt sign again before proceeding with the OS X install, after exiting Terminal.

     

    HTH...

  • by Serenna,

    Serenna Serenna Apr 10, 2012 9:19 AM in response to Serenna
    Level 1 (0 points)
    Apr 10, 2012 9:19 AM in response to Serenna

    Thank you for all your replies, I finally been able to boot on a osx snow leopard DVD. I Mounted the usb key where Pacifist is on but it doesn´t appear anywhere, how can I open it with the terminal ?

  • by FrenchToast,

    FrenchToast FrenchToast Apr 10, 2012 9:56 AM in response to Serenna
    Level 3 (645 points)
    Apr 10, 2012 9:56 AM in response to Serenna

    If you can boot from the DVD, why don't you reinstall Snow Leopard integrally? It's always best to start anew than to patch an unstable system. In this case, you don't need Pacifist. Use the USB thumb drive to back up your personal data, then reinstall OS X.

     

    Use the command I mentioned in my next-to-last post to create a folder on your hard drive too. Just to be on the safe side.

     

    Oh, and, have I told you never to delete... Oh, I have, haven't I?

  • by pannous,

    pannous pannous Apr 8, 2015 12:29 PM in response to Serenna
    Level 1 (0 points)
    Apr 8, 2015 12:29 PM in response to Serenna

    This quick recovery worked for me:

    Boot into recovery mode (CMD+R)

    Open Utils->Terminal

    cp -r /private/var/folders /Volumes/Mac/private/var/

    reboot

first Previous Page 3 of 3