PDA

View Full Version : [SOLVED] grub.cfg error



f2600
21st August 2017, 08:59 PM
Does any know how to fix grub.cfg permanately that points to a wrong 'set root=' entry

Installed fedora to second sata drive. Using bios and not uefi. mint on sda or hd0,1 and fedora on sdb or hd1,1
both are being pointed to hd0,1 in grub.cfg and i dont know how to fix it. I installed the boot loaders on their respective drives but fedora drops to initrams prompt every time

I want to fix this issue and have fedora control grub2 but also fix grub.cfg so it will survive kernal update

thanks all

dswaner
21st August 2017, 11:03 PM
Since you want fedora to be primary, whichever drive it is on should be set to be first in the BIOS boot order, or at least you would want to install grub from fedora on whichever drive is first in the boot order.

It seems to me that sometimes the hd0 and hd1 get switched, and I don't know of any way to enforce it always being one way. The dev.map created when grub is installed seems to be ignored sometimes. But once it is set up and working, grubby seems to keep it working.

Since you installed grub on 2 different drives, it seems like you are planning on doing chainloading. With grub, using "configfile" is now preferred, rather than chainloading. However, if mint is not using grub, then maybe you would still want to do chainloading.

f2600
24th August 2017, 04:21 PM
To dswaner I want to apologize for not publically thank you for your reply to my problem in the reply section. I appreciate the fact that you took the time to comment. The issue was resolved by reinstalling fedora xfce. I am extremely new to linux as I just could not handle windows anymore. I read a great deal but do have questions from time to time.

thanks again

I tried to send pm but I guess you are not setup for that.
Admins - just wanted to say thanks to this person and had no other way

antikythera
24th August 2017, 05:28 PM
in the thread is fine, thanks messages are always welcome here. some members choose not to allow private message or email contact from other members.

amiga
25th August 2017, 12:16 AM
Does any know how to fix grub.cfg permanately that points to a wrong 'set root=' entry

Installed fedora to second sata drive. Using bios and not uefi. mint on sda or hd0,1 and fedora on sdb or hd1,1


You may not be aware of this but it isn't recommended to refer to drive letters anymore. You should use either UUIDs or parition labels. The default for grub now is to use UUIDs. As UUIDs are unique you won't have duplicates.


Since you installed grub on 2 different drives, it seems like you are planning on doing chainloading. With grub, using "configfile" is now preferred, rather than chainloading.

This doesn't make sense as in order to load a config file for the other OS the grub system needs to be on both drives You can't load a cinfig file if there is none. With two drives with one OS each putting both GRUBs on their respectiver MBRs is harmless and doesn't mean that "it seems like you are planning on doing chainloading"

DESCRIPTION
grub-install installs GRUB onto a device. This includes copying GRUB images into the target directory (generally /boot/grub), and on some platforms may also
include installing GRUB onto a boot sector.

Besides the OP wants Fedora to control GRUB2. They could load the config file for Mint from Fedora's GRUB. Mint was previously the sole OS and had a bootloader. Now they want Fedora to take control of GRUB so it needs GRUB as well.

dswaner
25th August 2017, 01:03 AM
@amiga:


The default for grub now is to use UUIDs.

Looking at my current F26 grub.cfg, it has UUIDs, yes, but it also still has references to hd0:


set root='hd0,gpt19'



the grub system needs to be on both drives

Yes, on a BIOS system, both drives would need a /boot/grub2 directory with a grub.cfg file. Or, if there are multiple operating systems on one drive, each operating system instance would need a /boot/grub2 directory with a grub.cfg. However, it isn't necessary to have grub installed in both drives' MBR (though that would not hurt anything to have 2 copies installed). That is one of the nice things about using the new configfile method, instead of chainloading - there is only one copy of the grub bootloader installed (or, at least, there is only one copy that is actually used).

dswaner
25th August 2017, 01:43 AM
and doesn't mean that "it seems like you are planning on doing chainloading"

You may be correct. However, if the OP was not planning on doing chain scheduling, or the configfile method, then it means that whenever mint has a kernel upgrade, the OP will be required to manually run a grub2-mkconfig on the fedora instance to pick up the new mint kernel, because the upgraded mint grub.cfg file is not used - the fedora grub.cfg file, with the mint kernels detected by the fedora grub os-prober is used.