Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Nov 30 '11 at 17:07

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

1 Answer 1

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

 
discard

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.