Go Back   The macosxhints Forums > OS X Help Requests > UNIX - Newcomers



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-24-2003, 11:21 PM   #1
dmodele
Prospect
 
Join Date: Jul 2003
Posts: 1
mounting drives from terminal

hello,

I was wondering how to mount a drive from the command line and map it to a certain folder. Ive seen examples using the "mount" command but they are always for some drive that I dont have.

Is there a way to see all the available drives for mounting? For example, I have a usb compact flash card reader that automounts and shows up on the desktop. how can I mount this in terminal so I could include it in a script? How can I mount the combo drive in terminal? I guess I dont understand how to refer to these things from the command line. can someone help me?

-d
dmodele is offline   Reply With Quote
Old 07-28-2003, 04:59 PM   #2
tas
Triple-A Player
 
Join Date: Nov 2002
Location: Frankfurt, Germany
Posts: 167
I'm not an expert on this, but I played around a bit with similar problems, and i found the command "disktool" the easiest way to mount and unmount drives from the Terminal. Unfortunately, there's no man page, but if you just type "disktool," you get a somewhat helpful message:
Code:
Disk Utility Tool 2002, Apple Computer, Inc.
Utility to manage disks and volumes.
Most options require root access to the device

Usage:  diskutil <verb> <options>
     <verb> is one of the following:
     list                  (List the partitions of a disk)
     information | info    (Get information on a disk or volume)

     unmount               (Unmount a single volume)
     unmountDisk           (Unmount an entire disk (all volumes))
     eject                 (Eject a disk)
     mount                 (Mount a single volume)
     mountDisk             (Mount an entire disk (all mountable volumes))
     rename                (Rename a volume)

     enableJournal         (Enable HFS+ journaling on a mounted HFS+ volume)
     disableJournal        (Disable HFS+ journaling on a mounted HFS+ volume)

     verifyDisk            (Verify the structure of a volume)
     repairDisk            (Repair the structure of a volume)

     verifyPermissions     (Verify the permissions of a volume)
     repairPermissions     (Repair the permissions of a volume)

     eraseDisk             (Erase an existing disk, removing all volumes)
     eraseVolume           (Erase an existing volume)
     eraseOptical          (Erase an optical media (CD/RW, DVD/RW, etc.))

     partitionDisk         ((re)Partition a disk, removing all volumes)

     createRAID            (Create a RAID set on multiple disks)
     destroyRAID           (Destroy an existing RAID set)
     checkRAID             (Check a RAID set for errors)
     repairMirror          (Repair a damaged RAID mirror set)
Good luck!
tas is offline   Reply With Quote
Old 07-28-2003, 06:12 PM   #3
gatorparrots
Major Leaguer
 
Join Date: Dec 2002
Posts: 441
Re: mounting drives from terminal

Quote:
Originally posted by dmodele
hello,

I was wondering how to mount a drive from the command line and map it to a certain folder. Ive seen examples using the "mount" command but they are always for some drive that I dont have.

Try MacMounter here:
http://testuser.eshirazi.com/
Quote:
Mount volumes anywhere you choose
MacMounter allows systems running Mac OS X to mount non-startup
partitions and drives to points in the filesystem other than
the default directory, which normally appears on the Desktop.
This script will help people with early rev iMacs who are forced
to partition drives larger than 8GB. For example, they could
mount their second partition to /Users or /Applications.

gatorparrots is offline   Reply With Quote
Old 07-30-2003, 04:10 PM   #4
E5o
Prospect
 
Join Date: Jul 2003
Location: Norway
Posts: 20
Quote:
I was wondering how to mount a drive from the command line and map it to a certain folder. Ive seen examples using the "mount" command but they are always for some drive that I dont have

Ah, finally a Unix question I can answer. The easiest way I know is just to use hdid like so:

Code:
hdid <diskimagename>
it's almost instant...


peace

-E5o
E5o is offline   Reply With Quote
Old 07-31-2003, 03:46 AM   #5
tas
Triple-A Player
 
Join Date: Nov 2002
Location: Frankfurt, Germany
Posts: 167
Yes hdid is a wonderful tool. But it will only mount images, not drives...
tas is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:42 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.