Is there an easy way to transfer an OS from one hard drive to another?

6,938

Solution 1

You can set up your new drive with partitions the same size as your old one. Then you can copy the partitions from the old harddrive to the new using the command dd using the block devices in /dev (i.e dd if=/dev/sda1 of=/dev/sdb2 bs=1024 etc).

Finally you need to re-install grub in the MBR of your new drive. Some explanation how to do this are on Ubuntu's help wiki.

Solution 2

I highly recommend clonezilla. It will allow you to take an image of your entire drive, and then intelligently put it onto the new drive. It's really brilliant software.

Solution 3

i dont have full info, just tips... sorry :(

  • you can use gparted (gui) instead dd (console) to copy partition data. Boot from ubuntu cd and check http://gparted.sourceforge.net/larry/move/move.htm to enlightenment
  • you still have a missing point: grub configuration. Grub control witch partition need boot. I have no idea how complex is to change/configure/install grub by hand. I dont remember a tool to make this task easy.

I used gparted, to move my data partition from old hd to new one, not full os install

Share:
6,938

Related videos on Youtube

Bryan
Author by

Bryan

Updated on September 17, 2022

Comments

  • Bryan
    Bryan over 1 year

    So here's my situation. I have a dual boot windows7 and Ubuntu 10.04.1 on a run-of-the-mill hard drive. In a day or two I will get a new 64GB SSD in the mail and want to boot from that for obvious reasons. I was wondering if there was an easy way to transfer both OS's from my current hard drive to my SSD. I would normally reinstall the two on the new disk but my windows7 product key only works for activation once and I would like to keep it. Any ideas would be greatly appreciated.

    • Anmol
      Anmol over 13 years
      Do not use dd as accepted by the question owner. Go for the answer by Alex Launi.
    • wisemonkey
      wisemonkey over 12 years
      I'm planning to use clonezilla, here is situation -- I'll be cloning 500GB HDD (USB) to 250GB HDD (internal) obviously 500 GB HDD has data less than 250GB but can I do this safely? Any pointers that I may consider before proceeding?
  • Bryan
    Bryan over 13 years
    You know, that might work. Originally I was thinking it wouldn't because my HDD is a 1TB and my SSD is 64GB, but the bulk of my TB drive is my /home and that's on a different partition. I plan on leaving the /home on the 1TB anyway.
  • Riccardo Murri
    Riccardo Murri over 13 years
    Also check that /etc/fstab is mouting partitions by UUID or LABEL, not by device name.
  • txwikinger
    txwikinger over 13 years
    @Bryan: It should work, however, you cannot resize the filesystems with this, so you need to use the same partition size. If necessary you could think about resizing then later, however, you should never do this without having backups, which you have (your old drive)
  • Anmol
    Anmol over 13 years
    (-1) If you you have not exact the same devices do not use dd. There are more error proven solutions like Alex Launi mentioned.
  • txwikinger
    txwikinger over 13 years
    @Raphael. You do not need the same devices for this. This has always worked very well and is very easy. You only need a recovery disc and console to do this.