Make a carbon copy of Ubuntu 14.04 and reinstall it later

9,342

Solution 1

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.

Solution 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.

Share:
9,342

Related videos on Youtube

Rafal
Author by

Rafal

Updated on September 18, 2022

Comments

  • Rafal
    Rafal over 1 year

    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.

    • muru
      muru over 9 years
      The first is certainly possible, CloneZilla and Fog both do it. The second is bit more tricky.
  • 24601
    24601 over 9 years
    The link you provided to Remastersys indicates that it has been taken down by the developer.
  • amanthethy
    amanthethy over 9 years
    Yes, but the application still works as expected.
  • Tejesh Raut
    Tejesh Raut about 8 years
    Where will that dump.img file get stored? Can I store it in one of NTFS partitions?
  • kraxor
    kraxor about 8 years
    It will be stored in your current working directory, of course. And sure you can use any partition as long as it can handle files as large as your dump.