Repartitioning and moving Manjaro to new partition

Hi everyone! I have an operation to do and I have some ideas on how to do it properly. But, before messing things up, it’s probably better to ask someone’s opinion. My operation is quite similar to the one in the topic Resize partition - dual boot, but my situation has some differences. Right now, I have on my laptop 2 ssds, one is for Manjaro, the other one is for Windows. What I care about now is the one of Manjaro. It is partitioned as follows:

nvme1n1p1 is a fat32 boot partition (here’s the grub that allows me to choose operating system and boot options)

nvme1n1p4 is a linux-swap partition

nvme1n1p2 is a fat32 partition with shared data with Windows (those data are all backed up)

nvne1n1p3 is an ext4 partition (empty)

nvme1n1p5 is a btrfs partition with Manjaro installed

What I would like to do is merging the “p2” and “p3” partition, copying Manjaro in the new partition (which I will format in btrfs) and then deleting the old btrfs partition to expand the new one to the end of the disk. In other words, I would like to end in something like this

nvme1n1p1 is a fat32 boot partition (here’s the grub that allows me to choose operating system and boot options)

nvme1n1p4 is a linux-swap partition

nvme1n1p?? is a btrfs partition with Manjaro installed

I thought to use CloneZilla or a gparted to do the 1st part of the job, but I don’t know how to change the path of the \ directory in both the system and the bootloader.

Thanks in advance to everyone!

you need to

  • suppress part3
  • suppress part2
  • create new partation Size ( p2+p3)
  • then copy p5

go in chroot and update /etc/fstab

sudo lsblk -fs ( will give you UUID if required )
sudo parted -l 
1 Like

Hi, thanks for your answer. Sorry for my maybe dummy question, but what do you mean with “go in chroot and update /etc/fstab”?

I guess that the other two commands will update the partitioning

from USB iso manjaro

sudo manjaro-chroot -a ( type 1 if only one line )
nano /etc/fstab
exit ( end chroot )

Thanks! I’m having some problems with the copying of the Manjaro’s partition so it will take a while before I end this operation

EDIT I solved the copying issue, but the chroot didn’t work because it read my external USB drive with Manjaro as device with a grub to edit, not the ssd. Then I tried to fix things manually (I looked on the Manjaro-wiki) but not everything worked. I figured out that some differences are due to the “@” directory of the btrfs filesystem, and so I overcome only some things, but still I did not manage to make everything work. If someone has some words of advice for my situation I would be glad to try, otherwise I’m forced to format everything

In the end I reinstalled Manjaro, I think the btrfs filesystem is still not well documented (or I’m not very expert :slight_smile: )