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

Single-user mode: How to mount and access an external USB drive?

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)

Posted on Mar 10, 2010 5:01 PM

Reply
9 replies

Mar 10, 2010 9:22 PM in response to trentl4

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?

Mar 10, 2010 10:29 PM in response to trentl4

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.

Mar 11, 2010 11:14 AM in response to trentl4

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

Mar 16, 2010 4:59 PM in response to trentl4

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!).

Single-user mode: How to mount and access an external USB drive?

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