Greetings, noob here.
Recently I wanted to dual boot another linux distro besides my Manjaro. The problem is that my root partition (ext4) spanned across the entire disk (with the exception of swap and boot partitions) so I figured that I had to shrink my root partition by an ammount (100GB would do fine for my needs) and in the new unallocated free space, create a new partition where the other linux distro would reside.
I booted in the live enviroment of the other distro and attempted to shrink my root partition with GParted.
GParted would not finish the task with an error “unsupported FEATURE_C12”.
Now my streak of mistakes begins.
I desided that I would resize the partition anyway with parted. I shrinked the partition by the desirable ammount and then I had to resize the filesystem with resize2fs. Resize2fs would not excecute and prompted me to download a newer version of resize2fs because of the unsupported feature. I tried to remove the unsupported feature with tune2fs with no luck. I don’t remember the error that I got but it would not complete the job so I downloaded the newest version (1.47.0) of resize2fs and ran it. This time it prompted me to excecute fsck -fy on the partition before continuing. Fsck -fy would complete its excecution with a ton of errors regarding inodes etc (echo $? would print “8”). After excecuting fsck I retried to excecutre the new version of resize2fs but it just prompted me to excecutre fsck -fy (which I did many times).
Of course I know that I should have just left it alone from the start and figure a different solution but since I did not have any important data on the disk I figured “what the hell, lets play a bit”. The result was obviously that I could not boot anymore to Manjaro. It prompted me to start the kernel because of “…out of bounds…”. Sorry that I dont remember the exact errors. Finally I just reinstalled Manjaro and the other distro on the partitions that I made with parted and be done with it.
What was the correct way of handling this kind of situation? I could not figure out how to resize the root partition without loosing the data.