r/linuxquestions • u/Madhav_Lamba • 8d ago
Support Could someone help be clone my drive?
I am currently running fedora linux on a 1tb hdd and kept my windows on my 250gig ssd just in case something goes wrong. After a year of this I wiped my ssd and will transfer everything from hdd to the ssd. Now i have cleared my hdd and i have about 200 gigs of data on it so its small enough to fit on the SSD but i have no idea how to do this and from what I saw online its complicated to switch from a bigger drive to a smaller one.
0
Upvotes
1
u/3grg 8d ago
There are two ways to look at this. Pick the most convenient.
Clonezilla Live can clone a larger drive to a smaller drive, but it is a little complicated.
https://drbl.org/fine-print.php?path=./faq/2_System/119_larger_to_smaller_disk_restore_clone.faq#119_larger_to_smaller_disk_restore_clone.faq
https://www.youtube.com/watch?v=Fk5dtd_T3IU
The other option is to simply reinstall Fedora to the SSD and transfer files once you get it setup the way you want it.
If you were going from smaller to bigger it is a little easier, but either way you can get it done.
1
u/ScratchHistorical507 8d ago
The most future-proof way is to not clone the drive, but copy over the files. Sure, you can just clone the file system, though going to a smaller drive is a bit complicated. But cloning the file system may also clone issues with it. Just create a new file system on the SSD and use rsync to copy all files over. That way you can make sure the file system is in pristine condition. Also, you should erase the SSD while you format it. That way, all flash cells are being touched, so the controller can check if they are still usable or need to be marked as defective before they corrupt any data.
2
u/billhughes1960 8d ago
Look into rsync. A line as simple as:
rsync -axXH --delete --ignore-errors /SOURCE /DESTINATION
1
u/DrozdMensch 8d ago
Clonezilla
1
u/Few_Care_1657 8d ago
Zmniejsz partycję do wielkości małego dysku, a potem użyj Clonezilla.
1
u/MintAlone 8d ago
Booting from a usb install stick for fedora you can run gparted or kparted to copy the partitions on the HDD to the SSD. You may have to shrink the partitions before you copy to fit on the SSD. Remove the HDD before trying to boot the SSD as the partitions on the SSD will have the same UUIDs as on the HDD. Take a backup before you start.