I want to know how many partitions are in my system and I used fdisk (found the command on google). The following came out, and I'm not too sure where it says how many partitions.

# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 41943039 20971519+ ee GPT

Disk /dev/mapper/vg_virtualcomputerelmo-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders, total 4128768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_virtualcomputerelmo-lv_swap doesn't contain a valid partition table

Disk /dev/mapper/vg_virtualcomputerelmo-lv_root: 18.8 GB, 18824036352 bytes
255 heads, 63 sectors/track, 2288 cylinders, total 36765696 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_virtualcomputerelmo-lv_root doesn't contain a valid partition table

ok I did something else this time, but I still don't understand what it's saying:

cat /proc/partitions
major minor #blocks name

11 0 619520 sr0
8 0 20971520 sda
8 1 1024 sda1
8 2 512000 sda2
8 3 20456448 sda3
253 0 2064384 dm-0
253 1 18382848 dm-1

You could run:

df -h

This will show you the amout of free disk space of each partition on your system (the "-h" formats it to be a little easier to read).
This way you also get a list of all your partitions.

You can also view the contents of the fstab file.

cat /etc/fstab

This file lists your disk partitions and how they are configured.

Hello,

The first command you ran (fdisk -l) was perfect for showing the partitions and did give you the information about your drive. The tricky part is you are using some sort of virtual system and not seeing true disks. Your drive (/dev/sda) or device scsi disk a is a 21.5GB Hard disk and is partitioned into 2 partition (sda1 and vg_virtualcomputerelmo ) sda1 is the boot partition and vg_virtualcomputerelmo is a volume group containing 2 logical volumes (root or /, and the swap logical volumes). The commands vgdisplay and lvdisplay will show you the volume group and the logical volumes created in that volume group.

To see all partitions on all discs, run the command "fdisk -l".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.