I have created security onion vm a distribution based on ubuntu in vmware work station with 52GB Hard disk space. But fdisk command shows me more space than I have allocated. enter image description here It shows 55.8 which I dont know it came from. Now I want to increase the root partition in guest OS for which I used fdisk utility after expanding it in VMware (now 55GB, again I am seeing 59.1). Following this link (till setp 7) I created a new partition, as can be seen below sda3

aneela@aneela-virtual-machine:~$ sudo fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 59.1 GB, 59055800320 bytes
255 heads, 63 sectors/track, 7179 cylinders, total 115343360 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: 0x0002da52

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   106954751    53476352   83  Linux
/dev/sda2       106956798   109049855     1046529    5  Extended
/dev/sda3       106954752   106956797        1023   8e  Linux LVM
/dev/sda5       106956800   109049855     1046528   82  Linux swap / Solaris

However there is something wrong as all sectors mentioned by fdisk are not in use as the last sector in use is 109049855 and I have more than that. Are others sectors not in use or what? How can I include missing sectors so that I could expand to full capacity as after that I would simply merge partitions for which there are plenty of links available.



You created a tiny ( < 1mb ) partition in the small gap before your previously existing swap partition instead of using the free space at the end of the disk. Use gparted to delete this useless partition, and expand your extended partition to the right, then move your swap partition all the way to the right, then move the start of the extended partition as far to the right as it can, then you can just grow sda1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.