2

I purchased a computer and installed Ubuntu 16.04 from a USB drive which I created myself. I then upgraded the computer to 16.10 and installed SpaceView to see the disk usage on the computer as an applet. There are three partitions it shows:

  1. /dev/mapper/ubuntu--vg-root
  2. sda1
  3. sda2

I am confused, though, because I did not partition my system myself at all, and am totally new to partitioning at all. I also don't have any external drives plugged in.

Are these partitions default partitions for Ubuntu? If so, what are they for?

Andrew
  • 147
  • 6
  • @user68186 I get that that is (probably) what my overall disk usage is, but I don't know what sdx is, and I don't know why there are two other partitions either when I don't have any drives or anything else. – Andrew Oct 29 '16 at 04:19
  • Generally Ubuntu uses one for swap memory, one for home, and one for root memory..not sure if these are same – minigeek Oct 29 '16 at 04:22
  • 1
    Did you choose full drive encryption or full drive LVM, both are full drive configurations typically using two physical partitions and inside the second physical partition is all your logical partitions. If UEFI you should have another FAT32 ESP - efi system partition for UEFI boot. https://wiki.ubuntu.com/Lvm LVM is not the standard install which just uses / & swap as two physical partitions, but is required if you want full drive encryption. It is a more advanced partitioning scheme. Make sure you have really good backups as recovery from encryption is difficult or impossible. – oldfred Oct 30 '16 at 20:44

2 Answers2

6

Those could be the default partitions if you told the initial installation of Ubuntu to do its own thing. Ubuntu 16.04 now defaults to LVM partitioning schemes, so yes, you are probably seeing the sda1 and sda2 as partitions on the physical drive where the /dev/mapper/ubuntu--vg-root is logical to probably the sda2 partition.

One way I like to see all the partitions and it might make more sense, open a terminal window by pressing Ctrl+Alt+T. Then type in the following command to show the mount points of the drive: I will give mine as an example.

  lsblk -o NAME,SIZE,MODEL,FSTYPE,MOUNTPOINT

Edit: Here is a VM I set up with LVM configuration:

terrance@ubuntu-LVM-test:~$ lsblk -o NAME,SIZE,MODEL,FSTYPE,MOUNTPOINT
NAME                                      SIZE MODEL          FSTYPE  MOUNTPOINT
sda                                        30G VBOX HARDDISK          
├─sda1                                    243M                        /boot
├─sda2                                      1K                        
└─sda5                                   29.8G                        
  ├─ubuntu--LVM--test--vg-root (dm-0)    25.8G                        /
  └─ubuntu--LVM--test--vg-swap_1 (dm-1)     4G                        [SWAP]
sr0                                      55.8M CD-ROM         iso9660 

You can also use parted with it to check partition types and sizes to match:

terrance@ubuntu-LVM-test:~$ sudo parted -l
[sudo] password for terrance: 
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  256MB   255MB   primary   ext2         boot
 2      257MB   32.2GB  32.0GB  extended
 5      257MB   32.2GB  32.0GB  logical                lvm

The drive that booted then the LVM was mounted after boot will show the mount point as /boot, then the /dev/mapper/ubuntu--vg-root will show as /. The home / was mounted in my extended partition there, and the swap was mounted as well in the extended. My sda2 is the start of my extended partition, then sda5 is my LVM.

sdx is just a designation that they use for physical hard drives, as in sda or sdc, etc. And sdxN is what they use to specify partitions, like sda1 or sda5.

Hopefully this might help explain a little better about the partitions.

Terrance
  • 41,612
  • 7
  • 124
  • 183
0

If you go old school then

sudo fdisk -l

or

sudo sfdisk -l

But it is limited.

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

PaSe
  • 29
  • 1