This page is a wiki. Please login or create an account to begin editing.


7 posts / 0 new
Last post
Jatoba's picture
Offline
Joined: 2018 Apr 16
Mounting FireWire drives/partitions with Mac OS 9 scripts?

I was wondering about the stated topic subject for a little while now, but looking everywhere online, I was unable to find any answer for this, except for Mac OS X. I went as far as asking the MacScripter guys (as "dubba") two or so days back how could one adapt one of their OS X scripts to work under Mac OS 9.2.2 with AppleScript 1.8.3. Honestly, though, it doesn't even need to be necessarily with AppleScript for me: any other scripting tool would also suffice, like UserLand Frontier 4 or QuicKeys.

As I briefly mention in that topic, I noticed there's the "mount" command in AppleScript, but also that it didn't seem like it could mount anything beyond network drives. I'm still strying to see what else I could attempt.

When I was considering adapting their OS X script, I wondered if there was any way I could replace their calls to things like "diskutil" or "disktools". Those naturally won't work under OS 9.

Ideas?

Comments

BryMD's picture
Offline
Joined: 2018 Jul 2

Hi Jatoba Smile

Need to know a little more about the context of what you need the AppleScript to accomplish in relations to mounting external drives/partition before I can give you any concrete pointers.

If it's of any help, I've written an AppleScript for OS 9 to mount .img/.toast images and then open the installed application (for seamless launching of games needing their CD/DVD mounted) - but that script avoids the 'mount' command in its entirety...

Jatoba's picture
Offline
Joined: 2018 Apr 16

Thanks for offering a hand! Well, actually, mounting the FW drive is the whole goal. The script is to be called upon OS startup, which I'll accomplish by putting the working script inside the "Startup Items" folder.

Due to complicated reasons probably not worth getting into (my username there is "Jubadub"), when I boot into OS 9 on my Mac mini, my FW drive's many partitions are unmounted. To mount them back, I have to physically unplug and replug the drive's FW connector, unless I find an automated solution or fix the core problem. This is a specific problem between the 512GB SSD I use and Mac OS 9 on the Mac mini with the hacked Mac OS ROM file, so to fix the core problem, the Mac OS ROM has to be further tampered with. Since that's currently past my league, I'm looking for a scripting workaround.

Depending on how it was accomplished, perhaps part of the inner workings of your image mounting script could be of help. Did you accomplish it by writing a script that uses Disk Copy's resources? I actually pondered if I could somehow get Drive Setup 1.9.2 to aid me somehow, but when all partitions of a drive are unmounted, it seems it doesn't even detect a given drive, so I guess that's a no-go. Apple System Profiler still sees the FW drive and identifies it just fine, though, except it won't list unmounted partitions (which is all of them).

Is there a manual way under OS 9 we can mount back any given partition we have previously used the "Put Away" command on? Perhaps that could lead us to the answer.

BryMD's picture
Offline
Joined: 2018 Jul 2

OK, I understand the problem quite a lot better now Smile

Had written a much longer reply to you, but decided to replace that with a single very important question:

Have you been able to mount the partitions with any form of hard drive utility manually without physically unplugging and replugging the drive?!

AppleScript on OS 9 is EXTREMELY literal and EXTREMELY confined compared to OS X. There is no Terminal. There is no System Events. There is no GUI scripting (though drop me a PM if you need the latter Wink ). So more often than not you shouldn't expect AppleScript on OS 9 to do anything that you're not able to provoke manually.

On a different note, my 'Games' script uses 'open' (not 'mount') - so that won't be of much help in your particular case...

Jatoba's picture
Offline
Joined: 2018 Apr 16

Have you been able to mount the partitions with any form of hard drive utility manually without physically unplugging and replugging the drive?!

Not under OS 9, because once all partitions of a given device are unmounted or put away, the device itself gets unlisted from everything I tried, minus the Apple System Profiler. To my knowledge, that's normal behavior for any device under the Classic Mac OS, but perhaps I'm using the wrong software or resources. I used both Drive Setup 1.9.2 and Hard Disk SpeedTools 3.6. I'm not sure where in the Classic Mac OS we can mount back drives, be they floppies, CDs, DVDs, internal drives, USB drives, SCSI drives, FireWire drives etc..

But I see your point: "With OS 9, it's best to rely on AppleScript only for what can be done manually."
Under OS 9, I have no idea how to manually mount back anything that has been put away, be it this FireWire drive or anything else. What path is usually followed, other than reinserting the given media/device?

I do know, however, the FireWire drive is still accessible and can be remounted purely via software, potentially: once all partitions of a FireWire drive are put away / unmounted, the partitions of that drive won't get automatically mounted under the Classic Mac OS not even if you turn the computer off (at least in my case with the Mac mini and the hacked Mac OS ROM): you have to either replug the FireWire drive or disconnect power from the Mini itself (which causes the FW drive to lose power, too) to get the Classic Mac OS to mount it. But under Mac OS X, none of that is necessary: in that exact same scenario, OS X is able to mount it back via software without any replugging or cutting power at all, automatically during startup.

So there ought to be some way to do it. I wonder if there's something I can do with the device IDs listed in the Apple System Profiler... Perhaps a non-AppleScript way?

But, of course, if this proves to be too daunting, I'll just keep doing things the way I've been. Everything works satisfactorily nonetheless. Smile

EDIT: Oops. I said something wrong I wish to correct: if I put away the FW partitions manually (after replugging the drive to get them mounted in the first place), upon restarting the Classic Mac OS, they are attempted to be mounted back by the system, which would not happen when they get unmounted during the Mac OS boot process. This means unmounting a drive with the "Put Away" command and unmounting a drive because the Mac OS ROM encountered an error when trying to boot from a partition in a drive leads to different results.
(Sorry if this sounds confusing, by the way, it is a very confusing issue, so I struggle to word the situation in a clear manner, myself.)

BryMD's picture
Offline
Joined: 2018 Jul 2

I would suggest you to try a slew of different utilities that you know to have disk functions to see if any of them are able to provoke the desired behavior at all.

On a side note: When asking for assistance in creating the Exposé-functions of Functional Keys, most people were convinced that this couldn't be done with AppleScript on OS 9. But then I found the following web site:

https://web.archive.org/web/20170322000233/https://whitefiles.org/b1_s/1...

And from this web site (as well an unspeakable amount of trial and failure) came brilliance Laughing out loud

Also, remember the existence of AppleScript Additions! There might be some disk-related additions floating out there? Who knows? Smile

Jatoba's picture
Offline
Joined: 2018 Apr 16

Also, remember the existence of AppleScript Additions! There might be some disk-related additions floating out there? Who knows? Smile

That's true, I completely forgot about that possibility, even though just the other day I was inquiring here in the Garden about uploads of certain Script Additions.

That AppleScript website you found is nuts. Looking through it, it is so clear and helpful. Definitely bookmarking that one.

One program I didn't try out yet is LaCie Silverlining Pro. Rather, I tried the one found here in the Garden, but it seems the one hosted here isn't the latest version, and that one couldn't mount the drive, either. Right now, I'm trying to find it elsewhere. (My FW drive is also LaCie, 1TB).