Migrating dual-boot to a new drive

Discussion in 'Other Operating Systems' started by shredder, Dec 26, 2018.

  1. shredder

    shredder Member

    Joined:
    Dec 26, 2001
    Messages:
    11,317
    Location:
    Dec 27, 1991
    My system is dual-boot, Ubuntu 18.04 and Windows 10 Pro.

    Both OS's are installed on a 120GB SSD, which now has about six partitions (some ext4, some NTFS).

    I'm going to migrate it all to a 240GB SSD.

    However, the dual nature of the existing drive (in particular the Ubuntu installation, which contains many configuration references to the existing drive by UUID, for example) makes it a bit more complicated than simply cloning and replacing drives, if I understand correctly.

    My research so far suggests that the best process may be:
    *clone Windows over (w/ Acronis or Macrium or whatever)
    *fresh install of Ubuntu
    *copy my old Ubuntu home folder over

    Any advice or experience?
     
  2. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    7,205
    Location:
    Briz Vegas
    Correct.
     
  3. OP
    OP
    shredder

    shredder Member

    Joined:
    Dec 26, 2001
    Messages:
    11,317
    Location:
    Dec 27, 1991
    Did some more research, discovered and tried Clonezilla. Cloned the whole drive, and let the program make it's other default alterations. The process is done now. The cloned Windows is running fine on the new drive, but it doesn't look like the cloned Ubuntu will be booting (BIOS says insert a valid boot disk, for it).

    Will try a couple more quick things. Then bite the bullet and re-install Ubuntu. As I assumed I would have to do, anyway.
     
    Last edited: Dec 26, 2018
  4. HyRax1

    HyRax1 ¡Viva la Resolutión!

    Joined:
    Jun 28, 2001
    Messages:
    7,874
    Location:
    At a desk
    This is easy.
    1. Clone old drive to new drive.
    2. Fire up an Ubuntu live environment (not your installed version) and bring up GParted.
    3. Move the relevant partitions into the new space of the new drive, leaving enough space for earlier partitions to be expanded (if you have an extended partition, you may need to resize it first, then move the volumes within it, then change the start of the extended partition to make the necessary space for the primary partitions.
    4. Resize partitions as required.

    But I think a better overall idea to save you this hassle in the future is to simply use a dedicated drive for each OS, which you can still clone i the existing partitions to.
     
  5. OP
    OP
    shredder

    shredder Member

    Joined:
    Dec 26, 2001
    Messages:
    11,317
    Location:
    Dec 27, 1991
    Thanks, this is more or less what I ended up doing (via Clonezilla), but unfortunately (on this system) the BIOS and boot manager interactions are different now - in a way I don't really understand - and as a result, while the cloned Windows seems fine, the cloned Ubuntu won't boot.

    It's probably going to be more efficient to just fresh install Ubuntu and copy my Home folder over, at this point. Hopefully that will get me most of the way back to the functionality of the pre-clone system.
     
  6. HyRax1

    HyRax1 ¡Viva la Resolutión!

    Joined:
    Jun 28, 2001
    Messages:
    7,874
    Location:
    At a desk
    If you haven't resized anything yet, have both drives plugged in, ascertain which drive is which, and then from a terminal, type:

    Code:
    sudo dd if=/dev/sda of=/dev/sdb bs=512 count=1
    
    ... Where sda is the old drive and sdb is the new drive. Make sure you get this right, there's no undo for this action.

    The first 512 bytes of the drive (containing the MBR and partition table) will be cloned and the new drive should now be able to boot on its own (re-run update-grub to fix up the boot menu again).

    Then head to GParted to sort everything else out.
     
    shredder likes this.

Share This Page

Advertisement: