Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
# fdisk -l

Disk /dev/sda: 34.4 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d5d11

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1265    10155008   83  Linux
/dev/sda2            1265        1457     1544192   82  Linux swap / Solaris

My virtual machine have 34.4 GB disk, I had already divided it into 2 partitions /dev/sda1 (9.68 GiB) for root path and /dev/sda2 (1.47 GiB) for swap area, so that I have remain free space about 20.84 GiB

I can format unallocated space via Gparted, but If I want to use command line such as mke2fs to handle this job, how I can refer to that free space to complete this command line.

mke2fs -jv /dev/<xxx>
share|improve this question

1 Answer

up vote 2 down vote accepted

You don't. You create a partition using the free space, and format that.

share|improve this answer
how I can do that? I need command line version for this job. – Smile Jan 22 at 20:36
@Smile, with fdisk of course, or parted is a bit friendlier. – psusi Jan 23 at 15:30
finally, I ended up with gparted :/ – Smile Jan 23 at 20:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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