The last two of these do not hold up after using "Erase" again in Disk Utility (i.e., they create a partition), so I don't think that it's a reproduction of what you were doing. Using the command "dd if=/dev/zero of=/dev/disk2 bs=1 count=(size of disk)" then use the "Erase" function of Disk Utility to reformat.
#Mac not detecting usb how to
Now the question is how to get a drive back INTO the state where there was no partitioning at all. Okay, so that's good to know that the hunch for partitioning was correct.
#Mac not detecting usb code
If you cannot think of a way to improve the logic to work around this issue, my suggestion is that you document in your release notes or in the readme, that your code is looking for "FAT" in the output of diskutil, and so the user needs to verify that FAT is in the TYPE field, and format the drive in such a way that the TYPE is FAT/FAT32. In that state, you will not have a match on "FAT" as a pattern because it would not be there at all to be matched.unless you set the name!īut when the drive is formatted a different way, the TYPE field is correctly written and WILL contain the "FAT" string pattern so that the name is no longer needed to match. In the "bad" state, there is NO type listed by diskutil: It seems like my drive (and others based on that other issue thread) can get into a state where a basic fat/MBR format doesn't produce the correct disk state for unetbootin to see the drive as a valid candidate.and somehow changing the name to "FAT32" is a workaround. Here it is post reformat as you requested:Īnd unetbootin DOES see the drive, even though the name is "UNTITLED"!Īlso now this is the output from disktuil: I chose to reformat the entire drive, not just the "untitled" partition because you requested MBR, which is only an option if I format the entire drive.I do not get that option if I only reformat the untitled partition. Initialized /dev/rdisk2s2 as a 30 GB case-insensitive HFS Plus volume with a 8192k journal
#Mac not detecting usb mac os
#diskutil partitionDisk /dev/disk2 GPT JHFS+ UNTITLED 0bįormatting disk2s2 as Mac OS Extended (Journaled) with name UNTITLED Here is "diskutil list" from before the command:Ģ: Apple_CoreStorage Macintosh HD 499.4 GB disk0s2ģ: Apple_Boot Recovery HD 650.0 MB disk0s3Ġ: Apple_HFS Macintosh HD +499.1 GB disk1