Thursday, May 2, 2024
45
rated 0 times [  45] [ 0]  / answers: 1 / hits: 26552  / 2 Years ago, wed, march 16, 2022, 8:10:43

I'd like to buy a new 1TB disk to replace my old 150GB disk.

Is there an easy way to copy my Ubuntu installation with




  • my home folder content,

  • system settings,

  • applications,

  • and so on...



so at the end I can just unplug my old disk and plug the new one without having to re-install everything?


More From » system-installation

 Answers
2

sudo dd if=/dev/sda of=/dev/sdb will create an exact replica of sda to sdb as long as sdb is at least as big as sda.



Plugin your hard disk to your system, make sure the BIOS is recognizing it correctly and boot normally to your system.



Check your hard disks with Disk Utility(To launch Disk Utility, you can use the dash),

make sure that your old hard disk is sda and your new hard disk is sdb (change the devices on the example command to reflect your hardware configuration), no need to mount the new disk (it should be empty anyways so there is nothing to mount).



Run the command with the right devices in a terminal wait until its finished and that's it.



PS: triple check the command and make sure that your old hard disk is in the if part and that your new disk is in the of part of the command.



Your partitions will be copied from your old disk to the new one byte by byte so no need to worry about reconfiguring / installing MBR and bootloader. The only thing you need to do after the disk is copied is to remove the old disk from the system or set the new disk as boot device in your BIOS.



Later on when you tested that all is ok you can resize your partitions on the new disk with gparted, boot from a LiveCD, install gparted and resize the partitions of your new disk to fit your needs.



This solution requires no installation of extra tools except for the installation of gparted later on for resizing the partitions.


[#42158] Thursday, March 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligdesig

Total Points: 164
Total Questions: 106
Total Answers: 114

Location: Japan
Member since Sat, Jun 6, 2020
4 Years ago
;