Add entry to grub2

Experimenting with another (non-Windows) distro installed on a separate HD. It boots from that drive when set in the BIOS. But Yast2 does not recognize there is a bootable distro there. How do I manually add it to the grub2 configuration?

Thanks in advance.

You can add entries in “/etc/grub.d/40_custom”.

If grub2_mkconfig does not find the system that you want to boot, then you can use a chainloader entry for that. For example, I am using:


### Boot grub from "/dev/sda5"
menuentry "linux on /dev/sda5" {
        set root=(hd0,5)
        chainloader +1
}

That’s for legacy BIOS booting. The format is a bit different for UEFI chain loading.

If you have multiple disks, you can use the UUID to identify the partition to chainload. Ask if you need more information for your specific problem.

Thank you. My entry now appears, but when selcted to boot I get…

 error : invalid signature 

I don’t understand what that means. Is there a workaround?

I might add hd0,1 is not formatted with a linux or windows file system. BeFS.

If this is UEFI with secure-boot, then that’s a different problem.

Otherwise, it might mean that the partition boot record does not have the standard boot signature in the last 2 bytes. Maybe grub checks that.

That should not matter for chain loading. All that is required is a functioning partition boot record.

It means that block that you told grub to read does not have standard MBR/PBR signature (0x55aa at the end).

Is there a workaround?

If you explain how booting of your non-Windows OS works, someone may be able to suggest how to integrate it in grub.

As direct BIOS booting from another disk works, you may start with trying to load MBR from that disk. This may require juggling BIOS disk numbers using drivemap command though.

Wondering if a missing or incorrect MBR boot record could cause a boot fail…
Of course we should all know that a Secure Boot requires a signature,

But I don’t remember running into any disk fails known to be specific to an MBR signature, although I’ve had occasions when a MBR mysteriously went bad and had to be re-initialized (maybe some kind of signature problem? Never checked).

TSU