Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have searched around and found this page. But is GUi tool.

IS there a command line tool I can use to shrink one of my partition size

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0009b200

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    60158297    30078125   83  Linux
/dev/sda2       616775678   625141759     4183041    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda3        60160000   616773631   278306816   83  Linux
/dev/sda5       616775680   625141759     4183040   82  Linux swap / Solaris

I would like to resize /dev/sda1 partition

share|improve this question
add comment

2 Answers

As /dev/sda1 is your boot partition, you are not going to want to resize it while the system is live, nor would be likely able to.

For your best bang for your buck, use GParted. It's a dedicated distribution which boots to a minimal GUI specifically for resizing and moving partitions around. It will handle all aspects of the resizing for you, including defragmenting (when moving NTFS or FAT partitions), shrinking partitions prior to a move (if required), and expanding the partition to fill the space available on the drive.

share|improve this answer
add comment

You can't resize a partition while its filesystem is mounted. So boot from a live CD and use fdisk do do the resizing of the partition. After that use resize2fs. Basically thats it.

share|improve this answer
add comment

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.