[Info-vax] INDEXF.SYS
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Fri Jan 27 08:52:19 EST 2012
In article <7cdb551e-31b4-4893-b958-88dad01c071f at kg1g2000pbb.googlegroups.com>, Babloo loves you all <babloo.141 at gmail.com> writes:
>Hello All
>
>Can I know what is INDEXF.SYS File ?
Quick and dirty answer: filesystem data.
>What is the relation between [*SYSLOST*] folder and INDEXF.SYS File ?
None really. [SYSLOST] is just another directory. It's relation with
INDEXF.SYS is that its header will be stored in INDEXF.SYS
>How to get more information regarding files present in [*SYSLOST*]
>folder ?
$ DIRECTORY/FULL [SYSLOST]
...should give you just about all there is...
>How to get file identifier of a file in [*SYSLOST*] folder ?
$ DIRECTORY/FILE_ID
>How to get information of a file with file identifier ?
That's a bit more involved. The easiest way is to use:
$ DUMP/HEADER/BLOCK=COUNT=0 the_file
HOWEVER, if you want to use the file identifier, you need to understand
the components of it: (num,seq,nmx+rvn)
The 'seq' is a sequence number. It is incremented each time a file header
is reused. For the sake of the rest of this exercise, it can be ignored.
The 'rvn' is relative-volume-number. If your file is located on a BOUND
volume set, this number would reflect which of the volumes this file can
be found. Let's ignore this for now.
The 'nmx' is a byte in the upper byte of the last value. You can get it
by taking the third value of the return FID tuple and dividing it by 256.
(ie. shift right 8)
The values you need are 'num' (number) and nmx (number-extention). The
file's number can then be computed from 'num'+'nmx*65536' (or a shift of
the nmx to the left by 16). This value will now allow you access to the
file's header.
The file headers are stored in the volume's INDEXF.SYS file. To get the
header of the file in question, you need to know WHERE in this file they
begin. For that calculation, you need to know the cluster size of this
volume and the size of the file header bitmap. You can get the cluster
size in DCL using:
$ WRITE SYS$OUTPUT F$getdvi("disk-name","CLUSTER")
The file header bitmap contains one bit for each file header slot on the
volume. There are 4096 (8bits/byte*512bytes/block) in a block. To get
the size of the bitmap, the easiest is again to use DCL:
$ WRITE SYS$OUTPUT F$getdvi("disk-name","MAXFILES")/(512*8) + 1
Now, to get the file header using your computed file number:
$ WRITE SYS$OUTPUT F$getdvi("disk-name","CLUSTER") + -
F$getdvi("disk-name","MAXFILES")/(512*8) + 1 + -
(nmx*65536 + num)
You can then display the file header using the DUMP command and this
calculated number (let's call it FH-num for File Header number):
$ DUMP/FILE_HEADER/BLOCK=(COUNT=1,START=FH-num) DSA0:[000000]INDEXF.SYS
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
Well I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list