Mounting USB Drive in Single-User Mode

I recently encountered a Mac that would not boot properly. However, it did boot into single-user mode and allowed access to the file system via the command line interface. Since I had recently purchased an external, portable USB drive, I wanted to offload my important files to the USB drive before reformatting and reinstalling a fresh system.




Here are the steps I took:

  • Connect USB drive to Mac and boot into single-user mode (cmd-s)
  • At prompt type:
    /sbin/mount -uw /

    then hit return

  • At prompt type:
    /sbin/fsck -fy

    then hit return

  • At prompt type:
    ls /Volumes

    then hit return. This should provide a list of mounted volumes. It’s likely that your USB drive will not show. If this is true, then you will need to create a sharepoint in the /Volumes directory. You do this by using this command (in this case, we are creating a directory called “usb”):

    mkdir /Volumes/usb

    then hit return

  • Next we need to identify the disk number of the USB drive. This is done with this command:
    ls /dev/disk*

    then hit return. The system will list the disks like this:

In most cases, the USB drive will be the last disk number listed (in this case: disk0s3).

  • Now, to mount this disk to your sharepoint, type the following command:
    /sbin/mount_msdos /dev/disk0s3 /Volumes/usb

    then hit return. NOTE: In this case, we are using disk0s3 since it is the last listed. Yours will likely be different. Also note that my Western Digital USB drive uses the msdos format. Yours may not.

  • If this is mounted properly, you will be able to see the contents of your USB drive by using this command:
    ls /Volumes/usb

    then hit return

  • If you have successfully mounted the USB drive, you may now copy files using the cpcommand. (In this example, I will copy a file named “testfile” and assume the Mac has a volume named MacHardDrive.) For example:
    cp /Volumes/MacHardDrive/testfile /Volumes/usb/

    then hit return.

You can use this method to copy entire directories from your ailing Mac to the USB drive. In my case, I copied the entire user account directory over to the USB drive so I would keep settings, mail, music, pictures, and files in my Documents directory.

 

30 Comments

  1. nice work; makes me wish i had an external usb drive to deal with this problem i’m having with my eMac. sadly the instructions don’t seem to work with flash drives. spits out the old permission denied message. can otherwise make directories however…so it’s a start i guess.

  2. Thanks for this guide!! It helped me save my hackintosh install. I needed to replace a kext file from a USB drive, back into the /Extensions dir. It worked great.

    For kext’s, I had to use this command to copy the kext to my OSX install…
    cp -R /Volumes/usb/Example.kext /System/Library/Extensions/

  3. Pleasee help!!! This has been the best solution so far in terms of progress, and it all seems fine and I can see what folders are in my USB, but I need to know what to exactly type in to copy my entire memory since whenever I try I get many different characters like [-L and [-H and 2 long sentences similar to this. And i would like to know how i should know that copying the entire data has completed after inputting the copy command….Please help I need all the data this week..
    Thanks a lot!!

  4. Thank you guys for his post. I found it through google and my hard drive had error 5 (with diskutil reperairvolume) in the system folder only. Because of this error I wasn’t able to boot the system even safe boot didn’t work. This was the solution to save my home folder on the external drive. With a new hard drive installed I was able to set everything back to the way it was.

    Again thanks you.

    TIP: maybe because this post is a few years old on my system I needed to mount /dev/disk1s2. The easiest way to find the right volume to mount is booting in single user mode without the usb external drive attached to your machine. When the first steps are completed then type ls /dev/disk*, then attach your drive to the system and do ls /dev/disk* again. Now compare the two result and the disk that wasn’t shown the first time is your usb drive.

  5. My girlfriend’s macbook pro wouldn’t boot, big assignment due on Monday. Everything backed up except for the assignment. Laptop wouldn’t boot in safe mode nor from DVD. Bought a firewire cable and tried target disk mode, the disk came up only in disk utility and couldn’t be verified or repaired.

    This saved her a lot of pain, huge thanks!

  6. hi Patrick,

    I just want to say thank you so much! You just saved me two days work and countless personal documents and photos when my mac failed to start after an upgrade.

    I searched for solutions to this problem but since I don’t have another mac it seemed that my only option was to lose my data. Every other site told me that there was no hope and that I would not be able to reach my data.
    This site saved me time and allowed me to keep so many valuable photos and documents.

    Btw, I used -r as an option in cp to copy directories and that allowed me to copy almost everything in just a few commands.

  7. Hi Patrick,

    Thank you very much for posting this. It pretty much saved my day from a way larger disaster!

  8. “Western Digital USB drive uses the msdos format. Yours may not.” Hi, if mine does not, how do I find out what it is? are there only a few choices and I can experiment? Thanks

  9. Dears,
    can anyone help me ? I tried the procedure as my disk is corrupted. My problem is that after the boot in single user mode, the external device is not listed therefore I cannot mount it. When i look at the ls /dev/disk* i see disk0 disk0s1 disk0s2. The BSD boot is on the disk0s2.
    Thank you for any suggestion
    Sergio

  10. I was able to use these directions to mount my USB flash drive and get files off that I needed. Thanks for the well written instruction steps.

  11. Thanks!!!! My 2 year old pushed my laptop off the table and cracked the screen and I guess damaged something else because it would freeze on the startup screen. Anyways I didn’t have any backups of pictures, music, and other files. BUT I do now.

    Directions were perfect

    THANKS AGAIN

  12. Anyone know why when I try to cd into a partition in the internal drive in Single User Mode, i can’t see the files in the Volume -> instead I see .autodiskmounted?

Leave a Reply

Your email address will not be published. Required fields are marked *

What is 13 + 9 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)