1
# 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>

1 Answer 1

2

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

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

You must log in to answer this question.

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