1Mini-Howto for verifying a selfmade CD
2
31) verifying the data layer
4
5	To verify if all data on the disk can be read,
6	use SCSI verify. This can be done with the
7	sformat utility.
8
9	use: sformat -verify [target] [lun] [scsibus]
10
11	If the CD-R device is connected to target 2 on SCSI bus 0
12	sformat -verify 2  0
13
14	sformat can be found on
15
16	https://sourceforge.net/projects/schilytools/files/sformat/
17	or
18	https://sourceforge.net/projects/schilytools/files/schily-*
19
20	NOTE: Not all CD-ROm drives support verifying
21	NOTE: All TAO tracks end in 2 unreadable run-out sectors
22
232) verifying the filesystem layer
24
25	A quick check is to mount the CD and to use star to read
26	all files on the filesystem.
27
28	mount -r /dev/cdrom /cdrom      (modify for your OS)
29	cd /cdrom
30	star -cPM . >/dev/null
31
32	If no errors can be found, all files are readable.
33
34	star can be found on
35
36	http://sourceforge.net/projects/s-tar/files/
37
38
39	You also may want to compare the filesystem on the CD
40	with the original data. This can be done with star too.
41
42
43	(cd /master_for_cd; star -cPM .)|(cd /cdrom; star -diff -v)
44
452a) verifying the iso image before creating the CD
46
47	You may check the filesystem image by mounting it with my
48	"fbk" on Solaris or the loopback driver on Linux.
49
50	On Linux type:
51		mount isoimage.raw -r -t iso9660 -o loop /mnt
52
53	On SunOS type:
54		mount -r -F fbk -o type=hsfs /dev/fbk0:isoimage.raw /mnt
55
56For Solaris 8 and later you may also use the Sun lofi driver (see README.sun-lofi)
57
58	The check the filesystem with:
59
60		(cd /master_for_cd; star -cPM .)|(cd /mnt; star -diff -v)
61
62
63When doing this you have to know about the bugs in Linux/Solaris
64
65Mkisofs before 1.10 and Linux have a bug with timezones.
66If you are using mkisofs-1.10 and newer on Linux, you need to disable
67comparing times:
68
69(cd /master_for_cd; star -cPM .)|(cd /cdrom; star -diff -v diffopts=!times)
70
71The same is needed if you are using mkisofs pre-1.10 on Solaris
72
73Solaris has a bug with hardlinks. It generates different inode numbers
74for the hardlinks to a file. This makes it impossible for star to
75check hard links. Use
76
77(cd /master_for_cd; star -cPM .)|(cd /cdrom; star -diff -v diffopts=!hardlink)
78
79in this case.
80
81NOTE: Some operating systems have a read ahead bug that causes I/O errors for
82the last file(s) on a CD. This seems at least to be true for all Linux versions
83and for Solaris 7 FCS. For Solaris 7 there is a patch (107465-02) that you should
84install. This I/O error problem does not occur with DAO disks and with TAO disks
85that have been written with cdrecord -pad.
86
87Joerg Schilling
88