PDA

View Full Version : Could someone who knows about Terminal give me some help?




Ripmax2000
Oct 26, 2007, 11:13 AM
Hi there, I just need some help from someone who knows about Terminal.

Using a thread I found a few months back ( http://forums.macrumors.com/showthread.php?t=234583 ) I have been able to have my Bootcamp disk unmount on startup. However I have just upgraded to Leopard and the drive is back.
I have used the steps provided again, but this time it does not seem to work.
I have pasted what I get when I type diskutil list, does anyone know what I have to type next?

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *698.6 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS Macintosh HD 623.0 Gi disk0s2
3: Microsoft Basic Data 75.3 Gi disk0s3


Thanks in advance.



kainjow
Oct 26, 2007, 11:24 AM
The thread you linked to seems to do this the complicated way. The simplest way is to open Script Editor (/Applications/AppleScript), create a new script, and enter do shell script "diskutil unmountDisk disk0s3"Then Save As "application bundle", and add that newly created .app to your startup items in System Preferences.

Ripmax2000
Oct 26, 2007, 11:50 AM
Just tried it, typed what you wrote, pressed Compile the hit run. It says AppleScript error - Unmount of disk0s3 failed: at least one volume could not be unmounted.

If I right-click on the drive I can eject it though, any ideas?

kainjow
Oct 26, 2007, 12:05 PM
Is your disk mounted?

Ripmax2000
Oct 26, 2007, 12:11 PM
Yeah, the disk was mounted when I tried that. It's only when that didn't work I tried unmounting it manually.

Is Leopard's Terminal different to Tiger's then? Because the previous way was working fine in Tiger, but when I type it under Leopard it doesn't work.

ChrisA
Oct 26, 2007, 12:20 PM
The thread you linked to seems to do this the complicated way. The simplest way is to open Script Editor (/Applications/AppleScript), create a new script, and enter do shell script "diskutil unmountDisk disk0s3"Then Save As "application bundle", and add that newly created .app to your startup items in System Preferences.

"Complicated way" I think not. Much simpler to never mount the drive then putting and unmount script in a startup folder. Ok, the method could have been even simpler. Rather then edit the line in /etc/fstab you could isimply comment it out.

I don't have Leopard installed yet. It could be that they've changed the way drives get mounted. Some Linux distributions or Solaris are moving away from simply using /etc/fstab like BSD UNIX has done since the mid part of the last century. Perhaps Leopard is followig this lead.

In any case the simplest thing is to simply remove the drive from the list of what gets automatically mounted at startup.

Until how to do this becomes clear (a few days after Leopard is on the street) why not simply "eject" the drive using the mouse.

wildcardd
Nov 4, 2007, 09:49 AM
Don't know if you have figured it out yet, but I think I have.

Leopard doesn't like the unmountDisk command for some reason. Try removing the Disk portion of the command, so only unmount is still there. Like this:
do shell script "diskutil unmount disk0s3"

Weird, but it worked.

amsukalski
Nov 5, 2007, 10:29 PM
I'd be really interested in finding out how to make Leopard not mount my Windows partition in the first place, rather than starting an AppleScript at Login to unmount the drive. Anyone know how to do this? I'd really appreciate it.

wildcardd
Nov 6, 2007, 10:01 AM
I'd be really interested in finding out how to make Leopard not mount my Windows partition in the first place, rather than starting an AppleScript at Login to unmount the drive. Anyone know how to do this? I'd really appreciate it.

It would be nice to have that option...but I do not believe it exists. Email Steve..maybe he will consider it ;)