Mounting USB stick in single-user mode: unsupported sector size (0)
-
30-04-2021 - |
Question
I'm trying to mount a USB stick in single-user mode (thankfully there's nothing wrong with my Mac, I'm just trying some stuff out). These are the commands I've been running:
$ mount -uw /
$ mkdir /Volumes/drive
$ mount -t msdos /dev/disk2 /Volumes/drive
mount_msdos: Unsupported sector size (0)
The USB drives connects to my system properly and is visible in /dev/. I've reformatted the drive as HFS and got the same error message. I've also tried another USB stick formatted in both FAT32 and HFS, to no avail. I assume this must mean that I'm doing something wrong here, but a quick Google search shows that most people succeed using this approach.
I'm running MacOS Sierra 10.12.6 on a mid 2012 MacBook Pro.
Solution
How about formatting the usb stick with exFAT format. That works for me where I have to copy/read in both my mac and windows OS's
OTHER TIPS
It looks like there is already an accepted answer, but anyway, for those who are hitting that page from the search, here is my solution:
It looks like the issue is that you are trying to mount the disk instead of the partition:
check it with ls /dev/disk*/
. In my case, the output was:
~ » ls -l /dev/disk* dennisp@MacBook-Pro
brw-r----- 1 root operator 1, 0 Feb 15 15:39 /dev/disk0
brw-r----- 1 root operator 1, 1 Feb 15 15:39 /dev/disk0s1
brw-r----- 1 root operator 1, 2 Feb 15 15:39 /dev/disk0s2
brw-r----- 1 root operator 1, 3 Feb 15 15:39 /dev/disk1
brw-r----- 1 root operator 1, 4 Feb 15 15:39 /dev/disk1s1
brw-r----- 1 root operator 1, 5 Feb 15 15:39 /dev/disk1s2
brw-r----- 1 root operator 1, 8 Feb 15 15:39 /dev/disk1s3
brw-r----- 1 root operator 1, 6 Feb 15 15:39 /dev/disk1s4
brw-r----- 1 root operator 1, 9 Feb 15 15:39 /dev/disk1s5
br--r----- 1 root operator 1, 10 Feb 15 15:39 /dev/disk1s5s1
brw-r----- 1 root operator 1, 7 Feb 15 15:39 /dev/disk1s6
brw-r----- 1 root operator 1, 11 Feb 24 12:11 /dev/disk2
brw-r----- 1 root operator 1, 12 Feb 24 12:11 /dev/disk2s1
so, the resolution for me was to:
sudo diskutil unmountDisk /dev/disk2
and then
sudo mount -w -t msdos /dev/disk2s1 /Volumes/UNTITLED