Login  •  Register


The time is now: Wed Nov 14, 2018 2:39 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 15 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Mon Jul 23, 2018 2:09 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
Following a suggestion here a few weeks ago about using the sparsebundle format for SheepShaver disk images, I replaced the disk image in one of my projects with a sparsebundle - and then found (as I had discovered earlier but had forgotten) that some programs crash when run from a sparsebundle disk image, so I've had to go back to the old .dsk/.img format.

The program that caused a crash in my project was the macps2pdf script in the MacGhostView32 application. SheepShaver crashed even when i compiled an AppleScript that ran macps2pdf. it doesn't cause any problems on a traditional disk image.

I have no idea why this should happen, but I remember that I encountered similar problems when I first tried using sparsebundles in my projects some years ago. I don't remember the exact detail, but I remember going back to the standard disk image, as I did just now.

Probably no one else will have this kind of problem, but I thought it was worthwhile to post a message about it.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 31, 2018 9:39 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2260
Location: Emaculation.com
Thanks; I'll keep an eye on it. I had similar issues years ago when sparsebundle support was first added, but did something to fix it at some later date, and I'm not sure what that was now. It's possibly that I modified my bundles to have 1MB files instead of the default 8MB, or it could be something else.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 01, 2018 11:33 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
If you remember what you did to fix it, please let us know.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 01, 2018 2:55 pm 
Offline
Apple Corer

Joined: Wed Apr 10, 2013 9:32 am
Posts: 250
When I tried a few years ago, I wasn't even able to install OS 9 in SheepShaver using a sparsebundle image. Would indeed be great to know how to fix this.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 01, 2018 7:38 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5181
Location: Amsterdam, Netherlands
I vaguely remember that that the initial assigned size of the sparsebundle image mattered. There must be an old discussion about that somewhere in the forum.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 01, 2018 10:08 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
Couldn't find anything in old messages after a quick search, but I may not have looked deeply enough.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 01, 2018 10:14 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2260
Location: Emaculation.com
I think it may not have been on the forum; we may have been discussing it directly with Vasi or on the mail list.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 02, 2018 4:12 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2260
Location: Emaculation.com
Here's the script I use to prep my images as sparsebundles:

Code:
#!/bin/sh

echo $1
hdiutil convert "$1" -format UDSB -tgtimagekey sparse-band-size=2048 -o "$1-1Mb.sparsebundle"


I use this on a regular 2GB disk image after installing 9.0.4.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 02, 2018 12:54 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
adespoton wrote:
Here's the script I use to prep my images as sparsebundles:

Code:
#!/bin/sh

echo $1
hdiutil convert "$1" -format UDSB -tgtimagekey sparse-band-size=2048 -o "$1-1Mb.sparsebundle"


That seems to work! Thank you! It's good to have it on record here for future reference. The macpcl2pdf app doesn't crash the system now.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 16, 2018 6:32 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
And here is an AppleScript wrapper for adespoton's script that includes error handling:

Code:
on open theDrop
   repeat with thisItem in theDrop
      set thisPath to POSIX path of thisItem
      set outPath to thisPath & "-1Mb.sparsebundle"
      try
         do shell script "hdiutil convert" & space & quoted form of thisPath & space & "-format UDSB -tgtimagekey sparse-band-size=2048 -o" & space & quoted form of outPath
      on error err
         if err contains "recognized" then
            display dialog "Please change the extension of the disk image to .img and try again." buttons {"OK"}
         end if
      end try
   end repeat
end open


Certainly adespoton can improve on this but it seems to work.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 16, 2018 4:27 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2260
Location: Emaculation.com
I'll add the git repo to this thread too:

https://github.com/adespoton/sparserbundler


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 17, 2018 7:31 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
adespoton wrote:
I'll add the git repo to this thread too:

https://github.com/adespoton/sparserbundler


Could you check the 7z file in the repository? I can't extract it either on Windows (with 7-Zip) or macOS (with BetterZip). And various other programs say the file is invalid.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 17, 2018 4:03 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2260
Location: Emaculation.com
Hmm; I'll check it over the next couple of days; it's possible the upload never completed correctly (the original decompresses for me with Keka and The Unarchiver).


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 17, 2018 9:53 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 922
Slightly improved code for the AppleScript wrapper (and, for anyone doing this for the first time, you must save it in the File Format "Application" (not "Script"):

Code:
on open theDrop
   repeat with thisItem in theDrop
      set thisPath to POSIX path of thisItem
      set outPath to thisPath & "-1Mb.sparsebundle"
      try
         do shell script "hdiutil convert" & space & quoted form of thisPath & space & "-format UDSB -tgtimagekey sparse-band-size=2048 -o" & space & quoted form of outPath
      on error err
         if err contains "recognized" then
            display dialog "Please change the extension of the disk image to .img and try again." buttons {"OK"}
         else
            display dialog "Error:" & space & err buttons {"OK"}
         end if
      end try
   end repeat
end open


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 18, 2018 7:51 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2260
Location: Emaculation.com
Github repo fixed; somehow I pushed the alias instead of the archive. It should be accessible now.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 15 posts ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group