Results 1 to 8 of 8

Thread: make a bootable clone of the hard disk

  1. #1

    Default make a bootable clone of the hard disk

    Hi all!
    I currently have a new laptop (UEFI) with opensuse 13.1 and windows 8 (x 64 ).
    I want to create a clone (exact copy of the laptops hard disk (750 GB) ) to another one of the same type but larger (1TB).
    I found that it could be done using the command
    dd if=/dev/sda of=/dev/sdb
    but I am not sure if the clone disk will be bootable and if all the partitions (including windows8 ) and the OSs(win+suse) will work out fine.
    Do I have to create an additional 250GB partition first? And how?
    Thanks in advance!

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: make a bootable clone of the hard disk

    On 2014-04-03 16:36, phaethon wrote:

    > I want to create a clone (exact copy of the laptops hard disk (750 GB) )
    > to another one of the same type but larger (1TB).
    > I found that it could be done using the command
    > dd if=/dev/sda of=/dev/sdb
    > but I am not sure if the clone disk will be bootable and if all the
    > partitions (including windows8 ) and the OSs(win+suse) will work out
    > fine.


    The above is an exact copy, byte by byte, so it will have the exact same
    partitions, identifiers, all.

    Maybe it will boot, maybe not: it depends on what is used for booting.
    UUIDs, for instance, will work. IDs, perhaps not, because part of the ID
    depends on the disk serial number, I think.

    > Do I have to create an additional 250GB partition first?


    No, it will be destroyed.

    The resulting copy will /think/ it is 750GB. You have to resize the
    partitions later, if you can.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  3. #3
    Join Date
    Mar 2013
    Location
    Bari (Italy)
    Posts
    58

    Default Re: make a bootable clone of the hard disk

    Try Clonezilla, it has a very good textual interface.

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: make a bootable clone of the hard disk

    Quote Originally Posted by phaethon View Post
    but I am not sure if the clone disk will be bootable and if all the partitions (including windows8 ) and the OSs(win+suse) will work out fine.
    No, it won't be bootable. Or, at least, it won't be bootable to opensuse. Maybe you will be able to boot Windows, but I'm not sure of that, either.

    However, it won't be too hard to fix, if you know what you are doing.

    First problem: the NVRAM entries used by the UEFI firmware may need to be updated to refer to the new disk;
    Second problem: the "/etc/fstab" entries may need to be updated to refer to the new disk;
    Third problem: the grub entries may need to be updated to refer to the new disk.

    I guess the thing to do is to try it. Then be prepared to boot from live media to fix what shows up as broken.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  5. #5
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    4,029

    Default Re: make a bootable clone of the hard disk

    Quote Originally Posted by phaethon View Post
    Hi all!
    I currently have a new laptop (UEFI) with opensuse 13.1 and windows 8 (x 64 ).
    I want to create a clone (exact copy of the laptops hard disk (750 GB) ) to another one of the same type but larger (1TB).
    I found that it could be done using the command
    dd if=/dev/sda of=/dev/sdb
    but I am not sure if the clone disk will be bootable and if all the partitions (including windows8 ) and the OSs(win+suse) will work out fine.
    Do I have to create an additional 250GB partition first? And how?
    Thanks in advance!
    I seriously doubt that the Windows OS will transport like that. Although I haven't tried it with W8, the previous two versions of Windows would refuse to clone properly to a new system -- or even to a new hard drive in the same system -- much of the System gets broken.

    But, you can try. Best bet would be with Clonezilla.
    "Take a Walk on a Sunny Day, Greet everyone along the way, and Make Somebody Smile, Today"
    Gerry Jack Macks"Walk On A Sunny Day" GerryJackMacks.net

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: make a bootable clone of the hard disk

    On 2014-04-04 05:36, Fraser Bell wrote:

    > I seriously doubt that the Windows OS will transport like that.
    > Although I haven't tried it with W8, the previous two versions of
    > Windows would refuse to clone properly to a new system -- or even to a
    > new hard drive in the same system -- much of the System gets broken.


    You have to clone the disk ID, or Windows may think that it is an
    illegal copy. I did clone my laptop Windows to another HD, but it was
    the same HD brand and model. AND, I had to clone the disk identifier in
    fdisk.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  7. #7

    Default Re: make a bootable clone of the hard disk

    Some tips when cloning your disk.

    boot into any live media once you have cloned your disk and do the following.


    Mount the partitions that has the files you need to edit. An example would be.
    Code:
    mount /dev/sda1 /mnt
    Adjust to your setup.

    Edit this file and adjust to your new disk.
    Code:
    /boot/grub2/device.map
    Using the output of.
    Code:
    ls -l /dev/disk/by-id/ata*
    and
    Code:
    stat -c '%n' /dev/disk/by-id/ata*
    You can see the ID and replace it with the new one.

    This file you can (most of the time) cheat if you're using mount by LABEL and not the default by-id, so you can probably skip it.
    Code:
    /etc/fstab
    Look for the bootable flag in your disk, the * asterisk is what you're after.

    Code:
    fdisk -l
    This does not include UEFI/EFI system since i have not encounter them :-). You can just edit something about that uefi/efi but don't ask me which one :-).

    When you are done boot using the DVD, select installation then abort you will be ask again to install and other options too. Select BOOT-INSTALLED-SYSTEM and choose your (unbootable) cloned disk.

    Open up yast and check the entries.
    Code:
    yast2 bootloader
    If that is fine you can invoke grub2
    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg

    Those are just some tips and it is a case to case basis imo, like if you have an lvm or btrfs and disk that do not use by-id , also i will not comment on your favorite Windows OS partition this aint Windows forum :-). You can play with it using a vm first

    Good luck you're gonna need lots of it :-)

  8. #8

    Default Re: make a bootable clone of the hard disk

    Quote Originally Posted by jetchisel View Post
    Some tips when cloning your disk.

    boot into any live media once you have cloned your disk and do the following.


    Mount the partitions that has the files you need to edit. An example would be.
    Code:
    mount /dev/sda1 /mnt
    Adjust to your setup.

    Edit this file and adjust to your new disk.
    Code:
    /boot/grub2/device.map
    Using the output of.
    Code:
    ls -l /dev/disk/by-id/ata*
    and
    Code:
    stat -c '%n' /dev/disk/by-id/ata*
    You can see the ID and replace it with the new one.

    This file you can (most of the time) cheat if you're using mount by LABEL and not the default by-id, so you can probably skip it.
    Code:
    /etc/fstab
    Look for the bootable flag in your disk, the * asterisk is what you're after.

    Code:
    fdisk -l
    This does not include UEFI/EFI system since i have not encounter them :-). You can just edit something about that uefi/efi but don't ask me which one :-).

    When you are done boot using the DVD, select installation then abort you will be ask again to install and other options too. Select BOOT-INSTALLED-SYSTEM and choose your (unbootable) cloned disk.

    Open up yast and check the entries.
    Code:
    yast2 bootloader
    If that is fine you can invoke grub2
    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg

    Those are just some tips and it is a case to case basis imo, like if you have an lvm or btrfs and disk that do not use by-id , also i will not comment on your favorite Windows OS partition this aint Windows forum :-). You can play with it using a vm first

    Good luck you're gonna need lots of it :-)
    I forgot to add.

    Code:
    mkinitrd
    To see if your disk ID is correct. At least up until 13.1 mkinitrd still is present but it might not survive the next release in favor of Dracut. (maybe maybe not)

Posting Permissions

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