Moving MBR to a new drive

sda installed Manjaro that i use with 5.14 and 5.13 kernels.
sdb new install manjaro and i put MBR on this disc.
On sda install 5.15 ,delete 5.13 and i saw grub changes and 5.15 , 5.14 kernels displayed.
Also run grub update and i see changes with kernels are ok.
Reboot on sda and 514 and 513 are present not 5.15.
Boot from sdb run grub update and kernel changes displayed correctly.
Boot again from sda and changes are saved on sda.
How i move MBR from sdb to sda?
I search and find something like this.

dd if=/dev/sdb of=/dev/sda

and this

`# grub-install /dev/hda`

Thanks in advance

… this is all pretty vague
perhaps use a few more words to describe what is vs what you expect to be :wink:

cave: it’s unlikely that I’ll be the one who can help you

Just this warning:

don’t do this! -
if you run that with sudo, it will overwrite all of /dev/sda with all of /dev/sdb -
everything on /dev/sda will be gone!

It will be an exact copy of /dev/sdb afterwards - perhaps with room to spare, perhaps it won’t fit. Depends on the size difference of the drives.

Let me rewrite it.
I have a hard drive (sda) where I have a manjaro with cores 5.14 and 5.13.
I install 5.15 and delete 5.13.
A few days ago I got a second hard drive (sdb) where I installed manjaro and put the MBR in it.
Let’s go to sda now.
After I made the changes to the kernels a restart and the changes were not saved.
Starting with sdb I updated grub and the changes were saved.
From this fact I understand that some changes I make, for example in the kernels, I have to update the grub in sdb.
That’s why i wand to move MBR from sdb to sda or must work with sdb.

It’s actually pretty simple:
you just have to decide from which drive you want your machine to boot.

That is where you put the boot loader.

That bootloader can then be configured and used to boot either of your installed systems - the one on the first drive as well as the one on the second drive.

The fact that both of your installed systems are Manjaro doesn’t make the task less confusing :wink: since the kernel images (what you called cores) will have identical names.

You only need one bootloader - on one drive - on which you put it is your choice.

If it’s so simply why choosing to boot from 2nd disk (sdb) i get grub resque> ?

I don’t know.
And until now, you didn’t tell that.

It is a dual booting scenario - choosing between two operating systems.
Look into how to do that - there are many posts on this topic here, often involving dual booting Windows and Linux.
It’s Linux and Linux in your case - even the same Distribution.

It is not what you seem to think, a problem with two or more harddrives.

grub-install --target=i386-pc /dev/sdX
grub-mkconfig -o /boot/grub/grub.cfg

That recover the ΜΒR back to the disk I wanted.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.