While playing with GParted my partition table was damaged in the sense that an extended partition ended after the end of disk.
To fix it I used TestDisk to backup the current partition table and removed the partition losing quite a lot of data. When I looked at the backup TestDisk made, it's a text file with just the start and end of partitions written in clear text.
I was wondering if I could edit them, reducing the size of the offending partition and restoring the backup file using TestDisk, thus changing the partition size in the partition table without removing the entry.
Can I do that keeping in mind that the offending partition is empty near the end so no data loss would occur from me moving the boundary of the partition in the partition table?