Done this before some time ago, and I've forgotten about it. Then the issue bites back at me. So might as well blog it in case I forget again. I looked around on the net, and most of the solutions were pointing me to disabling MSC instead of MTP.
In Debian (or probably other Linux desktop as well), the computer will identify this device as MTP, and preventing it to be mounted as MSC.
So what I'm doing here is to not let HAL identify the device as MTP. The file at/usr/share/hal/fdi/information/20thirdparty/20-libmtp8.fdi has the entries for the different mp3 players. Just comment out the entry for your device.
find /usr -name *libmtp*
Can't find your device in the list? lsusb would give you the ID, my device gives:
Bus 002 Device 002: ID 054c:0385 Sony Corp.
Then find the corresponding entry in 20-libmtp8.fdi and comment out the entire entry by adding at the end.
Maybe there's a better way of doing this (blacklisting the mtp module? or just delete the fdi file?), as that fdi file could get updated from system updates. If you know a better solution, let me know. :)