Building an inode
Polytropon
freebsd at edvax.de
Wed Oct 29 19:35:07 PDT 2008
Hi again,
coming back to my problem with the inode of my home directory
having disappeared, I found out that the tool ffs2recov from
the ports is able to establish an inode entry for a directory
where you can explicitely name the inode and the directory.
I know which inode number my former home directory had, and of
course I know its name. Would it be sufficient to
% fs2recov -c 12345 -n poly ad0s1f.dd
I think there's more to establish an intact directory structure.
As far as I've already learned, when "walking back" the path
from a file deep within a directory structure, every inode
contains a field "where it comes from", let's say, where CWD
and .. are (as an inode number):
bla.txt dingens/ foo/ poly/ /
12380 -----> 12370 -----> 12360 -----> 12345 -----> 2
This would be /home/poly/foo/dingens/bla.txt on ad0s1f (where / is
then mounted as /home).
When I can assume that every inode still knows "where it came
from", what would be a useful tool to build poly/ (12345) again?
I think I'll need to construct its content again, because just
by creating poly/ as 12345, where does the filesystem know from
what's the content of poly/? Is the term "directory slots" I
came across related to that topic? Which sources could give good
hints?
Sadly, fsck_ffs doesn't do the job... but maybe if I fix the
file system a bit (instead of fixing fsck_ffs)...? Hey, it's not
that I try to build my own nuclear plant in the living room... :-)
--
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list