Hi, everyone!
I’ve been using openSUSE Tumbleweed for a year now, and have had a very good experience with it, with a few minor hiccups happening along the way. I recently got a new M.2 SSD that I want to replace my 6 year old 2.5in SSD (the one currently running openSUSE Tumbleweed) with.
I have used Rescuezilla before so I gave the Clone option on it a try, and it failed about as soon as it started cloning the BTRFS partition. I decided I would try Clonezilla, as maybe it was more updated and could handle it where Rescuezilla could not. I was wrong. they both give out practically as soon as they start partclone on the BTRFS partition. Before I start doing any console commands, basically all I could find were forum posts from 3-4 years back, and besides that, I’m not always too comfortable just blindly putting commands into the terminal when I don’t fully know what they are doing, I wanted to reach out to the community and maybe someone can point me in the right direction or tell me what worked for them?
I would like to clone the old 2.5in SSD to the new M.2 SSD, and have everything exactly as it was, just with more space now. Is this possible with any GUI, or if not, can someone please help point me or talk to me about my options? Thank you! :)
I also recommend dd on a live USB, but with some advice.
First off - and I’m really surprised nobody’s warned you - be EXTREMELY CAREFUL with dd; it is a very powerful tool, but with great potential for data loss. Check your command over and over again to make sure it’s doing what you want before running it, and make sure you have a backup beforehand; it will happily mow over any disk you tell it. Also, do it when you’re fully awake, not at 1 AM or something.
I would call myself an experienced dd user, and even I messed up once recently; I was trying to create a bootable USB when I was really tired. Instead, I overwrote a drive. Luckily, it wasn’t my root drive, and I had a full backup of its contents, so I was able to reformat the drive and restore from backup.
Also, don’t run a bare minumum dd command like
dd if=/dev/whateverdevice1 of=/dev/whateverdevice2; it’s going to be an absolute pain in the rear.dd bs=1M oflag=sync status=progress if=/dev/whateverdevice1 of=/dev/whateverdevice2bs=1M: The size of block it tries to copy at a time. Play with this a bit, as different drives have different optimal block sizes.oflag=sync: Basically, most operating systems don’t actually write data to the drive right away, but store it in a buffer in RAM to be written later. This is usually fine, but sometimes, you want to be certain that data has actually been written to a drive; this flag turns off that buffering so that when dd is done, the data will for sure actually be on the drive. In lieu of this, you could also just run thesynccommand afterwards, which forces it to write the current buffer to disk, but I prefer the dd way. It should also do it automatically during shutdown, but I have had cases where a system hangs during shutdown and I’m not certain if syncing is done or not.- ‘status=progress’: Gives the command a progress bar. It’s just really darn convenient and allows you to see how much time is left, how fast the drive is going, etcetera. I don’t know how anyone uses dd without this. Otherwise, it just shows nothing, and you’re left anxiously wondering when it will be done.
-
ifis input drive,ofis output drive. I preferlsblkfor looking at the list of drivers.
You’ll usually need to run
ddwithsudo.Once you do a successful copy, you’ll need to extend your BTRFS partition using GParted or similar. If you have a partition after your main one, like swap, you’ll need to delete the swap partition before extending, then recreate the swap partition and update fstab accordingly.
You are amazing! Thank you for sharing with so much detail. I think this will be what I try next, thank you! :)
I would probably install the new ssd and then boot from a live usb and run dd from there. Then you can use your partition manager in tumbleweed to enlarge the partition afterwards.
Thank you for your reply!
I have an external enclosure that I was using to have both a Live ISO USB and the old/new SSDs available. I’ve never used dd before, is there anything that might prevent it from working with BTRFS? I’ll look more into it as the day goes on!
dd works on the block level so it doesn’t care about your filesystems or partitions at all. It simply copies it all byte by byte.
Simply use df to verify your disk names
df -hAnd then use dd to copy input file to output file where if is your old disk and of is your new.
dd if=/dev/sda of=/dev/sdb
This or clonezilla
Why aren’t you using btrfs snapshots to clone the old filesystem to the new drive?
Hey there! This is my first time using a BTRFS system, so I don’t really know what I’m doing. I just thought I’d ask the community since most of the forums were from a few years ago.
I was aware of the snapshots but didn’t know I could use those on a completely different SSD to restore. How would I go about researching this? BTRFS snapshots to new SSD?
Thank you for the reply!



