Hi all,
i have a dual boot machine with this configuration:
Fedora 13 installation on the first 4 disks, booted with grub legacy installed on the MBR of /dev/sda
OpenSuse 12.3 64bit installed on the 5th disk, with GRUB2 installed on /dev/SDE and chainloaded from grub legacy (the fedora bootloader).
With this configuration every OS manage its own bootloader without any interference.
A couple of days ago i issued a “zypper up” and something went horribly wrong. At the next boot I saw that grub2 was installed on the MBR of the first disk, and grub legacy was overwritten. Luckly grub2 autoamagically detects the presence of Fedora 13 and allows me to correctly boot it (I can’t honestly understand where it has found the right parameters, it seems like it has read and copied the grub legacy configuration file) and i was still able to boot both the OSs.
My first question is why this happend ? And, secondly, how can I avoid a disaster like that to happen again ?
I had a look to zypper log and i didn’t find any update to the grub package. I saw instead that the kernel was updated and i suppose this could be the problem. After the kernel update the grub configuration file has to be modified, but why it issued a complete grub-install overwriting the (wrong) MBR ???
Any ideas ?
P.S. In the meantime I recovered the situation reinstalling grublegacy on sda (from fedora13)and grub2 on sde (from opensuse12.3).
The problem would be if Grub got updated I would imagine and I can say that in the past and on dual or triple boot setups, such a thing has happened to me. To see what was installed last, you can use the following command:
rpm -q --all --last
If you are a big zypper user and fan, you must check out my bash script Zypper Command you can find here:
Could be the initial config for openSUSE was to write the code to MBR. If Fedora was installed afterwards, and now openSUSE updates the kernel (hence reconfiguration of GRUB2), wouldn’t that explain it?
Fedora was installed before (several years before) of OpenSuse. After the installation there were at least an update package for grub2 and one for the kernel (as you can see from my previous post), without any adverse effect on Fedora Grub1.
I’m absolutely sure the first grub installation was on /dev/sde and i’m absolutely sure that, until 3 days ago, /dev/sda has contained a grub-legacy MBR from which i have always booted fedora13 and, via chainload, Opensuse!
> So my suspect is that the kernel update process was involved in the
> problem
The kernel update triggers some sort of grub reinstall. At least it has
to add/remove entries in the menu. I heard that openSUSE 12.3 does
somewhat more than needed with grub2.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
Perhaps, prior to install OpenSuSE, i disconnected the disks on which Fedora is installed to be sure they weren’t modified. This could explain why grub_installdevice contains a reference to /dev/sda instead of /dev/sde
So the installation of grub2 over sda it’s not an unexpected behavior.
I still can’t explain why it’s necessary to rewrite the mbr after a kernel update. Isn’t the modification of grub.cfg enough ?
On 2013-09-24 05:26, caf4926 wrote:
>
> robin_listas;2587160 Wrote:
>> On 2013-09-23 20:56, jjletho wrote:
>>
>>> So my suspect is that the kernel update process was involved in the
>>> problem
>>
>> The kernel update triggers some sort of grub reinstall. At least it has
>> to add/remove entries in the menu. I heard that openSUSE 12.3 does
>> somewhat more than needed with grub2.
> Yes
> openSUSE writes not just the menu but also re-writes the MBR
I wonder why. Mistake, or intentional?
Some unknown advantage, perhaps? :-?
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
I have just had a look to bugzilla, but i didn’t find anything related to useless writing into MBR or while it is unnecessary. could you please give us a reference ?
Thank you very much!