The Linux system occupy around of 6 GB and 3-4 GB of free space is not enough for our needs. So to create a new partition of 10 GB would be great. But don't have empty space to create this partition. If the system is installed on a Virtual machine, we can create a new Virtual Hard Disk.
But we have a lot of free disk space on a external or internal hard disk formatted on NTFS for example. We can mount NTFS partitions on Linux but we can't use its to builds sources because usually the build system need a Linux partition.
So, the best solution in our case is to create a Linux disk image file and format it using a Linux file system like ext3 or ext3.
First we have to create a file having the size of new partition and filled with 0:
The disk.img file of 200 MB size should be created.
Next we have to build the ext3 Linux file system on the created file:
mkfs.ext3 ./build_partition.img
Now we can mount the new partition:
sudo mount -oloop ./build_partition.img ./mnt/build_partition/
Or unmount the partition:
sudo umount /dev/loop0