Expanding parititions Backup partition table fdixk -x /dev/ sfdisk -d /dev/ > partition.dump Shrinking EXT(2,3,4) file system to minimum size e2fsck -f /dev/ resize2fs -M /dev/ Editing partition table and restore After shining the last partition you need to: Image it (see the other pages) and any other portions that need to be moved. Use fdisk to delete the resized last partition. Move other partitions (keeping exact size). Expand the target partition (keep starting sector unchanged). Copy data from images into moved and last partition. Resize the target partition and the last partition to max size with resize2fs /dev/ . Use fdisk 's expert mode ( x ) to print full partition information and to restore partitions UUID, name and attributes. To resize vfat (FAT32) partition you can useĀ  fatresize -s max /dev/ (from parted package).