Unable to create hard links to the directories

Ranga Raju B brraju at hyd.hellosoft.com
Wed May 3 09:18:23 UTC 2006


Hi,
    The cramfs in my root files system has some hard links to some 
directories in it. I used the following commands in my host system to 
add some files to it.
# mkdir /mnt/cramfs
# mkdir /mnt/tmp
# mount -o loop -t cramfs base.cramfs /mnt/cramfs
#  cp -aRf  /mnt/cramfs /mnt/tmp

While the copying is happenening I am getting an error cp can not create 
a hard link.

To confirm this I used the following commands.

# mkdir tmp
# ln tmp t1

I am getting the following error message
ln: `/tmp': hard link not allowed for directory

Then I used the following command as suggested in the man pages
# ln -d tmp t1

I am getting the following error message
ln: creating hard link `t1' to `tmp' : Operation not permitted.

I tried all these above commands after logging in as root. Still they 
don't work

My question is, if it is impossible to create hard links to the 
directories then how the hell am I finding them in my base.cramfs 
reference root file system. How are these guys able to create them.

Please help me if anyone has any idea on this

Best Regards
Ranga Raju B





More information about the busybox mailing list