Fix for "No such file or directory" while trying to mount --bind

Problem: The command mount --bind /mnt/data/usr /usr in Linux fails with "No such file directory". /mnt/data is a mount point of a dm-crypt device. strace shows ENOENT for the mount syscall, no other clues. Variants that don't refer to /usr (for example, to /usr2 instead), do work as expected. The same error occurs after and during boot process, so it's not explainable by used files.

Solution: The problem disappeared after upgrading the kernel from 2.6.34 to 2.6.38.8.

1 comment:

tadasdatys said...

I've had a similar problem. Solved it by mounting each of usr/bin, usr/lib, ... separately.

Post a Comment