How to get rid of "The disk you inserted was not readable" and auto ignore it? (without installing apps) whenever I plug in an ext4 partition type external USB drive, this message will pop up. and then I need to press "Ignore" to ignore it. This is very annoying. How can I auto ignore it? 

I did google this for hours and can not find a proper solution. I don't want to install any non open source apps for doing such a simple task. I think it should be doable by changing some config files. 

PS: If you are curious why I want to plug in ext4 drive, because I will later use it with a linux VM (virtualbox+vagrant). 

Thanks a lot for your help.

Edited: I don't want to disable automount for all types of drives. I just want to ignore ext4 popup or that specific drive. Cheers.
Due to no answer yet, I did find a workaround and want to share here.

(1) Resize the external drive and create a small 100MB Apple_HFS typed partition on it. (label the partition with the name dummy).

Explanation: Since there is a recognized readable partition in the external drive now, there will be no warning popup at all and will auto mount it as /Volumes/dummy/. 

(2) Create a shell script in the PATH with the name vagrant-up.sh which has the following content:


diskutil umount /Volumes/dummy/ && cd ~/vagrant/myVM/ && vagrant up


So to run my vm, simply execute vagrant-up.sh.

That's all. It works well so far.