Re: [offtopic] undeletable file on corrupted ext2 partion

Peter Rival (ops@dwc.edu)
Fri, 06 Jun 1997 13:05:41 -0400


Stephen Beynon wrote:
>
> I have a ext2 partion that corrupted due to a hardware fault (since
> rectified :) - but I am left with a file that has been corrupted so
> that it looks like a symbolic link.
>
> rm returns
> rm: /bin/red: Operation not permitted
>
> when I try to rm the file as root - should this be possible ?
>
> e2fsck 1.10 claimed to have repaired the filesystem, and does not report
> any errors when I force it to run now.
>
> I am guessing that this is more of a problem with e2fsck rather than the
> kernel drivers so sorry for the off topic post.
>
> now where did I leave the filesystem editor :(
>
> Stephen

I also had the same problems once - my Adaptec 2940U decided to fall on
its face some time after I left for the night, so I had all sorts of
text files and directories that suddenly became character-special files.
I just used debugfs -w and unlink'ed the files. I don't know if that's
recommended procedure, but it's only a workstation that _really_ needs
to get re-installed anyway.

BTW, this worked for most files, but some of them still insisted that
they were there, even when ls said they weren't. But, debugfs still
found them. Seems to have cleared itself up with a reboot and another
e2fsck. :)

- Pete

--------------------------
Peter Rival
UNIX Systems Administrator
Daniel Webster College