Problem with GRUB2 and USB Hard Disk openSUSE installation

I have openSUSE Leap 42.2 on main hard drive with private data. I remove that drive, connect USB Hard Drive and install openSUSE Tumbleweed on that USB hard drive.

Tumbleweed Update works, restart few time, add drivers, all great. All works like that with Tumbleweed.

But, when I put back main hard drive, Tumbleweed USB hard drive just give me grub> prompt.
Main hard drive works, and start Leap.
BTW, when PC boot, I can choose in 10 sec, between Optical-MainDrive-USBdrive-Network.

MainDrive Leap works, Tumbleweed don’t, just grub> prompt.

I do all this, remove Leap drive and install Tumbleweed like that, because of my data. This way I’m secure installation won’t erase anything and boot will work if USB wasn’t connected. Maybe just my fear, but…

Maybe problem with sda (USB was sda in installation) and now that USB hard disk is sdb?

That could be possible. Insert your USB drive after booting Leap 42.2, and paste the output of /etc/fstab inside the Tumbleweed USB.

UUID=r09ru47f-ke93-kdlfzo6rk-7sjj38fdwl21 swap swap defaults 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os / btrfs defaults 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /opt btrfs subvol=@/opt 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /srv btrfs subvol=@/srv 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /tmp btrfs subvol=@/tmp 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /usr/local btrfs subvol=@/usr/local 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/cache btrfs subvol=@/var/cache 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/crash btrfs subvol=@/var/crash 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/machines btrfs subvol=@/var/lib/machines 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/log btrfs subvol=@/var/log 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/opt btrfs subvol=@/var/opt 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/spool btrfs subvol=@/var/spool 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=wf59ddlg-40kg-6f33bly9d-qsp8ff31i7os /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=78dwk28f-udr5-2aqobuo8l-rrm4sito6m61 /home xfs nofail 1 2

Can’t access /home partition with Dolphin, lsblk or KDE Partition Manager.
Get this message
“An error occurred while accessing ‘Documents’, the system responded: The requested operation has failed: Error mounting /dev/sdb2 at /media/me/78dwk28f-udr5-2aqobuo8l-rrm4sito6m61: Command-line `mount -t “xfs” -o “uhelper=udisks2,nodev,nosuid” “/dev/sdb2” “/media/me/78dwk28f-udr5-2aqobuo8l-rrm4sito6m61”’ exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so”

I don’t have any data on that partiton. I can format it (xfs, ext4, etc.) or do whatever you write.

Forget to write.
Main hard drive, second partition is extended, can’t find UUID.
USB hard drive, second partiton is primary, no extended partiton on that hard disk.

Do you boot using legacy BIOS or UEFI?

Legacy BIOS.

I don’t have UEFI.

Note that UUID’s are just links to the devices . ie /dev/sdX#. So go to /dev/disk/by-uuid note the UUID of ie right click and see exactly which device is being referenced in the link

UUID is a random unique number set at the time a partition is created

UUID is used so that the drive order should not be an issue. /dev is not on the disk it is created at boot so you have to look at it from a running Linux

UUID is same, identical, in /dev/disk/by-uuid and /etc/fstab

When you have only the USB drive connected, it is hd0 in grub. When you have also internal drive connected, internal drive becomes hd0 and USB drive becomes hd1. You need to fix that in USB drive’s grub config.

Configuration has become so complex that I don’t any more know where this should be changed. Hopefully somebody else can tell that.

This is how it looks
https://i.imgsafe.org/ff3f4cc9ce.jpeg

I try this, can’t do anything.
http://www.slashroot.in/linux-grubgrand-unified-bootloader-tutorial

Please, connect both drives, boot, run https://github.com/arvidjaar/bootinfoscript and upload RESULTS,txt to http://susepaste.org/. This will (hopefully) show information about your bootloader configuration on both systems.