login
Header Space

 
 

Re: HELP! File system problem

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Wednesday, August 19, 1992 - 3:06 am

duperval@ERE.UMontreal.CA (Duperval Laurent) writes:



You'd think fsck would handle this, but for some reason Linus hasn't
felt safe in doing so.  What I've done in the past is to build a
kernel that lets you unlink directories.  Running that kernel I then
remove the bad directory, and then run fsck to recover the space and
inodes.  Look for the routine minix_unlink in
/usr/src/linux/fs/minix/namei.c.  Remove the code

    if (S_ISDIR(inode->i_mode)) 
        goto end_unlink.

Once you're running that kernel, make yourself a utility "unlink":

  main (argc, argv)
        int argc;
        char **argv;
 { if (argc > 0)
        unlink(argv[1])
 };

Use that to remove the bad directory.  Now run fsck.  (By the way,
although I've done this a couple of times in the past, I haven't kept
copies of my old changes, so I'm giving you this without having tested
it.  That is, I know the method works, but there could be a typo in
what I'm giving you.)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: HELP! File system problem, Charles Hedrick, (Wed Aug 19, 3:06 am)
speck-geostationary