Results 1 to 5 of 5

Thread: Transfering from external hard drive to a new internal drive

  1. #1
    Join Date
    Jul 2008
    Location
    Salem, Or
    Beans
    1
    Distro
    Ubuntu 8.04 Hardy Heron

    Transfering from external hard drive to a new internal drive

    Last week my beloved hard drive finally passed away,
    So immediately I went to everyones favorite Electronics Online Retailer, NewEgg, and purchased myself a replacement.

    As for the duration of time between death of the old,
    and the arrival of the new,
    I installed Ubuntu on my External Harddrive to hold me off until I recieved my new drive, which just arrived today.

    During this last week 've become to love Ubuntu and all it has to offer.
    But now I wish to transfer all of Ubuntu onto the new drive and make it bootable.

    Is this possible without having to reinstall Ubuntu on the new drive??
    If so.
    How?

  2. #2
    Join Date
    Jun 2006
    Beans
    7,419
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Transfering from external hard drive to a new internal drive

    yes.

    Use Gparted or dd command (->'cloning an entire drive')

    Install grub to the MBR of the (new) internal drive.

  3. #3
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Transfering from external hard drive to a new internal drive

    Yes, it's possible. https://help.ubuntu.com/community/Hardware/HardDisk

    First partition the drive. I like cfdisk, fdisk is good, I think parted is the GUI one. Partitioning tips: https://help.ubuntu.com/community/DiskSpace.

    Then make a filesystem on your partitions. ext3 is the default and is very solid.
    Code:
    mke2fs -j /dev/sd??
    I don't know of a GUI to do that, but I'm sure they exist.

    On your swap partition, format it for swap.
    Code:
    mkswap /dev/sd??
    Once you get your filesystems set up, copy all the files over. I think it's best to do this from a live cd, so you don't need to worry about anything changing during the copy or the virtual filesystems (/proc, /sys, ...). Use the -a switch to cp when copying, it will preserve metadata like permissions. I think cp is better for this than dd.

    Finally, you need to update your /etc/fstab. Ubuntu uses UUIDs these days, so you must either replace the UUIDs with device nodes (e.g. /dev/sda2) or change the UUIDs to match the new disk (see the vol_id command).
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

  4. #4
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Transfering from external hard drive to a new internal drive

    Another command (slightly faster than dd) is partimage. The Clonezilla live disk is built around this tool, and that's a relatively easy way of taking an image of one disk and cloning it to another. Also a great backup tool for the same reason.

    The principal advantage of partimage over dd is that the latter clones the entire device, including empty blocks. partimage simply makes a record of those empty blocks without actually copying them. If the disk you are copying has a lot of empty space, the time saved could be noteworthy.
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  5. #5
    Join Date
    Jun 2006
    Beans
    7,419
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Transfering from external hard drive to a new internal drive

    Quote Originally Posted by p_quarles View Post
    Another command (slightly faster than dd) is partimage. The Clonezilla live disk is built around this tool, and that's a relatively easy way of taking an image of one disk and cloning it to another. Also a great backup tool for the same reason.

    The principal advantage of partimage over dd is ...partimage simply makes a record of those empty blocks without actually copying them.
    yeah, I use partimage regularly to make an gzipped image of my root, and it's pretty fast on account of copying only used space. But the problem is that you have to save the image file somewhere (to another partition or disk), then 'restore' from that (whether uncompressed or compressed)... As much as I like partimage I think it might actually take nearly as long as dd if you count the restore. (although it depends on the amount of empty space)

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
  •