[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Where is inode table



As far as I remember the i-nodes start immediately after the
superblock for any filesystem.  In orlder Unixen that used to be at
offset 512 from the beginning of the FS.  Try 512, 1024, 2048 and 4096 
bytes from the beginning of the FS.

The structure of the innode on the disk is given in

	/usr/src/linux/include/linux/ext2_fs.h

The superblock structure on disk is also igven in the same file.
Experiment around a bit.

!!WARNING!!  Make sure that your call looks like open(...O_RDONLY)!  I 
mean, O_RDWR|O_TRUNC would be a /very/ bad idea :-)

Regards,

- -- Raju

>>>>> "Sunix" == Sunix  <ksunil@xxxxxxxxxxxx> writes:

    Sunix> Sorry but i don't have any idea about which offset do
    Sunix> i-node table starts.

    Sunix> U can use stat lstat fstat system calls but for that u have
    Sunix> to provide filename not the i-node. These sys-calls provide
    Sunix> info about file. Which is nothing but ur i-node info.


    Sunix> Sumit Rangwala wrote:
    >>  Hello
    >> 
    >> I am using Redhat 5.2 and was trying to read inode table
    >> through the file /dev/hda3 I was unable to find out the offset
    >> at which the inode table starts.  Can anybody help me out.
    >> 
    >> And : Is there a syscall which can access me the inode
    >> information given the inode no. ?
    >> 
    Sunix> -- "it is not the style of clothes one wears, neither the
    Sunix> kind of automobile one drives, nor the amount of money one
    Sunix> has in the bank, that counts. These mean nothing. It is
    Sunix> simply service that measures success."  Dr. George
    Sunix> Washington Carver.
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------