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:

    disks.gif

    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 cp command. (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.

 
 

3 Responses to “Mounting USB Drive in Single-User Mode”

  1. Dennis says:

    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. Kawika says:

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

  3. Dave says:

    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/

Leave a Reply