can grub2 be installed on a different drive from the drive with /boot?

Hello,

I apologize for having multiple open threads but I keep running into new issues that are not related to my original post and I don’t generally like to mix the content of threads. I think that makes it harder for other users to find relevant topics when they are doing a search.

I am having trouble with my motherboard in that I can’t get my boot drive to appear as an option in the boot order list. The motherboard recognizes the drive and it appears in the list of sata connections. I can also boot the OSs on the drive from supergrub2.

If I am not able to get the motherboard to point to my boot drive, I was wondering if I could install grub on another drive that does appear on the boot order list and have that grub installation point to /boot locations on another drive. Supergrub2 basically works in this way, meaning that it can boot from any drive, not just the drive that supergrub2 is running on.

Searching on this didn’t really turn up anything that looked relevant, so I was wondering if anyone here had ever done anything like that.

Thanks,

LMHmedchem

EFI or MBR??

Hi
If MBR then maybe the boot flag is not set?


fdisk -l /dev/sdX

Where sdX == sda, sdb etc

Yes, as long as you install to the MBR of that drive.

However, it is important to know whether this is a UEFI system, because booting is different in that case.

The first issue is that my motherboard is trying to boot from a drive that doesn’t have grub installed on it, or any operating systems for that matter. The first drive in the boot order is just a data drive. At present, I am not able to add my boot drive to the boot order because it doesn’t appear on the list. That is a matter I am trying to resolve from the hardware side. If I can’t fix that, I will need another option.

This is a z77 motherboard, so not new (ivy bridge), but also not ancient. The board supports EFI but it is currently set to support both EFI and legacy booting. I assume that it is using MBR because I only have grub2 installed and not grub2 EFI.

LMHmedchem

With MBR boot you need at least have /boot on the boot drive. MBR boot code does not span drive

Maybe switch cables to change order

That mostly depends on how you booted the installer. If you booted the installer in UEFI mode, it will attempt to use grub2-efi. Otherwise it will attempt to use grub2.

If you use Yast bootloader – either from the installer, or by booting into the system via your supergrub disk, then the Yast Boot Loader page should have a button for “Boot Loader Installation Details”. It’s toward the bottom left.

Click on that. It will list the disk order assumed for booting. You can move up/move down to change the order. The trick is to make sure that the first in boot order is the disk that your BIOS recognizes and attempts to use for booting. With that set, then also check the box “Boot from Master Boot Record”. When you click OK (perhaps followed by “Finish”), Yast should set it up the way that you want.

This procedure worked perfectly. This was very easy to do in Yast, which is one of the things I like about suse.

I assume that when I changed the settings in yast to make one of the data drives the first in the grub boot order, yast installed grub2 to the MBR of that data drive. I would guess that grub2 still used the same grub.cfg file that it did before, meaning the file in the /boot/grub2 on my opensuse installation. Is that correct? The MBR is not very big, so whatever is installed there just has to point to where the .cfg files are located.

At any rate, I have my boot menu back and can get back into the OSs that are on the drive even thought I am not able to point to my boot drive in the bios. If I get things fixed, I guess I can just change the boot order in yast back to what it used to be. Grub2 is still probably installed on the MBR of my boot drive.

LMHmedchem

Yes, assuming that you checked the box to boot from MBR.

The MBR is not very big, so whatever is installed there just has to point to where the .cfg files are located.

Actually, grub2 cheats a tad. There is usually some unused space between the MBR and the first actual partition on that drive. And that space is also used by grub2. But yes, it uses that to find “/boot/grub2” and files under that directory.