Tuesday, 6 June 2006
“Fun” OS X disk image bug
So I was trying to install OpenSolaris on a CD-less SPARC system using an OS X machine as an install server (because said machine is barfing under FreeBSD, and I’m trying to figure out if it was a hardware problem).
After downloading the DVD image in four pieces, concatenating them together, and mounting it, I think I may have run into some weird disk imaging or filesystem bug on OS X. It’s really rather scary.
% uname -a Darwin bookworm.local 8.6.0 Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power Macintosh powerpc % hdid sol-nv-b40-sparc-dvd.iso /dev/disk2 /Volumes/SOL_11_SPARC % cp /Volumes/SOL_11_SPARC/Solaris_11/Tools/add_install_client ./one % disktool -e disk2 0 [...] ***Disk Ejected('disk2') % hdid sol-nv-b40-sparc-dvd.iso /dev/disk2 /Volumes/SOL_11_SPARC % cp /Volumes/SOL_11_SPARC/Solaris_11/Tools/add_install_client ./two % diff one two Binary files one and two differ % file one two one: data two: data
add_install_client is supposed to be a shell script. A few times running strings on it, I found some OS X filesystem bits, for example:
% strings add_install_client [...] ntpd snmpd Starter RetroRun rter crashreporterd [...] tarter apcupsd arter serialnumberd ARDHelper zsh: 697 bus error strings add_install_client
No time to debug further at the moment, but… yuck.
The problem appears to be that the DVD image was in five pieces, not four—it was incomplete. Still seems like a real problem that it was giving me random data from memory, though.