Read-only volumes and disk images

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
Gannet
Student Driver
Posts: 11
Joined: Sun Jan 24, 2010 2:00 am

Read-only volumes and disk images

Post by Gannet »

I just have a few questions and small feature requests for SheepShaver (it is still being developed, right?).

1. Is it possible to make the Unix root read-only? (If not, such a feature would be nice)

2. How come read-only disk images that I create with Disk Utility are read-write within SheepShaver? I want to have some read-only volumes and I can do this by locking the image file, but this is annoying if I want the move the file around.

3. What are all the disk image formats that SheepShaver supports and what exactly is the ".dsk" format? (Support compressed images, or in fact anything that OS X can handle natively, would be really useful)

4. One last request: Drag-and-drop rearrangement of disks in the prefs would make it really easy to set boot order (unless it doesn't work that way).

Many thanks in advance,
Gannet
User avatar
Ronald P. Regensburg
Expert User
Posts: 7830
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Read-only volumes and disk images

Post by Ronald P. Regensburg »

Gannet wrote:I just have a few questions and small feature requests for SheepShaver (it is still being developed, right?).
Regrettably no, not really. Regular development stopped almost four years ago and recently the original web site was even removed. In the past years, several users with developer skills have contributed to the source code with bug fixes and some improvements. Others (like myself) have created new builds from source for use by those who do not know how to build from source themselves. (Note that the version number is still 2.3, the 2006 version. We started adding the build date to the version number to avoid confusion.)
1. Is it possible to make the Unix root read-only? (If not, such a feature would be nice)
Why is that? Most people would find it very inconvenient, not to be able to use the feature for moving or saving files from within SheepShaver to the shared folder in the host environment. (You did set up the shared folder as described in the setup manual?)
2. How come read-only disk images that I create with Disk Utility are read-write within SheepShaver? I want to have some read-only volumes and I can do this by locking the image file, but this is annoying if I want the move the file around.
I do not know. In which MacOSX version did you use Disk Utility to create the disk image and exactly which format did you choose? So far, it has been my experience that only non-compressed read-write disk images created in Disk Utility will mount in SheepShaver.
3. What are all the disk image formats that SheepShaver supports and what exactly is the ".dsk" format? (Support compressed images, or in fact anything that OS X can handle natively, would be really useful)
SheepShaver supports any HFS and (with MacOS 8.1 and later) HFS+ disk image that is in read-write and uncompressed format. The .dsk extension is just an extension, does not say anything about the format. In the manual is mentioned that the extension is irrelevant. If you change the .dsk extension to .dmg, the image will mount in MacOSX when double clicked. (Note: Never mount a disk image in SheepShaver and in MacOSX at the same time, you will risk file system corruption and file loss.)
4. One last request: Drag-and-drop rearrangement of disks in the prefs would make it really easy to set boot order (unless it doesn't work that way).
Yes, would be nice. When you rearrange disks frequently, it is easier to edit the prefs file manually. Use Terminal to open the file in a text editor. The file will open in TextEdit when you enter in Terminal:

Code: Select all

open ~/.sheepshaver_prefs
The disk lines are at the top. Just select the line for the boot volume and drag it to the top.
Gannet
Student Driver
Posts: 11
Joined: Sun Jan 24, 2010 2:00 am

Re: Read-only volumes and disk images

Post by Gannet »

Thanks for all the info, Ronald!
Ronald P. Regensburg wrote:Regrettably no, not really. Regular development stopped almost four years ago and recently the original web site was even removed. In the past years, several users with developer skills have contributed to the source code with bug fixes and some improvements. Others (like myself) have created new builds from source for use by those who do not know how to build from source themselves. (Note that the version number is still 2.3, the 2006 version. We started adding the build date to the version number to avoid confusion.)
Ah, I see. Don't suppose said developers drop by here occasionally? :-)
Why is that? Most people would find it very inconvenient, not to be able to use the feature for moving or saving files from within SheepShaver to the shared folder in the host environment. (You did set up the shared folder as described in the setup manual?)
Well it's just as useful as having any other read-only volume, I guess. I'm not suggesting it should always be read-only, just some ability to make it read-only when you need to would be kinda handy.
I do not know. In which MacOSX version did you use Disk Utility to create the disk image and exactly which format did you choose? So far, it has been my experience that only non-compressed read-write disk images created in Disk Utility will mount in SheepShaver.
Sorry, you're right. If you give it a file it doesn't understand the guest OS will initialise it and the original file (whatever it may have been) will be completely overwritten. The result is unreadable by OS X but works fine in the vm. Guess the only way to have read-only volumes is to lock the image files.
SheepShaver supports any HFS and (with MacOS 8.1 and later) HFS+ disk image that is in read-write and uncompressed format. The .dsk extension is just an extension, does not say anything about the format. In the manual is mentioned that the extension is irrelevant. If you change the .dsk extension to .dmg, the image will mount in MacOSX when double clicked. (Note: Never mount a disk image in SheepShaver and in MacOSX at the same time, you will risk file system corruption and file loss.)
Right, I was just wondering because it seems to support NDIF read-write (RdWr) as well as UDRO and UDTO but also these funny ".dsk" files of its own creation, which hdiutil identifies as "RAW*". Plus whatever the messed up format from my comment above is.
Yes, would be nice. When you rearrange disks frequently, it is easier to edit the prefs file manually. Use Terminal to open the file in a text editor. The file will open in TextEdit when you enter in Terminal:

Code: Select all

open ~/.sheepshaver_prefs
The disk lines are at the top. Just select the line for the boot volume and drag it to the top.
Yeah thanks, I guess I can just keep the file open when I expect to be rearranging a lot.

P.S. When did OS X drop write support for HFS standard?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7830
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

You can make the "Unix" disk read-only by locking the shared folder in MacOSX. When you then try to make changes to the "Unix" disk, you will get erroneous error messages about files being in use, but the result wil be the same as when the disk would be read-only.

Write support for HFS standard was dropped in Snow Leopard.
emendelson
Forum All-Star
Posts: 1726
Joined: Tue Oct 14, 2008 12:12 am

Re: Read-only volumes and disk images

Post by emendelson »

Gannet wrote:4. One last request: Drag-and-drop rearrangement of disks in the prefs would make it really easy to set boot order (unless it doesn't work that way).
This isn't quite the same as drag-and-drop, but almost as easy. On the Basilisk II wiki pages you'll find a link to my Applescript-based "Emulator Disk Image Chooser." If you open that in the AppleScript editor and change a clearly-marked variable at the top of the file from "Basiisk II" to "SheepShaver", the script will let you select a boot disk image by clicking on it, and will also let you add or remove boot disk images, and create new .DSK images.

Actually no need to open the script in the Applescript editor; I've made the change and posted the Sheepshaver version here:

http://dl.dropbox.com/u/271144/Emulator ... r%20SS.zip

Moderators: please feel free to distribute, post, or link to this file if you think anyone might find it useful.

Note: If you use this script to modify a prefs file in which you did not originally specify the full path of an existing disk image (because the image is in the same folder with the Sheepshaver application), the script will prompt you to remove the entry for the disk that has no full path, because the script doesn't know what to do with it. This may limit its usefulness in some situations.
Gannet
Student Driver
Posts: 11
Joined: Sun Jan 24, 2010 2:00 am

Post by Gannet »

Ronald P. Regensburg wrote:You can make the "Unix" disk read-only by locking the shared folder in MacOSX. When you then try to make changes to the "Unix" disk, you will get erroneous error messages about files being in use, but the result wil be the same as when the disk would be read-only.
This only applies to the root of the unix disk, unless you recursively lock everything inside it. Still, better than nothing so I guess it will do.

Thanks for the script, emendelson!
User avatar
Cat_7
Expert User
Posts: 6169
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Some developers drop in here regularly.

If you want to contact the developers that still contribute to SheepShaver, you can leave a line at:
basilisk-devel@lists.sourceforge.net.

Best,
Cat_7
kelvin31415
Tinkerer
Posts: 83
Joined: Sat Apr 12, 2008 8:22 pm

Post by kelvin31415 »

In your .sheepshaver_prefs, if you prefix the pathname of a disk image with an asterisk, it will be mounted as a locked, write-protected disk. For example:

disk */Users/kd/Classic/SheepShaver-2.3/Main.dmg
Gannet
Student Driver
Posts: 11
Joined: Sun Jan 24, 2010 2:00 am

Post by Gannet »

Aha! Thanks heaps, kelvin, that will be most helpful.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7830
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

kelvin31415 wrote:In your .sheepshaver_prefs, if you prefix the pathname of a disk image with an asterisk, it will be mounted as a locked, write-protected disk. For example:

disk */Users/kd/Classic/SheepShaver-2.3/Main.dmg
Thank you! Why didn't we know that? :wink:

(Does work also for files that are in the same folder with SheepShaver and are referred to in the prefs with the file name only.)
emendelson
Forum All-Star
Posts: 1726
Joined: Tue Oct 14, 2008 12:12 am

Post by emendelson »

Ronald P. Regensburg wrote:
kelvin31415 wrote:In your .sheepshaver_prefs, if you prefix the pathname of a disk image with an asterisk, it will be mounted as a locked, write-protected disk. For example:

disk */Users/kd/Classic/SheepShaver-2.3/Main.dmg
Thank you! Why didn't we know that?
Because we (that includes me) never read all of this file, which explains exactly this detail:

http://basilisk.cebix.net/README
Post Reply