[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problems with symlinks and moving /usr to another partition

I have two (non-swap) ext2fs partitions, /dev/hda8 and hda9. I had
hda9 mounted on /rep. The thing is, I've been running out of space so
I decided to move /usr to the new partition. What I did is do a 
cd /
cp -av usr rep

Which resulted in a /rep/usr directory being created. Then I did

cd /
rm -rf usr
ln -s /rep/usr usr

This created a symbolic link, and everything seemed to be
working. Problem is, now I've got ldconfig problems, where a bunch of
libs aren't being found. That's because in /usr/lib (really
there are entries like libm.so -> ../../lib/libm.so.6*

Now this was broken, because if you go into /usr/lib and type 
cd ../../lib it works, and it goes into /lib, but pwd will show
"//lib" which is weird. Now if you do ls ../../lib it works.

But if you do a ls -l ../.. it lists the contents of /rep, not /.
This is where I'm confused about the difference between real absolute
paths and those which contain symlinks. I'm thoroughly
confused. Anyway, it isn't able to dereference ../../lib/libm.so.6
from /usr/lib, so I went into /rep, and manually made a symlink by:

ln -sd /lib lib

Now ldconfig is ok. But I'm just wondering if there is an elegant way
to get around this problem, maybe using the symlinks package to make
the links absolute, or by using some arcane option of ln when I make
the original usr link in the / directory.

Any help appreciated.
A. Kiyan Azarbar
Ottawa, Canada

To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: