Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There’s an open source app called Clonezilla, which, I have to say, is only free if your time is worthless.

What about dd if=/dev/old-disk of=/dev/new-disk bs=16M ?




If disk sizes are different, which they almost always are, AFAIK dd doesn't quite hack it, otherwise I would have just booted off a Ubuntu live CD and done that.


Yes, after the dd you have to run parted to adjust the partition table and then possibly use some other tool to grow the filesystem.


If the new volume is smaller (which it almost always is when switching to a SSD), you'd need to shrink the filesystem before you block-copied it with dd.


Indeed. Without this, though, I think his system still would have booted. Incremental progress is certainly better than wasting two days pressing buttons in a GUI, at least IMHO. (Once the system boots, you can worry about using the extra bits on the disk.)


partimage was the tool you were looking for. It natively understands NTFS, FAT, extX, Reiser, XFS, etc. and can resize as it images.

By default it pops up a somewhat annoying ncurses interface, but it's quite a solid tool.


You don't usually migrate between volumes of the same size. If the new one is bigger, you've now got unused space on the end. If the old one was bigger, you've now just fucked your filesystem -- not only will the metadata about the volume size be wrong, but all the inodes stored in blocks past the end of the new disk will be missing.


It's trivial to folks familiar with nix-a-likes but for others it is too unlike the abstractions they're used to for it to be entertained as anything other than some sort of bizarre incantation.


Wasn't there also some magic required so that bad sectors get zeroed on the target disk, instead of skipped, which would be bad.


No magic, no bad sectors, no relevance.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: