2 disks; disk 1 has working win7 and opensuse13.2; disk 2 has new 42.2; grub2 only sees win7 & 13.2

History:
PC had two disks. First disk had dual boot win7 and opensuse 13.2. The second disk was a used for additional storage for the opensuse 13.2 OS.

Rather than update opensuse 13.2 to 42.2, I decided to put the new OS on the 2nd drive, which has far more storage that the first drive. After backing up the data on the second drive (twice!) and imaging the first drive, I deleted the second drive (remember, only data on it) from the fstab on the 13.2 OS.

Using gparted on a bootable CD, I deleted the data partition on the second drive. At this point, the first drive still boots to opensuse 13.2 and win7.

I did an install (not upgrade) of opensuse 42.2 on the second drive. The default installation uses the swap space on the first drive, which I guess is OK since only one OS will be run at a time. (Ultimately the 13.2 installation will be removed to make more room for windows, obviously saving the swap partition.)

The installation of 42.2 went OK. However, grub2 doesn’t see the OS. I can only boot into win7 and 13.2 (which I’m using now).

The question: well how do I fix grub2 to see the 42.2 OS?

Note that the 13.2 OS, which is on the first drive, can see the 2nd drive.

I can open yast2 on the 13.2 OS and go to the boot editor. It also sees both drives. (That is in the boot order tab). The boot editor doesn’t see the 42.2 OS on the second drive.

I have clonezilla and gparted CDs handy if that helps.

Not that I think it is needed, but here is the obligatory uname -a for the 13.2 OS:
uname -aLinux linux-h57q.site 3.16.7-53-desktop #1 SMP PREEMPT Fri Dec 2 13:19:28 UTC 2016 (7b4a1f9) x86_64 x86_64 x86_64 GNU/Linux

The computer is an older Dell (E6400), which I believe predates UEFI.

Did you try rewriting the bootloader config from 13.2? From what it looks like 13.2’s GRUB2 controls the booting. You only need to start YaST’s bootloader module and hit OK.

It’s not true if you ever hibernate your system - then image will be overwritten if you boot another instance in between.

The boot editor doesn’t see the 42.2 OS on the second drive.

The usual practice is to use the most recent version of bootloader, which in this case will be the one coming with Leap. If you do not want to do it - please run as root “os-prober” in 13.2 and paste output.

hi,

try the following,

login to opensuse 13.2

then run cmd

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

it should detect the install on disk2

[if not go into -YaST --Boot Loader and select --Bootloader Options tab and make sure

Probe Foreign OS is selected (as grub has already identified windows this should not be necessary)]

on the next reboot the new install should be automatically selected

good luck

Hi!

I guess that things in your case are simple.

What you should recognise is that the BIOS - and not GRUB - “decides” from which drive you boot first.

It is almost sure that the installation of 42.2 on your second drive installed a valid and working GRUB2.
But if your BIOS loads GRUB from your first drive, then that version of GRUB2 is never loaded.

Enter the BIOS setup and tell your BIOS that it should look for bootable code on your second drive first.
In my BIOS this is called the “boot order”.

Try that, and report back, please.

Another point (perhaps for future installations):
If you have the Linux that is booted from a particular drive have using a SWAP on the same drive, then you will have less problems if you ever may want to physically remove one drive (in e.g. the case that it was getting too old and is failing).

Good luck
Mike

Forehead slap! Thanks.
Yes, it is a factor of the boot disk order as selected by the bios.

Yeah, I wasn’t exactly thrilled with the swap being on another disk, but I couldn’t figure out how to do my own partition. I suppose I can trim the home partition and leave room for a “replacement” swap space should I get the urge to beat my head against the wall messing with fstab, perhaps grub2, etc.

I never use hibernate. I often have this computer running external USB
devices in real time. However I will allocate space on the second drive
for swap while the installation is still new. (If I mess things up, I
can just reinstall it.)

in

-YaST2 --Boot Loader, tab —Boot Code Options

options are under,

----Boot Loader Location

  • Boot from Root Partition
  • Boot Master Boot Record
  • Custom Boot Partition

then again under the button ‘Edit Disk Boot Oder’
-----Disk order settings,

  • Disks
    add your disk2,
    eg.
    /dev/sda
    /dev/sdb
    (the naming convention can be seen from cmd df)

on initialising grub both your disks should be identified and the 3 systems installed