Weird Linux "Undelete" Issue with a FAT Filesystem

svet-am

Supreme [H]ardness
Joined
Jan 6, 2003
Messages
5,146
On my wife's PC, she has a primary hard disk that has a single large ReiserFS partition that I've installed Linux to. Her secondary hard disk is split into two partitions. One contains Linux SWAP and the other is a FAT filesystem that we have configured from her days as a Windows user to contain a "documents" folder that we previously routed "My Documents" to.

The Linux she's running is Xandros Business Edition 3.0 (essentially, it's a Debian). Here's the problem:

Xandros, by default, creates a "My Documents" directory entry in each user's $HOME. Well, we don't like that since she likes to keep her "documents" folder on her secondary drive and re-map My Documents to it. So, what I did was make a symlink that made the My Documents directory in her $HOME point to the "documents" directory on her secondary hard disk.

Well, in the process of doing this, I had a brain fart and instead of pointing to /mnt/secondary/documents with the symlink, I pointed to /mnt/secondary. I quickly realized my error and set about trying to fix it by deleting the symlink that I had created in error.

To my horror, Xandros decided that deleting the symlink meant that I wanted to recursively kill everything that it pointed to as well. So, now all of her stuff that was on that hard disk is gone. Obviously, she's rather upset with me right now.

In a fret, I booted up a BartPE disk and tried to recover some of the files. I managed to retrieve some of the files to a network share, but I haven't gottent them all. The tool that I was using is Fast File Undelete by dtidata.com. Anyone have any better suggestions for how to go about this process?

Luckily for us, since that drive is dedicated explicitly for storage, we're not reading and writing to that disk and I'm fairly certain that the data is sitting there waiting to be restored. Also, any ideas on why deleting the symlink killed everything it pointed to? I'm not familiar with this behavior. Any help would be appreciated.
 
Just be on the safe side, always use unlink to remove symlinks if at a command line.
If not, it depends on the tool. I imagine whatever you used followed the symlink before deleting, or something equally silly.
 
HHunt said:
Just be on the safe side, always use unlink to remove symlinks if at a command line.
If not, it depends on the tool. I imagine whatever you used followed the symlink before deleting, or something equally silly.
Doh! smack on the head for not using unlink. for what it's worth, the 'tool' I used to remove the symlink was rm.
 
Theoretically that should have worked as you wanted, but, well, unlink is your friend. :)
 
Back
Top