6

This is output of df -h

Filesystem      Size  Used Avail Use% Mounted on
udev            7.9G     0  7.9G   0% /dev
tmpfs           1.6G   25M  1.6G   2% /run
/dev/sda5       917G  2.1G  868G   1% /
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup

This is fdisk -l

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048     487423     485376   237M 83 Linux
/dev/sda2           489470 1953523711 1953034242 931.3G  5 Extended
/dev/sda5           489472 1953335295 1952845824 931.2G 83 Linux
/dev/sda6       1953337344 1953523711     186368    91M 82 Linux swap / Solaris

As you can see, I am not able to access /dev/sda2. I want to mount it on /data. How can I do that?

George Udosen
  • 36,677

2 Answers2

14

You can't. That's not an actual partition, it's an "extended" partition. These are special partitions that only exist to contain other partitions. They are a trick to allow more than the maximum number of logical partitions the classic MBR partitioning scheme can understand.

In your case, your extended partition sda2 contains two logical partitions: sda5 and sda6. You have both of these mounted, one at / and the other as a swap partition. There's nothing left for you to mount.

terdon
  • 100,812
5

You can't ! /dev/sda2 is an extended partition that contains /dev/sda5 and /dev/sda6.

You can (if the Extended tag in the Type column isn't enough) see that Start for /dev/sda2 is smaller that Start for /dev/sda5. And End for /dev/sda2 is the same that End for /dev/sda6.

Soren A
  • 6,799