How to migrate XP, Vista, Linux, BSD and Solaris to a bigger hard disk


Results 1 to 15 of 179

Thread: How to migrate XP, Vista, Linux, BSD and Solaris to a bigger hard disk

Threaded View

  1. #11
    Join Date
    Jan 2003
    Location
    Austin, Texas
    Posts
    683
    Quote Originally Posted by gamblor01 View Post
    What I would like to do is to copy /dev/sdb3 over to /dev/sdc1. So I booted up the Ubuntu install on /dev/sdb5, mounted sdb3 and sdc1, and then tried the following:

    Code:
    $ cd /media/sdb3
    $ tar cf - . | ( cd /media/sdc1; tar xf -)
    It doesn't work, and the terminal output shows the following:

    Code:
    tar: ./var/lib/dpkg/alternatives/javaws: Cannot open: No such file or directory
    tar: ./var/lib/dpkg/alternatives/jstat: Cannot open: No such file or directory
    tar: ./var/lib/dpkg/alternatives/jmap: Cannot open: No such file or directory
    tar: ./var/lib/dpkg/alternatives/ControlPanel: Cannot open: No such file or directory

    Just a heads up for Saikee and everyone else, this appears to have failed because I was trying to sudo it like so:

    Code:
    $ sudo tar cf - . | ( cd /media/sdc1; tar xf -)
    This failed with the errors I mentioned above. On a whim I thought that perhaps running sudo -i and then retrying the command would work...IT DID! So make sure you are truly root and not just trying to run the command via sudo.

    So, the complete set of steps I ran to copy all files from /dev/sdb3 to /dev/sdc1 was:

    Code:
    $ sudo -i
    # mkdir /media/sdb3
    # mkdir /media/sdc1
    # mount /dev/sdb3 /media/sdb3
    # mount /dev/sdc1 /media/sdc1
    # cd /media/sdb3
    # tar cf - . | ( cd /media/sdc1; tar xf -)

    I have been checking it and it is definitely copying everything over. I might need to reinstall grub on the drive (though the tar command should be copying over all of the /boot/grub directory, though my UUID will change as will the partitions), and I also need to create a swap partition. Then I should be able to disconnect sdb and put sdc in its place, boot it up, and hope for the best! I'll post an update later today.
    Last edited by gamblor01; 09-22-2009 at 11:34 AM.
    "The author of that poem is either Homer or, if not Homer, somebody else of the same name."

Posting Permissions

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