mount "damaged" disk image in shellscript on 10.4

Andrew Oliver andrewo at liveworld.com
Tue Jul 29 22:43:11 PDT 2008


Why not just:

hdiutil attach my-image.dmg -noverify

to turn of disk checking.

<man hdiutil>
Andrew
:)

On Jul 29, 2008, at 10:35 PM, Chad Leigh -- ObjectWerks wrote:

> I am trying to write a shell script on a 10.4 system that uses  
> hdiutil to mount a disk image at system boot time.
>
> I have some games that require a CD to be mounted to run.  These are  
> for my 5 year old boy.  His iBook (gen 1 iceBook hand me down from  
> me)  has a busted   CD drive and I have made disk images of the  
> CDs.  (They are some hybrid windows/mac disks).  When mount them  
> using hdiutil it comes up with
>
> The disk image you are opening may be damaged and could damage your  
> system.
> Are you sure you want to open this disk image? (Y/N)
>
> If you say Y then they mount normally.  They are not really damaged  
> by the system gives you this message due to the hybrid nature (I  
> have multiple games with the same "problem" with the images and they  
> all work fine if you answer yes.  Mounting from the Finder gives you  
> a similar dialog box.
>
> What I need to do is to auto answer this with Y in the script so  
> that no user intervention is required.   Nothing I have tried works
>
> hdiutil attach my-image.dmg <<EOF
> Y
> EOF
>
> echo "Y" |  hdiutil attach my-image.dmg
>
> hdiutil attach my-image.dmg < answer
>
> where answer is a file with Y
>
> Anyone have any other ideas on how to feed responses programatically  
> to hdiutil?
>
> Thanks
> Chad
>
> _______________________________________________
> MacOSX-admin mailing list
> MacOSX-admin at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/macosx-admin
>



More information about the MacOSX-admin mailing list