Skip navigation

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

6932 Views 34 Replies Latest reply: Apr 10, 2012 9:56 AM by FrenchToast RSS
1 2 3 Previous Next
Serenna Calculating status...
Currently Being Moderated
Mar 14, 2012 2:22 PM

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)
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Mar 14, 2012 2:25 PM (in response to Serenna)

    You will have to reinstall Snow Leopard.

     

    Reinstall OS X without erasing the drive

     

    Do the following:

     

    1. Repair the Hard Drive and Permissions

     

    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.

     

    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

     

    2. Reinstall Snow Leopard

     

    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.

     

    Download and install the Combo Updater for 10.6.8 from support.apple.com/downloads/.

  • Limnos Level 8 Level 8 (36,585 points)
    Currently Being Moderated
    Mar 14, 2012 2:29 PM (in response to Serenna)

    If the files are still in trash you should be able to boot to Single User Mode and replace them with a move (mv) command, but it would take me a long time to work out the details.  Maybe somebody else who is more regularly familiar with using Terminal and is actually running a copy of Snow Leopard (I use Tiger) could help.

    G4 Quicksilver 2x1GHz 250/120GB HDs, Mac OS X (10.4.11), OS9.2.2, iTunes7.5, QT7.4&QTP2.5.1
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Mar 14, 2012 2:30 PM (in response to Limnos)

    He's already deleted them, so no way to restore them from the Trash.

  • Limnos Level 8 Level 8 (36,585 points)
    Currently Being Moderated
    Mar 14, 2012 2:38 PM (in response to Kappy)

    the whole folder to the trashbin and then I emptied it. Files that were in use weren´t deleted.

    Or at least put back the files that are still in the trash bin

    Sorry just registered the second part. Yes, reinstall SL.

  • Limnos Level 8 Level 8 (36,585 points)
    Currently Being Moderated
    Mar 14, 2012 2:40 PM (in response to Serenna)

    If you borrow a DVD it will have to be either a retail version or she/he has to have a computer identical to the one you have.  Discs that came with a Mac will only work in that model.

  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Mar 14, 2012 2:41 PM (in response to Serenna)

    No, you need to have everything replaced that was deleted, not just those in use.

  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Mar 14, 2012 2:48 PM (in response to Limnos)

    If they borrow a disc it's possible to replace just the deleted directory using Pacifist:

     

    How Restore Deleted or Missing OS X Components

     

    A few of the basic OS X installed applications can be restored from the Optional Installs installer located in the Optional installs folder on your Installer DVD.  However, if what you need is not there then follow the instructions below.

     

    How to Use Pacifist to Restore Deleted or Missing OS X Components

     

    Insert the OS X Installer DVD into the optical drive.  Use a simple utility like TinkerTool to toggle invisibility so you can see invisible items.  Alternatively, open the Terminal application in your Utilities folder and at the prompt enter the following:

     

    defaults write com.apple.finder AppleShowAllFiles Yes

     

    Press RETURN.

     

    To turn off the display of invisible files repeat the above command substituting No for Yes.

     

    The install packages are located in the /System/Installation/ folder on the DVD.

     

    Download the shareware utility Pacifist. Use it to extract a fresh copy of the missing item(s) from the file archives on your OS X installation DVD. The file archives are in the /System/Installations/ folder (use Go to Folder option in the Go menu of the Finder.)

     

    Here are Four Basic ways to use Pacifist (courtesy of George Orville.)

     

    1. Drag a .pkg icon onto the Pacifist window .....proceed to step 7.
    2. Click on “Open Package ....” and navigate to package desired and click “Open” in the open/save window.....proceed to step 7.
    3. Insert Mac OS X installer CD and when it mounts, navigate to .... Menu->Go->Go to Folder. In the path field enter or paste ....

     

    /Volumes/disc name/System/Installation/Packages (where disc name is the name of the CD/DVD that you inserted.)

     

    Click on the  "Go" button ..... • Drag a .pkg to Pacifist..... proceed to step 7.

     

    The package you'll need will have to be discovered by trial and error, but for most applications you should start with the Essentials.pkg and/or Additional Essentials.pkg.

     

    D. Insert your Mac OS X install disk 1 .... and open Pacifist.

     

    1.          In Pacifist, select "Open Mac OS X Install Packages" ... dialog may appear asking for disk 2, then disk 3 and finally disk 1 again.... {if DVD is not used)...If “Stop Loading” is selected...the procedure will stop!!!

     

    2a. When loading is complete, a new window appears, click the triangle to display contents of each package...Select item and proceed to step 7.

     

    2b.          or click the “Find” icon in the Pacifist window and type the name of the software you need.

     

    3.          In the list that comes back, click the top most entry for the item that you want. ..... that is the one for the English language.

     

    4.          On the top of the Pacifist window, click “verify” .... you will probably be prompted for your password.

     

    5.          Enter checks for.... “verify permissions” and “verify file contents.” and click “verify” ....enter password when prompted.... you will get back output which may look like this:

     

              20 files were scanned. 20 of 20 files were present on the hard disk. 0 of 20 files had file permissions that did not match those specified in the package. 0 of 20 files had checksums that did not match those specified in the package.

     

    6.          Click “close”. Go to step 7.

     

    Extract or Install........

     

    7.          In the Toolbar (upper left), you now have the option to extract or install. Click a file in the lower list and those two icons will be enabled.

     

    8.          If “Extract to...” is selected.... navigate to the location where the file will be placed, select “choose”, select “extract” in new dialog that appears,authenicate , if prompted, click “OK”.

     

    9.          In the next dialog, click “Extract”.

     

    10.          If “Install” is selected... dialog will appear with the location/path of the installed software. Click “Install”

     

    11.          Type in your password, click “OK”

     

    Pacifist will begin to extract files.

     

    12.          In steps 8/10ß.... you also have the choice to “cancel”

     

    Notes:          Pacifist may find that a file it is installing already exists on the hard disk. Pacifist will present you with an alert panel....

     

    • Stop
    • Leave original alone
    • Update .....
    • Default selection
    • Replace .... (Replace option should only be used on full install packages)
  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Mar 15, 2012 10:45 AM (in response to Serenna)

    The procedure requires you use Pacifist to reinstall the entire folder whose contents you deleted. This is done by carefully following the directions I sent you.

     

    From your description I don't know what you did. If you booted from an installation disc, then all you can do is reinstall OS X from it.

  • Limnos Level 8 Level 8 (36,585 points)
    Currently Being Moderated
    Mar 15, 2012 10:59 AM (in response to Serenna)

    When I boot with the installation dvd of a friend it says to reboot the mac and then the turning wheel with apple logo appear again, so it's not working.

    Note what I said earlier about borrowed DVDs.

  • Kappy Level 10 Level 10 (221,025 points)
    Currently Being Moderated
    Mar 15, 2012 11:17 AM (in response to Serenna)

    Then I would find a suitable installer disc for your computer and reinstall OS X. You will need the same version as you now have installed or later. Otherwise, you will need to erase the drive to install a different point version (like 10.6 versus 10.7.)

     

    For Snow Leopard do this:

     

    Reinstall OS X without erasing the drive

     

    Do the following:

     

    1. Repair the Hard Drive and Permissions

     

    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.

     

    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

     

    2. Reinstall Snow Leopard

     

    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.

     

    Download and install the Combo Updater 10.6.8 from support.apple.com/downloads/.


1 2 3 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.