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?


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

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/documentation/leap/startup/html/book.opensuse.startup/cha.trouble.html#sec.trouble.data.recover.rescue>, here: <https://en.opensuse.org/SDB:Installation_help>, and here: <https://en.opensuse.org/SDB:Disaster_Recovery>.
[HR][/HR]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 …
[HR][/HR]Please note that, “cloning” is generally reliable only, when a system is being cloned to an exactly identical hardware platform.

You may try: Grub2 einrichten | Karl Mistelberger

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.

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.

  1. @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

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

chroot /mnt /bin/bash

regarding - fstab and UUID:

cat /etc/fstab

this looked good …

then installed grub2:

grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg

& unmounted everything

umount -a

and finally I was back in business. The cloned drive boots without a hitch and everything is as it was :wink:

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 …

Excellent news.