Results 1 to 8 of 8

Thread: migrate USB installation to internal disk

  1. #1

    Question migrate USB installation to internal disk

    Hello Everyone,

    a while ago I tried to make use of openSuse LEAP 42.3 and installed on an external USB HDD.
    I have been using it for a while and would like to migrate the whole disc to a faster internal one.

    (0) After disc cloning first -- for a 1:1 copy -- and verification that the cloned disc boots like the original one (as a connected USB drive) worked flawless.

    So, here is the problem: When connecting the disc internally (SATA) --- I am unable to boot from it.
    The only post on screen is "j"


    For me this clearly indicates it has to do with grub2 or the bootloader or bootsector ... (?)

    However, I am unsure how to fix this.
    (1) I tried to use a gparted live boot disc, but could not find any useful option.
    (2) When booting into LEAP using the cloned drive (connected via USB), may be there is a way to make it bootable by yast bootloader or via terminal commandline?

    So I do not want to mess up the working cloned disc without knowing what I am doing ..

    Input on this would be appreciated?

    Greetings

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,821

    Default Re: migrate USB installation to internal disk

    Did you adapt the identifications of the partitions (which is default by UUID in openSUSE) in e.g. /etc/fstab and the Grub configuration?
    Henk van Velden

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,587

    Question Re: migrate USB installation to internal disk

    @hastagger:
    By cloning do you mean that, you've overwritten the internal SATA HDD with the contents of the USB drive?

    If that's what you did then, the boot sectors of the SATA HDD have not been set-up correctly because, there's major differences between an internal SATA HDD and a USB drive in terms of the sectors used for booting and, also, the system's identification of the disk partitions.

    You'll have to check, within the BIOS/UEFI of the system, the values pointing to the boot sectors.

    You'll also have to check the identifiers of the HDD's partitions and correct the value in the file '/etc/fstab' accordingly -- you'll need a bootable "Rescue Disk" to do this. Instructions on how to do this are available here: <https://doc.opensuse.org/documentati...recover.rescue>, here: <https://en.opensuse.org/SDB:Installation_help>, and here: <https://en.opensuse.org/SDBisaster_Recovery>.

    If the cloning of the USB Drive to the internal SATA HDD has resulted in the SATA HDD being completely overwritten then, consideration could be given to simply performing a new installation on the SATA HDD and then, when the new system has been set-up, copying the user directory contents from the USB Drive to the SATA HDD -- may be quicker and more reliable …

    Please note that, "cloning" is generally reliable only, when a system is being cloned to an exactly identical hardware platform.

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,315

    Default Re: migrate USB installation to internal disk

    Quote Originally Posted by hastagger View Post
    Hello Everyone,

    a while ago I tried to make use of openSuse LEAP 42.3 and installed on an external USB HDD.
    I have been using it for a while and would like to migrate the whole disc to a faster internal one.

    (0) After disc cloning first -- for a 1:1 copy -- and verification that the cloned disc boots like the original one (as a connected USB drive) worked flawless.

    So, here is the problem: When connecting the disc internally (SATA) --- I am unable to boot from it.
    The only post on screen is "j"


    For me this clearly indicates it has to do with grub2 or the bootloader or bootsector ... (?)

    However, I am unsure how to fix this.
    (1) I tried to use a gparted live boot disc, but could not find any useful option.
    (2) When booting into LEAP using the cloned drive (connected via USB), may be there is a way to make it bootable by yast bootloader or via terminal commandline?

    So I do not want to mess up the working cloned disc without knowing what I am doing ..

    Input on this would be appreciated?

    Greetings
    You may try: https://karlmistelberger.wordpress.c...b2-einrichten/
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  5. #5
    Join Date
    Jun 2008
    Location
    Belleville, Ontario, Canada
    Posts
    503

    Default Re: migrate USB installation to internal disk

    I think that since you are going to use the HD now, you might want to install fresh and after connecting the external drive simply transfer anything you wanted from the old drive. It'll be wayyyy easier. Just an idea.
    "The time is always right to do what's right." Rev. Dr. Martin Luther King, Jr.
    openSUSE 15.3 5.3.18-59.40-default x86_64

  6. #6
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    6,733

    Default AW: Re: migrate USB installation to internal disk

    Quote Originally Posted by kerijan2003 View Post
    I think that since you are going to use the HD now, you might want to install fresh and after connecting the external drive simply transfer anything you wanted from the old drive. It'll be wayyyy easier. Just an idea.
    Thats what I told in the other Forum.

  7. #7

    Thumbs up Re: migrate USB installation to internal disk

    Ok -- thx for your input ...
    Of course a reinstall is a "working no brainer" ... but lazyness is always a key to success and careful thought.

    I looked into all the suggrestions ...
    (1) @sauerland & kerijan2003: I ruled out a new install - this will likely work, but I am not sure if all my customizations and tweaks are retained.

    2) @dcurtisfra & karlmistelberger: Yes, the documentation was a good point to start. As I suggested in my message likely a bootloader .. After reading I thought a rescue boot and reinstallation of grub2, aswell as comparing UUID in the /etc/fstab seemed to be a good starting point ..


    so what I did:
    mounted my system from the rescue prompt
    Code:
    mount /dev/sda2 /mnt
    mount -t proc none /mnt/proc
    mount --rbind /dev /mnt/dev
    mount --rbind /sys /mnt/sys
    changed root to the old system
    Code:
    chroot /mnt /bin/bash
    regarding - fstab and UUID:
    Code:
    cat /etc/fstab
    lsblk
    this looked good ...

    then installed grub2:
    Code:
    grub2-install /dev/sda
    grub2-mkconfig -o /boot/grub2/grub.cfg
    & unmounted everything
    Code:
    umount -a
    exit
    reboot
    and finally I was back in business. The cloned drive boots without a hitch and everything is as it was

    Thx - Case closed!

    P.S.: @dcurtisfra -
    Please note that, "cloning" is generally reliable only, when a system is being cloned to an exactly identical hardware platform.
    In my case -- it is the same hardware -- the USB was attached to the same desktop and it should work!
    Even in the windows world, new drives can be loaded at bootup .. and might therefor work ..

  8. #8
    Join Date
    Jun 2008
    Location
    Belleville, Ontario, Canada
    Posts
    503

    Default Re: migrate USB installation to internal disk

    Excellent news.
    "The time is always right to do what's right." Rev. Dr. Martin Luther King, Jr.
    openSUSE 15.3 5.3.18-59.40-default x86_64

Posting Permissions

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