Friday, September 15, 2017

macos - How can I remount an ejected (not just unmounted) USB drive on Mac?



I frequently eject an usb stick, and then realize I still need it.



If I unmount the drive in Disk Utility, I can just remount it, but if I eject, it's gone.





  • Not showed in Finder

  • Not showed in diskutil

  • Not showed in ls /dev

  • Is still showed in System Information under USB.



How can I mount the disk without unplugging and inserting it?


Answer



You can remount an ejected hd using "hdiutil attach" and the appropriate /dev/ device (the BSD name under System Information). As you said, this does not work for flash drives (the /dev/ device will disappear).




kextunload IOUSBMassStorageClass.kext;
kextload /System/Library/Extensions/IOUSBMassStorageClass.kext


Will unmount and remount all USB storage devices...


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...