How to clone Manjaro from one disk to another?

I have Manjaro running smoothly and perfectly fine.
I recently upgraded my processor and motherboard. My new motherboard supports m.2nvme and I have one 240gb m.2nvme disk.
Currently my Manjaro is in my ssd and I want to move it or I say completely clone it to nvme disk for a little performance boost.
I tried to backup my ssd with timeshift and restore on freshly formatted m.2 disk. But I got error saying operation completed but with error.

Check my config also

Is there any other solution for this ? Or I am doing something wrong?
Please guide me …
Thanks. :slight_smile:

1 Like

Hey there,

I would suggest to check Rescuezilla (https://rescuezilla.com/), open-source easy-to-use disk imaging app that’s fully compatible with Clonezilla.

3 Likes

You can use clonezilla or dd with live usb.

1 Like

Are you dual-booting with Windows or another distro? If not, it makes things much simpler.


You can literally “clone” the entire drive from one to another using dd.

This will copy the GPT partition table, alignments, partitions, flags, EFI boot loaders, and your filesystems and their contents.

However, you will then need to “grow” your home ext4 filesystem to fill in the remaining space. (This requires a multi-step process.)


It would help to list your current partition setup.

lsblk -o name,label,size

Thank you all for suggestions.
I tried Rescuzilla and cloned my ssd to my m.2 successfully. But my m.2 drive is not showing on boot options.
In Manjaro’s disk’s utility, my both drives are showing same architecture and partitions. But m.2 is not showing on boot menu.
Why?

Did you check the bios of your computer? In some situations Fast Boot (set to ON in the bios) makes that Linux / Grub does not see the nvme drive. Changing that to Fast Boot Off solved it for me on an ASUS B360M motherboard.

1 Like

So you still have your old drive plugged in?
Have you changed the UUIDs?
Have you updated grub?

1 Like

No nothing changed. Di I have to change something ?
Yes my old drive still plugged in and in bios only that(old) drive is showing for boot.

You need to remove the other device.

Cloning usually doesn’t change the partition GUIDs UUIDs which modern installs will be using in both /etc/fstab and GRUB, so in this case you’ll have GUID UUID collisions while both are connected.

3 Likes

I’d say you have 3 options:

  1. You can remove one disk, then the other should be used. You may need to select it in BIOS/UEFI.

  2. You can change the UUIDs on your new disk, update /etc/fstab (crypttab if you use encryption) on your new disk with the new UUIDs and then sudo update-grub. You can use lsblk -f to get the UUIDs. A quick search found this: How to Change UUID of Partition in Linux Filesystem, Changing the UUID of a FAT32 or NTFS Partition. Afterwards you may want to resize the partitions if your new disk is bigger. If they’re encrypted and need resizing probably best to copy them over like below after reading about dmcrypt and making the appropriate preparations.

  3. You can redo it without cloning. May be a bit much since you already cloned it, try the other options first.

Cloning is not the best way to move/copy an install, there are a number of problems, especially if you want both disks in the computer at the same time.

  1. If the new drive is bigger then you’ll need to resize partitions to use the extra space, this can cause data loss (you may have to copy the files over manually anyway).

  2. The partition layout may restrict how you use the extra space, though you can create new partitions and mount them instead of resizing it’s still somewhat restrictive.

  3. It copies everything including the UUIDs which are meant to be unique. These need to be changed and then the config files updated.

  4. If the new drive is smaller then you can’t clone anyway, since it copies empty space too.

The way I’d use may be a little more long winded but allows full freedom in partition size and layout and automatically generates new UUIDs. That is to create a partition table and partitions on the new disk, copy everything over, update fstab on the new disk, update grub, and optionally install grub on the new disk so you can remove the old one.

The way I'd use, step by step
# if you use encryption it's more complex, 
# check dmcrypt article in arch wiki
# if option 3 from above works then it's probably the 
# easiest and quickest way, assuming no re-sizing

# It should be done using a live USB, but can be done
# from a running system, the latter is not recommended
# have a live USB to hand if you do it

# 1. Make a live USB.
# 2. Boot live USB.
# 3. Use gparted to make a partition table and 
# partitions on your new drive.

# 4. Make dirs to mount partitions
sudo mkdir /mnt/{old,new}

# 5. Find which disk is which 
lsblk -f

# 6. Mount old and new partitions 
# replace sdXY with correct id, eg sda1
sudo mount /dev/sdXY /mnt/old
sudo mount /dev/sdXY /mnt/new

# 7. Copy files
sudo rsync -haxogSHAWX /mnt/old/ /mnt/new/

# 8. Make sure it's copied over
sync

# 9. Get UUIDs
# best done in another terminal 
# makes copy/paste easier
lsblk -f

# 10. Update the UUIDs in fstab,
# copy/paste and double check they're correct
# Ctrl + X followed by Y then Enter to save and exit
sudo nano /mnt/new/etc/fstab

# 11. Unmount partitions
sudo unmount /mnt/{old,new}

# 12. Repeat steps 5-8, plus 11 for each partition
# that needs to be copied.
# Steps 9 and 10 are just for the root partition,
# though you do need to update all the UUIDs.

# 13. Update grub
sudo update-grub

# 14. Reboot, select new one

# 15. Check you've booted the new one
# if not reboot and select the other entry
lsblk

# 16. Install grub to your new drive
# means you can remove the old drive
# consult manjaro and/or arch wiki for details
4 Likes

I am using Manjaro on my laptop on a dual-boot setup with Windows 10, which the latter is proving to be very disabling on my more-than-10-year old laptop hardware. I am still a linux novice but am deciding to go with Manjaro as its rolling release model is great.

On the other hand, I have previously installed Fedora v34 (now not supported) on my 1TB m.2nvme external SSD which I would like to replace with a clone of my Manjaro setup.

Is it possible to just clone my Manjaro over to the external SSD over existing Fedora installation on EXT4 partitions without wiping the whole drive as I have loads of other data on other partitions on that external drive?

1 Like

Yes, please read others answers on this thread…

It depends on what you mean by “clone”.
You certainly should not attempt to use dd for this.

Instead, simply create the same (number and type of) partitions (that your Manjaro is using)
on the ssd
(in the space that Fedora was using - thereby wiping it out)
then mount them in the correct order
and simply use rsync or cp to copy from old to new drive
Do this copying using a live system - not from the running Manjaro system!

Of course you have to adapt /etc/fstab to reflect the correct names of the new partitions
and you’ll have to reinstall the boot loader.

There are indeed threads here that describe this rather simple procedure.

I wrote an article, I think it will be useful to you. Can be put on any drive https://masterpro1.ru/vosstanovlenie-manjaro-na-drugoj-disk-libo-razdel-s-pomoshhju-timeshift/. Ставим систему Восстановление MANJARO на другой диск, либо раздел, с помощью TIMESHIFT - YouTube обязательно логин со старой системы

We install a new system, and mark it as it was, with the same file system, set the same user and password.
We open the folder in the TimeShift program using the “Browse Files”, on the tab with the date of the copy made, we find the info.json file, for example, open it with Notepad. We change the sys-uuid number to the one you now have in the new system, for example, using gparted, we look at the uuid of the Root partition, and paste the number into the file and save it. After that, open the localhost folder, find etc / fstab, or by searching, open it with notepad as well, edit the file, changing all uuid to the new ones that you now have on the new system. Everybody! We start recovery.
After starting, go to grub and change the uuid of the swap file

$ sudo nano /etc/default/grub
$ sudo update-grub

Thanks, Nachlese. This rather simple procedure for you is a minefield for me, lol…at least until I learn how to navigate better.

Besides having the same number of partitions as my existing Manjaro system, do the partitions all have to be the same sizes as well?

I want to add that, currently:

  • external 1TB m.2nvme SSD is dual booting Fedora (ext4 1GB /boot and ext4 283GB /root) and Windows10.
  • laptop is dual booting Manjaro (fat32 1GB /boot; ext4 45GB / and ext4 80GB /home) and Windows10.

Intention:
I would like to migrate (clone) Manjaro to replace Fedora on the external SSD and be able to use Manjaro independently on laptop as well as external SSD and syncing (backing up) both regularly.

I foresee that, as I become more proficient with using Linux that I will not be using Windows much if at all.

Any help to get me to set this up properly would be much appreciated.

Thanks, angel2035. I would have to understand the basics first before even knowing what you are talking about. Cheers