On Mar 3, 2011 6:14 AM, "Joel Roth" <[email protected]> wrote: > > On Thu, Mar 03, 2011 at 09:51:14AM +0100, Alex Mestiashvili wrote: > > On 03/03/2011 06:20 AM, Joel Roth wrote: > > >Hi, > > > > > >I'm repairing a system for a friend with a FAT filesystem > > >problem. > > > > > >There is a directory cycle, so that for example: > > > > > > rm -rf directory_with_cycle > > > > > >doesn't work, because rm encounters and endless succession > > >of subdirectories. > > > > > >The directory content is not important, however I'd be > > >interested in knowing some FAT references that could help > > >me to eliminate the loop and remove the directory. > > > > > >Regards, > > > > > I would run the fsck.vfat ( dosfstools package) on the unmounted partition. > > I tried that; fsck.vfat gets stuck in a loop as it descends > into a subdirectory that contains its own ancestor. >
I thought fsck was a bit based integrity checker and didn't care about directories?... and how do you know what directory fsck is on anyway? Either way, rsync the disk (I think there's a follow symlink option). Copy the first 454 bites of the disk. Reformat the disk, copy the data back, dd the mbr back.

