Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I want to store all source code of programs I have installed in /usr/src. However, due to size of the drive I made a sym link /usr/src that points to ~/src. That was nice. Unfortunately, that caused virtualbox-dkms to fail to build the virtualbox kernel module because of a symlink within the linux-headers-*-common. 'script' points to ./../lib/linux-kbuild-3.1/scripts what is fine in /usr/src directory but wrong in ~/src.

Can I bypass this problem or the only solution is to store sources within the directory /usr/src?

share|improve this question

migrated from Nov 30 '11 at 17:07

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

I'm making /usr/src/ a binding mount fin having the following line in my /etc/fstab

 /home/Src        /usr/src         none     bind             0 0

The directory /home/Src has to exist before the mount.

Binding mounts are a bit like symbolic links for mounts; so inside /usr/src/Kernel the pwd command gives /usr/src/Kernel (and not /home/Src/Kernel as would a symbolic link have given)

share|improve this answer

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.