You are not logged in.

#1 2016-01-04 09:23:34

oraclexzf
Member
Registered: 2015-10-13
Posts: 19

[SOLVED] grub changed after installing centos, how to get it back?

I have BIOS/MBR and grub 1:2.02.beta2-6 on Arch.

I made another partition and installed CentOS, they both boot fine in the selection menu. But the menu is totally different now! I use grub-customizer in arch and none of the changes take effect. Has the grub files been moved elsewhere? how do I get it back?

Last edited by oraclexzf (2016-01-06 01:23:52)

Offline

#2 2016-01-04 13:10:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] grub changed after installing centos, how to get it back?

oraclexzf wrote:

how do I get it back?

Run `grub-install --target=i386-pc --recheck /dev/sdX` from your Arch system.
https://wiki.archlinux.org/index.php/GR … structions

It may be best to update the configuration file also.

EDIT: Link added.

Last edited by Head_on_a_Stick (2016-01-04 13:12:26)


Jin, Jîyan, Azadî

Offline

#3 2016-01-04 14:10:51

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] grub changed after installing centos, how to get it back?

Actually one should NOT reinstall grub (or any bootloader) if it has already been installed during the installation of another distro on the same disk, especially if he does not want anything related to the bootloader to be changed. He should only update the grub.cfg. Ideally that should be done in the ORIGINAL distro, but unfortunately grub-mkconfig isn't really portable across distros so he probably need to regen it on either side and write custom entries for the other. And of course, best practice is always to write grub.cfg from scratch yourself and forget silly grub-mkconfig/update-grub/whatsoever.

Offline

#4 2016-01-04 14:58:56

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: [SOLVED] grub changed after installing centos, how to get it back?

tom.ty89 wrote:

Ideally that should be done in the ORIGINAL distro

In which case it would be necessary to reinstall grub within Arch ... your post is rather contradictory and misleading.

This is all based on the wild assumption that grub was installed to the MBR of the same disk when installing CentOS ...

Last edited by satanselbow (2016-01-04 14:59:19)

Offline

#5 2016-01-04 15:22:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] grub changed after installing centos, how to get it back?

satanselbow wrote:

In which case it would be necessary to reinstall grub within Arch ... your post is rather contradictory and misleading.

Agreed on both counts.  Specifically:

tom.ty89 wrote:

Actually one should NOT reinstall grub ...

This is absolutely true, but in the absence of a time machine to go back and undo what the CentOS installation has already done, the OPs best option is to pick which distro will manage the boot loader and stick with it.  If the OP wants to use arch to manage the boot loader, then reinstalling from arch is the solution.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2016-01-04 15:28:57

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] grub changed after installing centos, how to get it back?

satanselbow wrote:
tom.ty89 wrote:

Ideally that should be done in the ORIGINAL distro

In which case it would be necessary to reinstall grub within Arch ... your post is rather contradictory and misleading.

This is all based on the wild assumption that grub was installed to the MBR of the same disk when installing CentOS ...

I don't see how it is contradictory, by original I mean CentOS in this case, and by "that" I mean update grub.cfg (which does not involve actual "installation" of grub),  why would that means it's necessary to reinstall grub with Arch?

Yes indeed I assumed grub was installed to MBR (and precisely post mbr-gap/bios boot partition; as for "same disk", it's told by the OP), and can you tell how possible or how often we would embed core.img on a filesystem instead? (Is it even possible to do it on ext2/3/4 at all?)

Last edited by tom.ty89 (2016-01-04 15:30:41)

Offline

#7 2016-01-04 16:00:46

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 470

Re: [SOLVED] grub changed after installing centos, how to get it back?

i work with fedora's grub becouse it's entry changes evry kernel update.

ezik

Offline

#8 2016-01-04 18:07:40

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: [SOLVED] grub changed after installing centos, how to get it back?

oraclexzf wrote:

I have BIOS/MBR and grub 1:2.02.beta2-6 on Arch.

I made another partition and installed CentOS, they both boot fine in the selection menu. But the menu is totally different now! I use grub-customizer in arch and none of the changes take effect. Has the grub files been moved elsewhere? how do I get it back?

Looks like CentOS has installed it's own grub - which provides the menu other than the one you previously customised in Arch.

To regain your previously customised menu you will need to boot into your Arch installation and reinstall grub - I would suggest backing up both your customisations within Arch and the CentOS entry from wherever CentOS leaves it's grub configurations - and then reinstalling grub in Arch as per Head_On_A_Stick wink

Offline

#9 2016-01-06 01:07:54

oraclexzf
Member
Registered: 2015-10-13
Posts: 19

Re: [SOLVED] grub changed after installing centos, how to get it back?

I did pacman -S grub to re-install and nothing has changed.

Last edited by oraclexzf (2016-01-06 01:08:11)

Offline

#10 2016-01-06 01:11:06

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: [SOLVED] grub changed after installing centos, how to get it back?

satanselbow wrote:

[...] and then reinstalling grub in Arch as per Head_On_A_Stick wink

Head_on_a_Stick wrote:

Run `grub-install --target=i386-pc --recheck /dev/sdX` from your Arch system.

Last edited by respiranto (2016-01-06 01:11:35)

Offline

#11 2016-01-06 01:23:13

oraclexzf
Member
Registered: 2015-10-13
Posts: 19

Re: [SOLVED] grub changed after installing centos, how to get it back?

respiranto wrote:
satanselbow wrote:

[...] and then reinstalling grub in Arch as per Head_On_A_Stick wink

Head_on_a_Stick wrote:

Run `grub-install --target=i386-pc --recheck /dev/sdX` from your Arch system.

Thanks for fast reply, grub customizer works agian

Offline

#12 2016-01-06 05:50:57

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] grub changed after installing centos, how to get it back?

Bah I mis-read from the OP that CentOS was the original distro and Arch was the newly installed one...

Offline

Board footer

Powered by FluxBB