2

I've got several partitions on my HDD, one of which I intend to use as a shared home partition between a native Linux installation (yet to come) and a one in a VirtualBox which I recently installed. I managed to tell VirtualBox to present that partition as a virtual disk1. Luckily, Linux has no trouble creating a file system on an unpartitioned block device.

I want to be able to run VirtualBox as a normal user. Since that partition will essentially contain the whole directory of a single user, it is all right to grant that single user on OS X write permissions on that partition. I did so using sudo chown username /dev/disk0s4.

But now comes the problem: this change of ownership is not persistent. After rebooting my system, I can no longer run the virtual machine. So I need some way to make that change permanent, e.g. by executing the above chown automatically every time the system starts. How do I do that? And is there a better solution? I know that on recent Linux distributions the clean solution would be writing an udev rule to set ownership for that device node. Is there some similar mechanism on OS X?


1 Using VBoxManage internalcommands createrawvmdk -filename LinuxHome.vmdk -rawdisk /dev/disk0s4 in case you are interested in that aspect.

  • I just found this answer which should apply to my use case as well. So if noone can come up with a better solution, I guess I'll try that soon. And if someone who has tried this kind of thing wants to turn that answer into an answer for here, that's fine as well. – MvG Dec 19 '13 at 16:16

You must log in to answer this question.

Browse other questions tagged .