Changing the mountpoint from /Volumes to /mnt

rbuenger

Registered
I just would like to share my latest experiment with you because I haven't found any page in the internet explaining how to do this. Most pages even tell that it's impossible or recommend to use symlinks as a replacement.

But first a warning: I can't provide longtime results or guarantee that this is working for you. But at least it's working for me and a second person with 10.3.9.

I've changed the mountingpoint from /Volumes to /mnt to have a more *nix like system. (I also changed /Users to /home etc but thats another story ;) ).

First you have to create a folder /mnt and change permissions to match those of the /Volumes folder. Than you have to use a hex editor (I'm using HexEdit) to open /usr/sbin/diskarbitrationd and change the string /Volumes to /mnt at offset &h14994. Don't forget to replace the remaining 'umes' with zeros (in the hex part not with the char '0'). Also watch out to really replace the existing chars and not inserting something. Be sure to check filelength bevor and after modification as the length must be the same.

A bit better would be to first save a backup and modify this file (for example /usr/sbin/mydiskarbitrationd) and replace the call of the original filename with the modified in /etc/mach_init.d/diskarbitrationd.plist. This way it's easy to change it back in singleuser mode just for the case something isn't working after this change.

The good news is that after reboot all my volumes appeared in /mnt and are visible (and working) in PathFinder (and Finder). Same with dmg images that now get mountet in /mnt. So far no problem after completely deleting the /Volumes folder.

And bevor somebody complains why I change this or where the benefit is: It's just for fun ;) I don't like the way Apple changed all this and would like to have it the way it should be for a *nix. But it's just a 'cosmetic' change. Maybe a bit more safety if sometimes a virus try to delete everything in /Volumes but that's just theory.
 
Hm, hardcoded mountpoints in a binary. Ugly, and (sadly) Apple-like.

Do you happen to know if diskarbitrationd is part of Darwin?

Anyway, a cool result. Thanks for posting
 
Back
Top