Hello,

 *** WARNING: Long message containing examples ***

On Mon, 29 Oct 2001, Michael  Arolan wrote:

> How can I see all the partitions on my hard disk whether mounted by Linux or
> not?

First determine which hard drives you have.

If you have IDE drives, then the Primary Master drive is called
/dev/hda, and the slave is called /dev/hdb. The Secondary Master is
/dev/hdc, and slave is /dev/hdd.

If you have SSI drives they'll be called /dev/sda, /dev/sdb etc according
to their SCSI IDs and location on the SCSI chain.

You can use the 'dmesg' command to see if Linux sees your drives. Grep for
your drive name. For example, to look for /dev/hda, do this:

  % dmesg|grep hda
      ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:DMA
  hda: Maxtor 98196H8, ATA DISK drive
  hda: 160086528 sectors (81964 MB) w/2048KiB Cache, CHS=9964/255/63,
  UDMA(66)
   hda: hda1 < hda5 hda6 hda7 hda8 hda9 hda10 hda11 hda12 > hda2

Let me explain what an Extended partition is.

You can only have four primary partitions on an IDE drive (well, under
Linux anyway). But sometimes you want more partitions than just four (in
fact I always do!) The solution to that is an Extended PArtition. You
create a large 'Extended' partitions, and then you create little
partitions inside of THAT partition. These are called Logical partitions.

The last line of my dmesg output is informative of this; it tells
you what partitions are on that drive. You can see that /dev/hda1 is an
extended partition containing /dev/hda5 - /dev/hda12, and that /dev/hda2
is a primary partition.

It doesn't obviously state that information, but you can then is use the
fdisk command to see partition information for that drive:

  % fdisk -l /dev/hda

  Disk /dev/hda: 255 heads, 63 sectors, 9964 cylinders
  Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1             1      7833  62918541    5  Extended
  /dev/hda2   *      7834      9964  17117257+   c  Win95 FAT32 (LBA)
  /dev/hda5             1        17    136489+  83  Linux
  /dev/hda6            18        50    265041   82  Linux swap
  /dev/hda7            51        83    265041   82  Linux swap
  /dev/hda8            84       214   1052226   83  Linux
  /dev/hda9           215       345   1052226   83  Linux
  /dev/hda10          346       998   5245191   83  Linux
  /dev/hda11          999      2304  10490413+  83  Linux
  /dev/hda12         2305      7833  44411661   83  Linux


You can use the output from the 'df' command to see which partitions are
mounted and which aren't.


HTH,


-Yaron

--