Just did my first Linux clone disk job... surprisingly easy

mikeymikec

Lifer
May 19, 2011
17,721
9,611
136
Ever since I moved from my old Haswell setup to my new AMD 7000 PC, my trusty old Samsung 840 PRO SATA SSD has been hanging in mid-air in the new case. I had bought an NVMe drive to replace it with some weeks ago but I've been feeling a bit chicken about actually getting on with the work.

A quick google suggested using clonezilla which turned out to be a program that runs from a terminal but was surprisingly user-friendly, identifying each drive by connection to the system as well as the model of the drive (I was worried that my 1TB 980 PRO and this new 1TB 970 Evo Plus might be difficult to tell apart just by 'nvme' and identical capacity). It needed to be started from live CD/USB and was easily installed (sudo apt install clonezilla). The system booted fine straight away from the new drive, then I noticed that clonezilla had left ~700GB unpartitioned so I booted back to live USB, ran gparted, moved the swap partition to the end of the disk and then extended the ext4 partition to use the free space (all pretty point and click), applied the change, rebooted, all fine.

Any suggestions for how to run as complete a check as I can on a new storage drive with Linux? In Windows I typically do chkdsk /f /v /r on every disk I buy.
 

manly

Lifer
Jan 25, 2000
11,032
2,154
126
One thing I would carefully check is NAND block alignment. It's most likely OK, but when I repartitioned back in 2017, I think the tool got it wrong. I only fixed it last year.

Most distros will run fsck regularly, so I doubt you need to worry about it. You can run fsck on a running system but do NOT allow it to fix anything on a mounted filesystem. I believe you'd only need to run badblocks on spinning rust.

Clonezilla is great and perfectly suitable for AT forums members. For the mass public, I wouldn't call it user-friendly. Clonezilla live does not need explicit package installation? (As an aside, it will even shrink an NTFS partition, if you enable a particular experimental switch.)
 

mikeymikec

Lifer
May 19, 2011
17,721
9,611
136
One thing I would carefully check is NAND block alignment. It's most likely OK, but when I repartitioned back in 2017, I think the tool got it wrong. I only fixed it last year.

How would you go about checking it?
 

manly

Lifer
Jan 25, 2000
11,032
2,154
126
How would you go about checking it?


Does this post help? I did things the hard way, by using a calculator and making sure the starting sectors are aligned (has to be a multiple of 4096 bytes), because I was being anal retentive. Note that parted uses different units that makes the numbers look weird, by default.

And more:
 

mikeymikec

Lifer
May 19, 2011
17,721
9,611
136
Both SSDs are 512B/512B

4TB HDD is 512B/4096B

I ran align-check on the main ext4 partition and it says its aligned.

Re Windows - AFAIK on modern (SSD-aware such as Win7 and later) versions of Windows can be relied upon to get it right.
 

manly

Lifer
Jan 25, 2000
11,032
2,154
126
Clonezilla live was just updated:

Both SSDs are 512B/512B

4TB HDD is 512B/4096B

I ran align-check on the main ext4 partition and it says its aligned.

Re Windows - AFAIK on modern (SSD-aware such as Win7 and later) versions of Windows can be relied upon to get it right.
Did you check the C: partition and the swap partition as well?