inode data structure

the superblock has the offset for inode table.
My question is
1) whether it starts relative to the start of the first cylinder group
or is it relative to the start of filesystem???

2)and also which entry corresponds to the root(/) inode?? is it second or third entry???

My questions are with respect to UFS2(default filesystem for free BSD 5.0)
plz... help :frowning:
thanx in advance!

1) I don't know that particular fs, but it typically is the offset of the first inode block of a cylinder group from the start of the cylinder group. Find fs.h and look for a macro ino_to_fsba or something like that. (inode to file system block address) There should be a macro to do this and you should use the macro.

2) why not simply try "ls -lid /"?

yes the command ls -lid was help ful but am not clear with ur solution for first
question :frowning:
i think the first inode in UFS is always inode 0 contrary to linux inode1????
searched google
found an article "filesystem forensic analysis by Brian Barrier"
but that does not clearly specify from where it starts ie whether relative
to start of the fs or cylinder group! bcoz
in one section he says its respect to start of fs and in another he says with respect to each cylinder group!
And whether the specified values are fragments or just bytes!

plz... help!

You already have my answer...I think it's relative to the start of the cylinder group, not the the start of the fs. Suppose for a minute that it is relative to the start of the fs...how would that even be possible? You only have one number...how do you use that one number to find the start of the inodes for each cylinder group?

"You only have one number...how do you use that one number to find the start of the inodes for each cylinder group?"
ur exactly rite!! thats wat i'm tryin to figure out!!

firstly when i read inode relative to start of each group as u said,i got wrong entries: i verified this with ls -lid /(ie the filesizes and link counts were different)

secondly i read relative to start of fs, i found the correct entries!
but... when it comes to other group inode tables...??????
heres where am in trouble!!!!