Home » Questions » Computers [ Ask a new question ]

How can I copy my (Ubuntu 9.04) Linux filesystem to another computer?

How can I copy my (Ubuntu 9.04) Linux filesystem to another computer?

I have spent a lot of time configuring my computer: shell scripts, path definitions, video settings, as well as lots of programs. The disk is ext3 formatted.

Asked by: Guest | Views: 265
Total answers/comments: 3
Guest [Entry]

If you're going to be doing this often, I would suggest making a custom live CD using a tool like remastersys. It's very easy to use and completely portable.
Guest [Entry]

"You can just copy the whole directory across. I used to provision machines like this:

boot from rescue CD
partition drive
copy entire filesystem using rsync-over-ssh (!)
rerun grub-install to install bootloader
run a script to change hostname and a few other settings
reboot into new system

The (!) is because you need to be slightly careful here with the rsync options. -x stops it trying to copy /proc and /sys. Numeric uid and gid is also a good idea. There are some files in /var that may also cause problems.

If you copy to a machine that has different hardware you may need to rebuild the initrd that has all the drivers in it. See your distro documentation for how to do this."
Guest [Entry]

GParted on the Live CD has the capability of copying the entire system from one drive to another. That's how I was able to keep everything after my old hard drive was starting to die and have the new system up and running with all of my customizations in under an hour.