I am trying to clean up my partitions and wondering the best way to do this without making my computer unbootable or having to resinstall Ubuntu.
Here's what my current partition setup looks like:
I dual boot into Windows and would like to keep that partition active (/dev/nvme0n1p3). Otherwise I'd like to collapse all of the other partition, except for swap, into a single linux ext4 partition. Is there a way to convert and merge the large ntfs partition (Media) into the current ext4 / partition and recapture the unallocated space?
I'd recommend getting a separate drive. You really only need a 250GB for the NTFS partition to fit on. Then create an image of that partition on the new drive
dd
will work but it's slow. Maybe try:Clonezilla Live: http://clonezilla.org/ The tutorial for Clonezilla can be found here. I've never used this tool though, so I can't speak to it. I found the info from How to make a disk image and restore from it later?
Once you have your backup, I'd recommend creating a your new partition, pro tip -- go with XFS, not ext4, for better performance, and then copy your current EXT4 partition data over, making sure to preserve permissions/ownership, and then extract or merge your old NTFS data over. If you created an image just mount it using
mount -o loop ...iso /mnt/yourMountPoint
By the way XFS can be shrunk but it's a real pain, so just plan on expanding/extending it later if you need to.
Good luck!