Select Page

Mounting USB Drive in Single-User Mode

by | Dec 28, 2006 | 27 comments

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.

 

27 Comments

  1. Dennis

    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.

    Reply
  2. Kawika

    Sadly, this did not work for me. The mount command gave some “UFS file system not available” error.

    Reply
  3. Dave

    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/

    Reply
  4. Alexa Mosholder

    Very detailed post can i translate into Spanish for our sites visitors? Thanks

    Reply
  5. Phylicia Bordges

    Usefull article would it be OK if i translate into Greek for our blogs viewers? Thanks

    Reply
  6. Vincent

    Thanks a lot. It did work very well.
    Was a great help.

    Reply
  7. Lukas

    This is ingenious!
    You’ve helped me solve my problem mate, thanks!!
    Printing this page now for future reference 😉

    Reply
  8. Adam

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

    Reply
  9. Johnnie Bevilacqua

    I like what you guys are doing. Such smart work and reporting! Keep up the superb works guys. I have incorporated you guys to my blogroll. I think it will improve the value of my site. 🙂

    Reply
  10. Bastiaan Boertien

    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.

    Reply
    • patrick

      That’s a great tip, Bastiaan. Thanks!

      Reply
  11. Phil

    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!

    Reply
  12. Laura Cavanagh

    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.

    Reply
    • Patrick

      Hi Laura,

      I’m glad this post has helped you! Good point about using the recursive command (-R) with cp.

      Thanks for the comment.

      Reply
  13. Ricardo Ramiro

    Hi Patrick,

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

    Reply
  14. Patrick

    Ricardo, I’m glad this post helped.

    It seems that this information has been useful to many folks since I posted it back in 2009.

    Reply
  15. Candace

    “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

    Reply
  16. sergio

    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

    Reply
  17. Martin

    Fantastic explanation!

    Reply
  18. Lon

    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.

    Reply
  19. PeZ

    Kudos!

    My man! You save the day. I was able to recover all my files when my MacOS wouldn’t.

    Thanks a bunch!

    Reply
  20. Daniel

    What if I get this after trying to create a sharepoint:

    mkdir: /Volumes/usb: Read-only file system

    ???

    Reply
    • Daniel

      Actually, the message I’m getting is

      mkdir: /Volumes/usb: File exists

      and nothing is created

      Reply
  21. Jason

    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

    Reply
  22. BobbyP

    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?

    Reply

Leave a Reply to Laura Cavanagh Cancel reply

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

Available for Amazon Prime