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?

1
  • Try lsblk -f and see what it gives you with regards to extended devices. Feb 2, 2017 at 11:58

2 Answers 2

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.

2
  • Thanks for that , actually the other disk was at /dev/sdb , i thought sda2 and sda5 were two disks Feb 2, 2017 at 10:21
  • 1
    @user3214546 that's odd, sdb should be shown in the output of fdisk -l. Are you sure?
    – terdon
    Feb 2, 2017 at 10:22
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .