Could someone who knows about Terminal give me some help?

Discussion in 'Mac Programming' started by Ripmax2000, Oct 26, 2007.

  1. macrumors regular

    Joined:
    Aug 31, 2005
    #1
    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.
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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
    Code:
    do shell script "diskutil unmountDisk disk0s3"
    Then Save As "application bundle", and add that newly created .app to your startup items in System Preferences.
     
  3. thread starter macrumors regular

    Joined:
    Aug 31, 2005
    #3
    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?
     
  4. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  5. thread starter macrumors regular

    Joined:
    Aug 31, 2005
    #5
    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.
     
  6. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #6
    "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.
     
  7. macrumors 6502a

    Joined:
    Mar 26, 2007
    Location:
    Denver, CO
    #7
    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.
     
  8. macrumors newbie

    Joined:
    Jul 3, 2007
    #8
    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.
     
  9. macrumors 6502a

    Joined:
    Mar 26, 2007
    Location:
    Denver, CO
    #9
    It would be nice to have that option...but I do not believe it exists. Email Steve..maybe he will consider it ;)
     

Share This Page