data corruption when reading from a mount_cd9660 filesystem
current1 at BuggerIT.com.au
current1 at BuggerIT.com.au
Tue Nov 11 00:44:29 PST 2003
G'day,
It appears that files with size greater than 65536 bytes when read from
a cd9660 mounted filesystem appear corrupted.
Happens on any cd-rom I try regardless of where it was burnt,
even the original 5.1-RELEASE-i386-miniinst.iso now appears corrupt.
# uname -v
FreeBSD 5.1-CURRENT #0: Sat Nov 8 16:19:16 EST 2003...
kern.osreldate: 501113
# atacontrol list
ATA channel 0:
Master: acd0 <PHILIPS DVD+RW SDVD6004/1.03> ATA/ATAPI rev 5
Slave: no device present
ATA channel 1:
Master: ad2 <IC25N060ATMR04-0/MO3OAD0A> ATA/ATAPI rev 6
Slave: no device present
# atacontrol mode 0
Master = UDMA33
Slave = BIOSPIO
Test data:
1. Copied /lib /libexec /etc (others) to directory from which to make an ISO.
2. Made an ISO image using:
# /usr/local/bin/mkisofs -b boot/cdboot -no-emul-boot -c boot.catalog \
-r -J -V FreeBSD_51 -o freebsd51.iso .
3. Burnt it to CD:
# /usr/sbin/burncd -f /dev/acd0 -s 8 data freebsd51.iso fixate
Test #1, read filesystem from mounted CD shows corruption:
# mount_cd9660 /dev/acd0 /cdrom
# diff /cdrom/lib/libc.so.5 /lib/libc.so.5
Binary files /cdrom/lib/libc.so.5 and /lib/libc.so.5 differ
# diff /cdrom/etc/services /etc/services
1912,1914c1912,1970
< www-dev 2784/tcp #world wide s^@^@^@t^@^@^
..more garbage...
< ^H 0000000000000000@^@^@^@\xc3\xbf\xff\xff\
e7^O^H^E^@^@^@^Y^@^@^@}^@^@^@^@^@^@^@^Q^@^@^@\xa0\xf1^O^H^@^@^
@^@^@^@X client-server protocol
---
> www-dev 2784/tcp #world wide web - development
> www-dev 2784/udp #world wide web - development
..
There are numerous other differences, for example,
# strings /cdrom/lib/libc.so.5
shows data I found in /usr/ports/devel/boost/pkg-plist
Test #2, read filesystem from mounted ISO image, shows CD data is OK:
# dd if=/dev/acd0 of=cdrom.iso bs=2k
189376+0 records in
189376+0 records out
387842048 bytes transferred in 188.299548 secs (2059708 bytes/sec)
# mdconfig -a -t vnode -f /home/iso/cdrom.iso -u 4
# mount_cd9660 /dev/md4 /cdrom
# diff /cdrom/lib/libc.so.5 /lib/libc.so.5
and
# diff /cdrom/etc/services /etc/services
shows files are equal.
regards, Taras
More information about the freebsd-current
mailing list