9 Replies Latest reply: Mar 16, 2010 5:24 PM by baltwo
trentl4 Level 1 Level 1 (0 points)
My MacBook Pro HD is acting up. Cannot boot normally or into "safe mode". Cannot reinstall OS without wiping out the HD. Need to recover some critical files but DiskUtil First Aid and Restore options cannot successfully complete. Problem traced down to "invalid node structure" which means I either have a hardware problem or my filesystem partition directory structure is corrupted. I need to recover some files that are not backed up (timin issue with my regular backup process).

I can boot into single-user mode, mount the root file system (/sbin/mount -uw /) and can see/navigate the rot filesystem structure via good UNIX command line. Here's what I would like to do (in single-user mode):

1. Mount an external USB drive (250 GB already formatted as Mac OS X Extended)
2. Copy various files and/or directories from my HD to the external USB drive (UNIX cp command)

I realize I could go spend $$ for the Disk Warrior or Data Rescue products (or something similar) that SHOULD help me recover my HD or files, but it seems silly to do this when I can see, touch and taste them from within single-user mode....

Comments? Suggestions?

TIA --
Trent

P.S. Once I've recovered my files, I'll try to reformat the HD and then reinstall the OS. And THEN go have Apple look at my machine (thank goodness for AppleCare coverage)!

MacBook Pro, Mac OS X (10.5.8)
  • baltwo Level 9 Level 9 (61,825 points)
    For Unix stuff, post to the Unix forum under OS X Technologies.
  • iyacyas Level 4 Level 4 (1,535 points)
    If you have a buddy with a Mac (with firewire) you could put your MBP into Target Disk Mode (TDM) and connect it to another firewire Mac via firewire cable and maybe copy your files this way.

    May even be able to tun "Repair Disk" from their Disk Utilities.
  • trentl4 Level 1 Level 1 (0 points)
    Iyacyas,

    I've already connected the the "bad" MBP with a "good" MBP via Firewire. Unfortunately, Apple's DiskUtil behaved similarly as when booting the "bad" MBP with an installation DVD - it was unable to resolve the HD issues either way and in fact displays the "bad" HD in light grey when connected via Firewire.

    Should the "bad" MBP's HD show up in Finder?
  • trentl4 Level 1 Level 1 (0 points)
    Posted to Mac OS X Technologies > UNIX forum
  • V.K. Level 9 Level 9 (56,130 points)
    trentl4 wrote:
    My MacBook Pro HD is acting up. Cannot boot normally or into "safe mode". Cannot reinstall OS without wiping out the HD. Need to recover some critical files but DiskUtil First Aid and Restore options cannot successfully complete. Problem traced down to "invalid node structure" which means I either have a hardware problem or my filesystem partition directory structure is corrupted. I need to recover some files that are not backed up (timin issue with my regular backup process).

    I can boot into single-user mode, mount the root file system (/sbin/mount -uw /) and can see/navigate the rot filesystem structure via good UNIX command line.


    it's quite strange that you can boot in single user mode but can not access this drive any other way. even if you can't repair the drive while booted from the install dvd or from another mac you should be able to access files on that drive and copy them to the external. have you tried that? anyway, to mount a USB drive in single user mode you need to know its device number.
    run

    ls /dev/disk*

    in SUM. it will list all available devices. you are looking at something with the name like disk2s2 or similar. let's say it's disk2s2.
    then create a mount point and mount the drive to it.

    mkdir /volumes/mnt
    mount_hfs /dev/disk2s2 /volumes/mnt

    this assumes that the USB drive is formatted HFS+.

    Here's what I would like to do (in single-user mode):

    1. Mount an external USB drive (250 GB already formatted as Mac OS X Extended)
    2. Copy various files and/or directories from my HD to the external USB drive (UNIX cp command)

    I realize I could go spend $$ for the Disk Warrior or Data Rescue products (or something similar) that SHOULD help me recover my HD or files, but it seems silly to do this when I can see, touch and taste them from within single-user mode....

    Comments?

    you asked for it getting or not getting Disk Warrior is up to you. it's a nice tool but you can live without it. however, what is not debatable and something you can not live without is a backup. it's pretty clear you don't have one. there is no excuse for not having a backup these days given prices of external drives. if you had a backup you would not be facing this situation at all.
  • trentl4 Level 1 Level 1 (0 points)
    VK,
    Thanks for the underlying UNIX CLI ideas. However, chastising me for not having a backup (which is erroneous) is inappropriate. I do actually run regular weekly backups and in fact test them on a monthly basis. Unfortunately, the timing of my HD/filesystem problem is such that I have 5+ days worth of activity that haven't yet made it into my weekly backup cycle, hence my original post which did allude to my backup "timing" issue....
    Trent
  • baltwo Level 9 Level 9 (61,825 points)
    Thanks for clarifying. However, your allusion escaped me and V.K.'s chastisement was, IMO, appropriate. That said, I strongly suggest that you rethink your backup strategy. Weekly didn't cut it in this instance and more frequently would appropriate.
  • trentl4 Level 1 Level 1 (0 points)
    Resolution:

    1) Boot system in single-user mode (SUM) with external HD attached.

    2) Execute the following UNIX CLI commands once SUM boot process is completed:
    # fsck -fy
    # mount -uw /
    # mkdir /Volumes/target_directory
    # mount -t hfs -w /dev/diskXXX /Volumes/target_directory
    # cp -RXv /source_directory /Volumes/target_directory
    Where XXX is the device-level name for your external HD's data partition. In my case this was /dev/disk1s2. It may take some experimentation to identify this device name if your system has multiple HD's.

    3) Verify contents were successfully copied onto the /Volumes/target_directory.

    Comments and observations:
    Do NOT use "/" as your source directory - cp will make a second (redundant) copy of /volumes/target_directory
    I was able to successfully copy ALL files off my HD despite the fsck command's "invalid node structure" error message with this simple procedure. YMMV, depending on the state of your HD.
    The repeated disk0s2: I/O error warnings displayed during the SUM boot process did not seem to have a negative effect on this procedure. I also received this same error warning intermittently as I navigated the mounted filesystem did not seem to be a problem, either. Again, YMMV.

    Commercial software:
    I downloaded ProSoft Engineering's Data Rescue 3 product (trial version) before spending $99 to attempt to recover my "bad" HD's data via mounting to a good system with FW target mode. It could not successfully complete its "QuickScan" process and immediately hung on block 0 of 390M during its "Deep Scan" process. The product did seem to function properly on an operational system. ProSoft's technical support was responsive and helpful but had no answer for my "Deep Scan" error.

    I did not attempt to use Alsoft's Disk Warrior 4 product. I could not find any trial software available and was reluctant to spend $100 based upon the mixed reviews and comments on this discussion forum as well as other reviews. Alsoft does claim to address the "invalid node structure" error in their marketing materials. Hindsight being 20/20 - I saved $100 by using this simple procedure.

    Final note:
    Neither Leopard nor Snow Leopard's installation DVD could recognize the bad internal HD when trying to do a reinstall. While DiskUtil was able to "see" the bad internal drive it immediately failed when I tried to do an "erase and format". Took the system to my local Apple store and the Genius ran a tool called "SMART Utility" from Volitans Software (www.volitans-software.com). SMART utility confirmed that my HD was bad so it was replaced. AppleCare pays for itself (once again!).
  • baltwo Level 9 Level 9 (61,825 points)
    Thanks for the detailed feedback. Good computing.