Not specifically Archlinux, but I am using Archlinux on my laptop, so I thought I’ll ask here.

I am planing to replace my 1 TB M.2 SSD in my laptop with a 2 TB M.2 SSD, and I am wondering how to clone the whole 1 TB SSD and restore it onto the 2 TB M.2 SSD.

I have read about people using $dd for that, but I never did that. Can anybody confirm that this is possible?

I am running two partitions, one boot and the other one is a crypt device with btrfs + subvolumes inside.

Is there anything I have to consider, before doing this?

Thank you for your time.

  • pkru@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I’ve done something like that before with ddrescue though the example on the Arch wiki ddrescue page shows how to copy an entire drive to another drive. Here’s how to backup to a file instead:

    sudo ddrescue -f -n /dev/sda1 /path/to/backup.hdimage /path/to/backup.mapfile
    

    But I’d reference the docs just to double-check: https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

    You might need to restore the image via Arch recovery mode with a bootable USB drive loaded with the Arch ISO however.