How can I clone my system?

Hey guys. I'm looking for a way to clone my system. I don't want my home folder backed up. I just want an iso I can burn to a cd or boot off a USB that would install Ubuntu plus all the software and settings from the source system. I don't just want a list of currently installed apps for apt-get to download because I've already installed them on one machine and there is no sense downloading them over again and using up my bandwidth. not to mention software compiled from source and third party ppa's. Plus I have gone through the trouble of removing stuff like Unity and Evolution. I don't want to have to remove them every time I install Ubuntu. Basically, I have a heavily customized Ubuntu 11.04 install that I want to replicate on multiple machines.

I tried remastersys but the iso it created wouldn't boot in VirtualBox for testing.

Re: How can I clone my system?

Ubuntu customization kit looks like it's just for languages or something. What about fsarchiver? I have a 2 GB /boot partition and a 10 GB / (root) partition. Can I backup both those partitions in a single archive? How do I restore it? Do I need to partition the destination drive with gparted or something first?

Once I restore an image or archive will the machine boot or will I need to rebuild grub? I imagine I'll need to change the hostname? Anything else I should change?

Re: How can I clone my system?

Originally Posted by darthpenguin

Ubuntu customization kit looks like it's just for languages or something. What about fsarchiver? I have a 2 GB /boot partition and a 10 GB / (root) partition. Can I backup both those partitions in a single archive? How do I restore it? Do I need to partition the destination drive with gparted or something first?

you can archive more than one partition in one file. see the link given on my 1st post.
you can restore on the same partition (better) or different. just make sure that the uncompressed file doesn't go beyond your partition.

You can also archive several filesystems in a single archive file:

Code:

fsarchiver savefs /media/backup/gentoo-rootfs.fsa /dev/sda1 /dev/sda2

You can also restore both the first and the second filesystem in the same time: (numbers 0 and 1)

Re: How can I clone my system?

Thanks, the tar method seems like the best one to use. I've used tar before to backup and restore a system but I have never restored a backup to a different hdd or different machine. My current hdd is setup with swap, /boot, /, and /home partitions. Do I need to manually format/partition the destination HDD before restoring the backup? I do not want to backup the /home directory. Would I be able to login as root once the backup is restored? How would I create a new user?

I tried this last night and the machine wouldn't boot. I get the grub rescue> prompt. I tried suggestions from many forums with no luck. How do I restore/rebuild grub after I restore the backup? (keep in mind, this is grub2 on ubuntu 11.04)