Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
I have just put together a new computer using an Intel i3-550 64 bit processor, and installed Windows (first), then Ubunutu 10.04. A separate /home partition was created. The linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    217

    move /home to another computer


    I have just put together a new computer using an Intel i3-550 64 bit processor, and installed Windows (first), then Ubunutu 10.04. A separate /home partition was created. The linux partitions in this computer is formatted ext4.

    Now I want to move my /home partition from my old 8.04 computer (32 bit, formatted ext3) which also has a separate /home partition.

    Both are connected to a lan, but so far I have not been able to connect from one to the other.

    I have done lots of googling on this and am astonished at the apparent complexity involved. There seem to be issues involving whether or not files in the /home partition in the old computer is in use at the time of copy or creating a tarball, user permissions, and I don't know what all else.

    Assuming that neither the ext3 on the old and ext4 on the new, nor the 32 bit on the old and the 64 bit on the new are not issues, how do I go about moving the /home from the old to the new? If possible, I would like to use a GUI rather than the command line, but if it is necessary to use the command line, please specify where one needs to be located in the file hierarchy in order to give the designated commands. I am not very knowledgeable about using the terminal.

    Also, I am a noob (probably apparent) so step-by-step instructions will be very helpful.

    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,512
    You can use rsync to move the files over, assuming the old system is still running. Or, you can start an NFS server on the old system, connect to it from the new one, and copy the files over. You may need to fix up the owner of the files on the new system, which will require you do that as the root user. The file system doesn't matter. I have done this sort of operation many times in the past. The fastest way I have found is to take the drive out of the old system, plug it into a USB or eSata carrier/enclosure, attach to the new system, mount the /home partition to a temporary mount point, and then just copy my data from the temporary mount point to my new home directory.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    217
    Rubberman, Thanks for yours.

    You can use rsync to move the files over, assuming the old system is still running.
    As mentioned, I will need lots of handholding. The old computer is running well. What directory do I need to be in and on which computer, to use rsync?

    Is rsync already installed or do I need to do so?

    Or, you can start an NFS server on the old system,
    How does one start an NFS server?

    What directory do I need to be in and on which computer, to start the NFS server?

    Is the software to do this already installed or do I need to do so? If the latter, do I look for software called NFS server?

    connect to it from the new one, and copy the files over.
    using straight copy (CTRL-C type thing)?

    You may need to fix up the owner of the files on the new system, which will require you do that as the root user.
    Before getting into the permissions issue/s, do I need to be root to use rsynch and start an NFS server?

    .... The fastest way I have found is to take the drive out of the old system, plug it into a USB or eSata carrier/enclosure, attach to the new system, mount the /home partition to a temporary mount point,
    How does one create a temporary mount point? In the drive from the new computer? Which directory of which computer do I need to be in to do this?

    How do I ensure that no files in /home on the old computer are not in use?

    Thanks again

  4. #4
    Linux User sgosnell's Avatar
    Join Date
    Oct 2010
    Location
    Baja Oklahoma
    Posts
    467
    The quickest and easiest way is to just connect the old drive to the new computer, mount the drive, and do a straight copy. You can get a PCI-USB connector from ebay for a few dollars, and the new Linux computer should mount it like any other USB drive. Then just use Nautilus to select the folder you want to copy, and copy it to your /home on the new computer. You shouldn't have any permission problems, since you can write to your own /home at will. Make sure you use Ctrl-H to show the hidden folders before you select them, or use the -a option with cp if you do it in a terminal. You don't want to lose all the config files you have in the hidden folders.

    Actually, if this is a desktop system, you should be able to just install the drive internally, and do the business without needing a separate cable. If you don't need it for the old computer, you could just use it as is, and mount it as /home without making any changes. But that's up to you.
    Last edited by sgosnell; 11-22-2010 at 09:27 PM.

  5. #5
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    When I have files to copy to a new machine I just do it over the network with something simple like (as root on the new machine)
    Code:
    ssh oldmachine "find /home -print -depth | cpio -o" | cpio -idum

  6. #6
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    217
    sgosnell, that sounds like the easiest thing to do. I will ultimately need the existing hdd back in the old computer since the computer will be used for other things.

    So just to be sure that I understand this:
    backup /home then
    remove the old hdd (which if I remember correctly, is a EIDE drive), and
    plug it into the new computer.

    Will Ubuntu 10.04 find the drive and mount it or will that be something that I will need to do?

    Since it is currently a /home partition (in the old computer), is that going to create any kind of conflict within 10.04 now seeing two /home partitions?

    Once visible, I would go into the /home folder on the /home partition on the old hdd,
    Ctrl-H to show hidden partitions,
    copy all,
    switch to the new /home folder on the new /home partition on the new hdd,
    paste
    ?
    and I can do this using Nautilus?

    Since 10.04 is a new install on the new computer, not an upgrade to the existing 9.04, is this going to create any hiccups? If so, would it be a good idea to upgrade the 9.04 to 10.04 on the old computer before doing the above (but after backing up)?

    scm, sounds very simple, but since I don't understand the commands, does this alternative get the data from the old /home folder to the new, and avoid the "in use" issues and the permission issues?

    (Apologies for the delay, but I am just getting up from the flu)

    Thanks to both

  7. #7
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I second using rsync. There is a GUI frontend, grsync, as well.

    Will Ubuntu 10.04 find the drive and mount it or will that be something that I will need to do?
    It should by default treat it like any other removable media, such as plugging in a usb drive. There will be a mount point dynamically created in /media for the drive.

    Since it is currently a /home partition (in the old computer), is that going to create any kind of conflict within 10.04 now seeing two /home partitions?
    Not initially. The system mounts partitions as specified in /etc/fstab. I think by default Ubuntu uses a UUID (unique, not variable), not /dev names (which might change).

    Since 10.04 is a new install on the new computer, not an upgrade to the existing 9.04, is this going to create any hiccups? If so, would it be a good idea to upgrade the 9.04 to 10.04 on the old computer before doing the above (but after backing up)?
    You should be fine. If there is a hiccup, it is safe to delete configuration files in your /home directory. It will just reset the relevant app to the default settings. But I doubt there will be anything that is not backwards compatible with a slightly older version.

  8. #8
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    217
    Having read sgosnell's post, and assuming that there are no contrary opinions, I think that it will be easier for me to just plug the ide drive into the mobo and psu of the new computer, so I probably will go that route.

    If anyone sees any issues with that alternative, please post here.

    My wife and I are off shortly to visit our daughter over Thanksgiving and I am using this computer (the old one) right up until departure. So I will await our return early next week to actually remove the old drive and plug it into the new computer.

    Many thanks to all who have contributed so far. Will appreciate any further input and will advise results after the event.

  9. #9
    Linux User sgosnell's Avatar
    Join Date
    Oct 2010
    Location
    Baja Oklahoma
    Posts
    467
    Ubuntu probably won't mount the drive automatically. You will need to do that yourself, but you should be able to just click on it in Nautilus and mount it. Ubuntu won't mount it as /home, just as a drive. You will see the partitions and folders, and you can copy them, but Ubuntu will not think of them as anything but a drive, and folders on that drive. No relation to /home at all. You can do it in Nautilus, just as copying any other files. Just be careful, and make sure you have the source and destination the way you want them. You can use rsync, but it's much slower than a straight copy.

  10. #10
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    217
    I am back, have started Samba on the old computer, given authorization, and using Nautilus in the new computer, can now see the /home folder of the old computer.

    I just "test" copied a .txt file from the old to the new and it copied seemingly well, opened properly, etc.

    Using Nautilus, can I just copy all folders and files from the /home of the old computer, and paste them into the /home folder of the new computer?

    Should I also copy hidden files over? Will this overwrite existing hidden files, presumably that the new computer is now using to run, and if so, will this screw everything up?

    Would it make sense to upgrade the old computer, now running 9.04 to 10.04 first, so that any differences between the two sets of files, as far as the versions go, would be eliminated? I.e. the new computer would see files that were already made fully compatible with 10.04?

    BTW, I use the same username and password in both computers, which hopefully might minimize any permission issues.

Page 1 of 2 1 2 LastLast

Posting Permissions

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