Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / genisoimage / diag / README
1 # @(#)README    1.1 97/02/23 eric
2 #
3         I am enclosing 3 test programs that I use to verify the
4 integrity of an iso9660 disc.  The first one (isodump) is pretty
5 simple - it dumps to the screen the contents of the various
6 directories.  The second one (isovfy) goes through and looks for
7 problems of one kind or another.
8
9         To use, type something like "./isodump /dev/ramdisk" or
10 "./isodump /dev/scd0", depending upon where the iso9660 disc is.  It
11 starts by displaying the files in the first sector of the root
12 directory.  It has some pretty simple one letter commands that you
13 can use to traverse the directory tree.
14
15         a - move back one sector.
16         b - move forward one sector.
17         g - go to new logical sector.
18         q - quit
19
20 The a and b commands do not try and stop you from going past the
21 beginning or end of a sector, and the g command does not have any way
22 of knowing whether the sector you request is actually a directory or
23 not.
24
25         The output is displayed in several columns.  The first column
26 is the total length of the directory record for the file.  The second
27 column (in [] brackets) is the volume number.  Next comes the starting
28 extent number (in hex), and then comes the file size in bytes.  Then
29 cones the filename (not the Rock Ridge version), and this is preceeded
30 by an "*" if the file is a directory.  After this is a summary of the
31 Rock Ridge fields present along with a display of the translation of
32 the symbolic link name if the SL Rock Ridge record is present.
33
34         I tailored this program for debugging some of the problems
35 that I was having earlier.  The idea is that you can tailor it
36 to test for problems that you might be having, so it is not intended
37 as a be-all and end-all dump program.
38
39         If you move to a sector that does not contain directory
40 information, the results are unpredictable.
41
42         The second program, isovfy, is run in the same way as isodump,
43 except that you do not have to do much except let it run.  I have it
44 written to verify all kinds of different things, and as people find
45 other sorts of problems other tests could be added.
46
47         The third program, dump.c, basically does a hexdump of the cd.
48 This is screen oriented, and there are some simple commands:
49
50         a - move back one sector.
51         b - move forward one sector.
52         f - enter new search string.
53         + - search forward for search string.
54         g - go to new logical sector.
55         q - quit
56
57
58         Note that with the 'g' command, sectors are always given in
59 hex, and represent 2048 byte sectors (as on the cdrom).  If you know
60 how to decode a raw iso9660 directory, you can pick out the starting
61 extent number from the hexdump and know where to go from there.  The
62 starting extent appears something like 30 bytes prior to the start of
63 the iso9660 (not Rock Ridge) filename, and it appears in a 7.3.3
64 format (meaning that it occupies 8 bytes, 4 in little endian format,
65 and 4 in big endian format).  Thus you should see a mirror image of
66 the bytes when looking at the extent number.
67
68         The isovfy program can also dump the contents of the path
69 tables, but this capability is commented out right now.  Feel free
70 to enable this to see what is in the tables.  Ultimately I may fix
71 it so that this checks the integrity of the tables as well.
72
73         The isovfy program gives warnings about things like files that
74 have a size of 0 but have an extent number assigned.  The genisoimage program
75 should never do this, but the YM software does leave these around.
76 I think it is probably harmless in the YM case.~