Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to shrink an ext4 /home partition (/dev/sda9) to make space for something else.

I would prefer avoid live CDs (boot troubles with new EFI and. I don't have a CD/USB in hand in the office).

I can boot as root directly to command line so I can unmount /home but then, for some reasons, I can't use the GUI even for the root user, so I can't use GParted.

Is there a terminal command to resize an unmounted ext4 partition without losing data ?

share|improve this question
up vote 0 down vote accepted

Just comment out the corresponding line in /etc/fstab, reboot into recovery mode and make shure that /home/$your_user exists and has the correct permissions (mkdir -p /home/$your_user && chown $your_user:$your_user /home/$your_user). Reboot and you can use the GUI to shrink the partition.

The terminal command for EXT filesystems is resize2fs, depending on the partition table you have to use different tools to resize the partition (e.g. fdisk or gdisk), but I would recommend using the GUI.

share|improve this answer
yes, at the ned I used gparted. Thanks for the suggestion, I didn't tought to just comment /home in fstab.. – Antonello Apr 10 '13 at 5:47

Your Answer


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.