Results 1 to 7 of 7

Thread: How can I clone my system?

  1. #1
    Join Date
    May 2008
    Location
    Canada
    Beans
    163
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    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.

    Any ideas? Thanks. (^_^)

  2. #2
    Join Date
    Jul 2010
    Location
    Dhaka , Bangladesh
    Beans
    116
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I clone my system?

    if you have 2 separate partition for root & homr, then you can try fsarchiver. it is good for if you backup & restore only to your pc

    Other option is clonezilla or ubuntu customization kit.
    Last edited by Jahid65; June 28th, 2011 at 01:01 AM.

  3. #3
    Join Date
    May 2008
    Location
    Canada
    Beans
    163
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    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?

  4. #4
    Join Date
    Jul 2010
    Location
    Dhaka , Bangladesh
    Beans
    116
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I clone my system?

    Quote Originally Posted by darthpenguin View Post
    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)



    Code:
    fsarchiver restfs /media/backup/archive-multple-filesystems.fsa id=0,dest=/dev/sda1 id=1,dest=/dev/sdb1
    In terminal type
    fsarchiver --help
    You will find many example....

    if you want to use tar method then see this thread

    Explains what is happening.

    Only thing to note is ...

    don't

    sudo su
    to gain root user..

    Instead ...

    cd /
    then

    Code:
    sudo tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/media --exclude=/sys /
    use media instead of mnt.
    sudo'ing to root is not the way to do most things, issue the sudo before the command you wish to execute as 'root user'.

    The above thread, tho' long & involved, will introduce you to the lay out of files in your machine.

    Have fun.




    You have to use live cd (System Rescue CD) which contains fsarchiver or another distro installed in your pc & have fsarchiver.
    When you work on any partition make sure that partition is unmounted.


    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?
    yes need to restore grub in case of root or boot partition.
    Last edited by Jahid65; June 28th, 2011 at 12:57 PM.

  5. #5
    Join Date
    May 2008
    Location
    Canada
    Beans
    163
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    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)

    Sorry for all the questions. I'm still learning.

  6. #6
    Join Date
    Jul 2010
    Location
    Dhaka , Bangladesh
    Beans
    116
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I clone my system?

    How to restore the Ubuntu grub bootloader in 11.04

    First you need to find out what your drives are called. You can do this by going to a terminal and typing:

    Code:
    sudo fdisk -l
    You will get something like this:


    From that you need to find the device name of your Ubuntu drive, something like “/dev/sda5″.
    So, still in the terminal, type:
    Code:
    sudo mkdir /media/sda5
    Code:
    sudo mount /dev/sda5 /media/sda5
    And then, to reinstall the grub:

    Code:
    sudo grub-install --boot-directory=/media/sda5/boot /dev/sda5
    Push enter and you’re done! Of course you need to replace “/dev/sda5″ and “/dev/sda” with what you found in the fdisk output.

    • Reboot
    • Refresh the GRUB 2 menu with sudo update-grub

    for more info go here

    https://help.ubuntu.com/community/Boot-Repair
    Last edited by Jahid65; August 5th, 2011 at 08:50 PM.

  7. #7
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How can I clone my system?

    You will need to edit /etc/fstab on each new installation in order to correct the partition names and UUIDs.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •