My approach may be overkill but here goes; what follows is what happens when I follow Bill's recommendation invoking the commands from within Terminal:

Welcome to Darwin!
Arakus:~ aguila$ su
Password:
Arakus:/Users/aguila root# pdisk -l
pdisk: no command specified
usage:  pdisk <raw device> <option>
        where <raw device> is the live partition ie. /dev/rdisk0
        and <option> is one of the following:
Option
-blockSize                              : display the block size used by the map
-dump                                   : dump the list of partitions
-isDiskPartitioned              : is the disk partitioned
-diskSize                               : prints the size of the disk in megs
-partitionSize                          : get the partition size in blocks
-partitionBase                          : get the partition base in blocks
-partitionType                          : get the partition type
-partitionName                          : get the partition name
-partitionEntry                         : get the partition name, type, base, 
and size
-splitPartition                         : split an existing partition in two 
pieces
-createPartition                        : create a new partition
-initialize                             : initialize the partition map
-deletePartition                        : delete a partition
-getPartitionOfType             : get partition of specified type
-getPartitionWithName           : get partition with specified name
-makeBootable                   : make a partition bootable
-setAutoMount : set or clear the auto-mount bit for HFS volumes
-setWritable                            : set or clear the writable bit in the 
pmap
For more info on the option, type pdisk <raw device> <option>
Arakus:/Users/aguila root#

This is obviously not what Bill expected to see. Within the Linux environment the command sequence "pdisk -l" indeed does produce a list of what the Linux OS sees as attached to its SCSI chain. The background information is that Linux interprets all devices as SCSI devices regardless what they are and so programs and modules are written (and included in the kernel) so that all kinds of devices are enabled to be useful and visible in that context. pdisk refers to such a table or database where those identifications are made.

Even the command "pdisk -h" produces an unexpected sequence of events. Here is how Panther replies to the command sequence "pdisk -h" in the same superuser session:

Arakus:/Users/aguila root# pdisk -h
pdisk: no command specified
usage:  pdisk <raw device> <option>
        where <raw device> is the live partition ie. /dev/rdisk0
        and <option> is one of the following:
Option
-blockSize                              : display the block size used by the map
-dump                                   : dump the list of partitions
-isDiskPartitioned              : is the disk partitioned
-diskSize                               : prints the size of the disk in megs
-partitionSize                          : get the partition size in blocks
-partitionBase                          : get the partition base in blocks
-partitionType                          : get the partition type
-partitionName                  : get the partition name
-partitionEntry                         : get the partition name, type, base, 
and size
-splitPartition                         : split an existing partition in two 
pieces
-createPartition                        : create a new partition
-initialize                             : initialize the partition map
-deletePartition                        : delete a partition
-getPartitionOfType             : get partition of specified type
-getPartitionWithName           : get partition with specified name
-makeBootable                   : make a partition bootable
-setAutoMount : set or clear the auto-mount bit for HFS volumes
-setWritable                    : set or clear the writable bit in the pmap
For more info on the option, type pdisk <raw device> <option>
Arakus:/Users/aguila root#

That the command pdisk -l and pdisk -h produce the same output is something that only the very, very few would be interested in exploring. For this time and place... it will be acceptable to merely note that pdisk is not behaving within OS X as it does very nicely in Linux. This effectively demonstrates that what works in Linux may not work in OS X; the operating systems are very different and one is (as we all are) definitely challenged to learn the nuances -- however, for all practical purposes only a few of "us" really want to dive into the OS very deeply. That has always been the case.

The beauty of OS X of course is that one is free to dive into Darwin/BSD Unix as deep as one wishes, or not at all. This is something like deciding one's religion or one's philosophy. Why one does one journey or has a particular interest is very much left to one's private choices. One function, just as one command, does not always apply or work similarly across operating systems. The function man, however does function in OS X, as it does in Linux and other Unix variants. Ferreting out which does what when will be the task of those who are interested in going "where few have gone before".

If you have a Mac running Mac OS X and a version of Linux, take the time to catalog where the similarities and differences lie on your own for your own reference as you move forward on whatever project you are programming for. There may be references available but just not for what you are interested in doing; so as usual how deep one goes remains a personal choice....

Best wishes...

On May 28, 2005, at 5:31 PM, Bill Fink wrote:

On Fri May 27 2005, Charles Trois wrote:

I am not sure of the name of my Firewire drive.

In Mac OsX, the command

diskutil list

in the terminal produces an exhaustive list of disks (including CDROM,
Firewire, etc) and their partitions, but shows them under names such as
/dev/disk0, etc, not suitable for Linux, that requires /dev/hda, etc.

Is there in Linux a tool working in the same way, that would supply the
proper names?

Thanks for all hints.

Charles,

The command you want is "pdisk -l" (must be run as root).

                                        -Bill
_______________________________________________
yellowdog-general mailing list
[email protected]
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'


_______________________________________________
yellowdog-general mailing list
[email protected]
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'

Reply via email to