Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I mount a vmware vmdk file as /home on startup?

I have been using Ubuntu as a VMWare Guest. All My data resides on a single vmdk disk, which I mounted as /home in the VM using fstab. Now I want to move to an actual Ubuntu installtion for performance reasons (Installed with wubi under windows 7). I can mount my vmdk to a folder using vmware-mount (I have vmware server), but how do I go about mounting it to /home on startup?

share|improve this question
up vote 3 down vote accepted

Make the command you use to mount your disk, part of a bash script named say, An example of such a script is:

# File:
# Description: Mounts a partition on startup
sudo mount /dev/sda1 /home

Above script will mount /dev/sda1 (first physical partition on sda) to /home. Note: Replace it with your vmware-mount command.

Then run following commands:

  1. Make executable
    sudo chmod +x

  2. Copy to /etc/init.d
    cp /etc/init.d/

  3. Change directory to /etc/rc5.d/ and make a link to the script as:
    cd /etc/rc5.d
    ln -s ../init.d/

  4. Similarly, make another link in rc2.d as:
    cd /etc/rc2.d
    ln -s ../init.d/

Reboot Ubuntu and verify if the mounting is done by executing ls /home

share|improve this answer
Thanks!............ – Midhat Jan 18 '12 at 11:28

"For performance reasons" -- then you don't want to be mounting it via vmware-mount. Instead, transfer the files out of the vmware image file to /home.

share|improve this answer
Yes I understand that. I still get a major improvement when I am running ubuntu as the only OS. and I need to keep the vmdk to take on the road and sometimes when I quickly need to do something in ubuntu and I'm in windows – Midhat Jan 17 '12 at 20:42
This post unfortunately doesn't answer my question in its current state – Midhat Jan 17 '12 at 20:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.