4

My Ubuntu set-up is quite complex and it requires few hours of installing software, changing bash configuration and creating a lot of symlinks. Since I often experiment with my system, it tends to get broken and I need to spend few hours configuring everything again.

  1. Is it possible to make copy of existing, working installation of Ubuntu, with everything configured, and in case of system failure or other issue, redeploy it on the same HDD/SSD/partition?
  2. Is the above possible with another partition, of new size and possibly on another device/HDD/SSD?

I hear about Clonezilla, but I am not sure it does what I described and I am not sure how to test if copy it creates works well.

karel
  • 122,292
  • 133
  • 301
  • 332
Rafal
  • 1,837

3 Answers3

6

You could simply use dd to dump your partition into a file, like so:

sudo dd if=/dev/sda1 of=dump.img

Then you can easily restore it by running the following command from a live DVD / USB stick:

sudo dd if=dump.img of=/dev/sda1

Replace /dev/sda1 with your root partition. Obviously, you will need to place the dump file to another partition.


Another method would be to create a duplicate partition. Use any partitioning tool (e.g. GParted) to create a partition the same size as your original, then use dd to clone your partition:

sudo dd if=/dev/sda1 of=/dev/sda2

Do the inverse to restore, using a live DVD / USB stick.

kraxor
  • 5,627
2

Use Remastersys. It will let you create an installable LiveCD based on your current setup. There's a great guide on how to install and use it here in the Ubuntu forums. The guide is for Karmic, but I've read that the app works in 14.04 as well. OBI seems like it would be able to do what you'd want as well.

amanthethy
  • 1,251
0

You could utilize ubuntu landscape, and create a profile for your computer which will handle all the custom software installations and what have you.

https://landscape.canonical.com/

Anon
  • 12,339