Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Mount USB Memory Sticks in single user mode System
Boot in single user mode (hold Command-S during boot). Check the file system by typing /sbin/fsck -y. Then mount the root volume with write permissions by typing mount -uw /.

Create a mount destination by typing mkdir /Volumes/MS (MS=Memory Stick). List the contents of /dev by typing ls /dev. Insert the Memory Stick (you will receive visual confirmation when your stick is HFS formatted). Now list /dev again with ls /dev. See the difference? In your second listing, you should see an additional entry for either disk1s1 or disk1s2 -- this seems to depend on the file system on the Memory Stick.

Now mount the Memory Stick, with a different method depending on its formatting:
  • File system is standard Windows/DOS = FAT16:
    mount -t msdos /dev/disk1s1 /Volumes/MS
  • File Ssystem is standard Mac FS = HFS
    mount -t hfs /dev/disk1s2 /Volumes/MS
The flag -t msdos/hfs determines the file system of the stick. If not specified, mount in single user mode defaults to UFS.

[robg adds: I can't verify this one, but it seems like the standard method of mounting any removable disk in single user mode...]
  • Currently 4.56 / 5
  You rated: 5 / 5 (9 votes cast)

Mount USB Memory Sticks in single user mode | 4 comments | Create New Account
Click here to return to the 'Mount USB Memory Sticks in single user mode' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mount USB Memory Sticks in single user mode
Authored by: afuchs on Jul 21, '03 06:30:16PM

It IS the standard method. However, I have been on a MacOS Server 10.2 course recently and nobody appeared to know that, so I thought might be worth posting ;-)

[ Reply to This | # ]
Mount USB Memory Sticks in single user mode
Authored by: literarybill on Apr 26, '10 10:56:17AM

FYI: For this to work you must plug the USB key into the machine BEFORE BOOT. Otherwise the single-user mode kernel will not create the disk device.

Hopefully this will save folks 1-2 hours of futzing around.

[ Reply to This | # ]
Mount USB Memory Sticks in single user mode
Authored by: abeness on Nov 17, '10 07:22:08PM

An update for 10.5.x: Whether you plug the drive in before booting to single-user mode or after, the drive doesn't seem to show up in /dev here. It DOES in 10.6.x.

What worked for me in 10.5.8 was to load kernel extensions after plugging in the drive:

mount -uw /
launchctl load /System/Library/LaunchDaemons/

[WAIT approx 30 seconds: various log messages scroll by; after the "kernel link data" error re: /var/run/mach.sym existing already, I continued:]

mkdir /Volumes/usb
mount -t msdos -v /dev/disk1s1 /Volumes/usb

This was on a MacBook with no other disks present, so disk0 was the internal HDD, and I had already determined that disk1 was the flash drive. disk1s1 was the single MS-DOS FAT16 data partition on that drive; hence the "-t msdos" parameter, above. Refer to the man page for mount for other options relevant to other file systems.

If you're on a system with multiple internal disks, you may want to review the disks present in /dev before loading the kexts:

ls /dev/disk*

Then load the kexts as above, then rerun

ls /dev/disk*

and compare to learn the disk ID of your flash (or other) drive.

Note also that the "root" of each physical disk appears as disk0, disk1, disk2, etc. Those entries are not mountable or accessible. They are the command-line designation of the top-most entry of a disk as listed in Disk Utility's GUI, beneath which the disks data partitions are displayed. Data partitions are labeled e.g. disk0s1, disk0s2, disk1s1, etc.

One more note: you can in fact continue typing your command despite being interrupted by new log messages that crop up (e.g. diskarb errors). It can be tough to keep track of where you are in your command, but if you continue to type it correctly, it will execute.

In 10.6.x, if the drive is connected prior to booting into single-user mode, you need only mount it as usual ("mkdir" and "mount" lines, above, modified to reflect the ID of your drive).

An aside: the reason I wanted to mount a flash drive here was to be able to run a shell script that reset a clean install after initial setup/login/updates back to "out-of-box" no-users, Apple Setup Assistant state. See my comment to "10.5: How to reset Leopard back to the setup assistant" here: (can't seem to pin down the link: code syntax, sorry!).


[ Reply to This | # ]
Mount USB Memory Sticks in single user mode
Authored by: mobibob on Jul 06, '11 12:03:22PM

Is this still valid in July, 2011 on a new MacBook Pro?

I was not able to mount the root volume with write permissions. Without that, I could not mkdir, thus mount the USB stick.

I am trying to save-off files from a corrupted fs so I can reformat the HD and move on.

[ Reply to This | # ]