Find the answer to your Linux question:
Results 1 to 8 of 8
Hi there, I am currently running Fedora 10 on my main PC and have just installed it on a secondary PC. I would like to copy over all my software, ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3

    Migrating my applications, files, bugfixes settings from one installation to another?

    Hi there,

    I am currently running Fedora 10 on my main PC and have just installed it on a secondary PC. I would like to copy over all my software, settings and files to the new install rather than re-downloading everything and setting up myself. Being able to copy over all the system updates I've received would be excellent too.

    Is there a practical way to do this? I've heard of moving the /home directory. I presume this only copies over my files and settings but not applications?

    Any help would be greatly appreciated. I am a refugee from Windows and have so many bad habits ingrained that I don't want to start copying files without confirmation from those in-the-know.

    Thanks!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    You should be able to just copy over just about everything from one system to the other, with caveats. Ie, most of /etc, /lib , /lib64, and /usr should copy over pretty easily. Make a bit image backkup of the target system first, then copy over /etc, /usr, /lib, /lib64, /bin, /sbin, /opt, /var to the new system. An area of contention would be network address settings. If you are using static IP addresses, then the new system will have to be edited after the copy to set the proper IPv4 and (possibly) IPv6 addresses, host name, etc. Finally, reboot the new system. If the boot fails for some reason, then restore the bit image to the target system disc, or use a recovery CD/DVD/USB drive to correct any problems. Use an external drive to hold the bit image copy in any case.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Moving an installation should be possible as very well Rubberman pointed already.

    I'll just add some things that you must be aware of when doing so:

    • Architecture. Double check which kind of binaries do your distribution provides. For example, of your binaries are compiled specifically for a core2 cpu and you intend to migrate to an amd barcelona chip then you are going to have problems, because the former supports SSSE3 (three 'S'), while the later only supports up to SSE3. The later will also be true, because barcelonas support SSE4A and others while core2 do not. However, most distros do compile for either x86, amd64 or x86_64. Those are generic enough and in such case you shouldn't have any problem at all.
    • If you compiled a custom kernel, you might need to add a few drivers so it can boot your new pc. If you use the stock kernel provided by your distro, it should work out of the box, provided that it's up-to-date and supports your hardware.
    • You might need to adjust the configuration for your bootloader, otherwise the kernel might not be able to mount your root file system.
    • You might need to edit /etc/fstab in your new system, and correct some paths.
    • Finally, make sure the original system is not mounted with write permissions, otherwise you might end up with a demi-corrupted copy. Booting from a livecd before making the copy will guarantee that the original fs doesn't change during the copy, and will also avoid you the trouble of having to skip proc, dev and other fs's, since only the static fs's will be there when the system is not live.


    You can copy fs's one by one, while live, but then you are going to have to fix/create some nodes on /dev probably, and you might experience some other slight problems, that are not straightforward to solve for a newcomer.

  4. #4
    Just Joined!
    Join Date
    Apr 2009
    Posts
    3
    Thanks for the pointers Rubberman and i92guboj. Unfortunately I didn't consider that my main system was an x86_64 box and my laptop was only i686... looks like I'm going to have to re-download a lot of stuff, but I will see what can be salvaged (mostly application configurations).

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    Quote Originally Posted by abignale View Post
    Thanks for the pointers Rubberman and i92guboj. Unfortunately I didn't consider that my main system was an x86_64 box and my laptop was only i686... looks like I'm going to have to re-download a lot of stuff, but I will see what can be salvaged (mostly application configurations).
    Yes, your scripts and configuration settings in /etc should mostly move over. You'll probably need to edit /etc/fstab and such. If the primary system was x86_64, then as you suggest, the binaries won't move. If the primary system was the i686 and you are moving those to the x86_64 system, then it will work since the 64-bit system will run 32-bit applications and libraries.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Hmm... ok, barring the things that we need to give consideration to as pointed by you, it is technically possible to just copy the whole system.. thats a very useful information...thanks guys...
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  7. #7
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by i92guboj View Post
    Moving an installation should be possible as very well Rubberman pointed already.

    I'll just add some things that you must be aware of when doing so:

    • Architecture. Double check which kind of binaries do your distribution provides. For example, of your binaries are compiled specifically for a core2 cpu and you intend to migrate to an amd barcelona chip then you are going to have problems, because the former supports SSSE3 (three 'S'), while the later only supports up to SSE3. The later will also be true, because barcelonas support SSE4A and others while core2 do not. However, most distros do compile for either x86, amd64 or x86_64. Those are generic enough and in such case you shouldn't have any problem at all.
    • If you compiled a custom kernel, you might need to add a few drivers so it can boot your new pc. If you use the stock kernel provided by your distro, it should work out of the box, provided that it's up-to-date and supports your hardware.
    • You might need to adjust the configuration for your bootloader, otherwise the kernel might not be able to mount your root file system.
    • You might need to edit /etc/fstab in your new system, and correct some paths.
    • Finally, make sure the original system is not mounted with write permissions, otherwise you might end up with a demi-corrupted copy. Booting from a livecd before making the copy will guarantee that the original fs doesn't change during the copy, and will also avoid you the trouble of having to skip proc, dev and other fs's, since only the static fs's will be there when the system is not live.


    You can copy fs's one by one, while live, but then you are going to have to fix/create some nodes on /dev probably, and you might experience some other slight problems, that are not straightforward to solve for a newcomer.
    You guys warned well enough, yet I managed to get f*****up.

    I formatted my /dev/sda2 with ext3 and the copied (actually moved) whole of /dev/sda3 (my centos) to /dev/sda2. Ofcourse I edited /etc/fstab and grub.conf to load properly. But for some reason all the files except the 'null' in /dev got deleted! I googled and found a suggestion to create files in /dev with 'MAKEDEV'. So accordingly, I booted with debian, chrooted to /dev/sda2 and inside /dev did
    Code:
    MAKEDEV generic
    It created lot of files which to me looked 'almost' the same files as there were in /dev originally. Now, if I boot it centos boots nicely and comes to terminal.

    Now, here is the problem. I type my login id and then password, fine. But then the shell automatically logs me out and comes back to ask login name! This happens with both regular user and the root user.

    I checked for file permission, the user has full permission to his home directory and thereby to .bash* files.

    What could be the problem? Why is shell automatically logging out?
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    Boot into single user mode. I suspect that the permissions on /etc/passwd or /etc/shadow may be wrong. Besides being owned by root, shadow needs to be ONLY readable by owner, and writeable by group. Ie, -r---w----
    I believe that the OS checks that before allowing you to log in. Also, you might need to reset passwords, depending upon the type of password encryption the system was using. In single user mode, you'll be able to reset your user and root passwords easily enough.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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