2

I used to have Ubuntu as my only OS until I decided to get a new SSD and installed CentOS there. Now upon starting my computer I can't start Ubuntu without modifying the entry for Ubuntu first. I know how to do that, basically I change where it says:

linux /boot/vmlinuz...
initrd /boot/initrd.img...

to

linuxefi /boot/vmlinuz...
initrdefi /boot/initrd.img...

However, I need to make this change every time I want to start Ubuntu, thus my question: how do I make this change permanent?

I read this and this threads, but I'm not sure if the changes should be made in:

/boot/efi/EFI

or

/boot/grub/

or

/boot/grub2/

I can't also find the file with the exact line I change every time upon starting my computer. I suppose the file is named something like grub.cfg. In any case, I wouldn't like to tinker with one of those files without knowing 100% that I won't mess things up further. Also, should this change be made in Ubuntu or CentOS?

Any help would be greatly appreciated. Thanks!

PS: please note that Ubuntu and CentOS are installed in different SSDs, if that matters at all.

YSC
  • 21
  • 1
  • 3

1 Answers1

0

I finally found the appropriate file and thought of documenting the solution here just in case someone else has the same (or similar) problem.

In my personal case, when in Ubuntu, the file:

/boot/grub/grub.cfg

would only allow me to modify the entries listed under "Ubuntu Advanced Options."

However, in CentOS (remember the problem first arose when I installed CentOS in a new SSD) the file:

/boot/efi/EFI/centos/grub.cfg

contains the lines for the entry "Ubuntu 16.04."

The only thing that now makes me wonder whether this is an ideal fix or not is that in grub.cfg there's a note that says not to modify the file because it's automatically generated from "/etc/default/grub." The changes in the above directories fixed the problem, though, and thus far I haven't experienced any problem upon booting.

I will leave a few days before accepting this answer in case someone has a better answer or explanation for that "don't edit this file" note at the beginning of grub.cfg.

YSC
  • 21
  • 1
  • 3