[Solved] Grub2 - Change default installation (not MBR)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
scott36

[Solved] Grub2 - Change default installation (not MBR)

Post by scott36 »

Dear All,

I want to change the default installation drive of GRUB 2.

Every time, Linux Mint does an Kernel update, the bootloader will be updated. How is it possible to change the default setting for the bootloader installation to something beside the MBR, as I do NOT want that the MBR is overwritten?

I have read a lot of documentation about GRUB2 but could not find an answer, probably its a setting with Linux Mint?

Thanks for every help,

Scotty
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
wayne128

Re: Grub2 - Change default installation (not MBR)

Post by wayne128 »

scott36 wrote:Dear All,

I want to change the default installation drive of GRUB 2.

Every time, Linux Mint does an Kernel update, the bootloader will be updated. How is it possible to change the default setting for the bootloader installation to something beside the MBR, as I do NOT want that the MBR is overwritten?

I have read a lot of documentation about GRUB2 but could not find an answer, probably its a setting with Linux Mint?

Thanks for every help,

Scotty
If you do not want Grub2 to control MBR, then you need to replace it with another boot loader, such as Grub legacy.
If you choose to use Grub legacy to control MBR, you can have one of the following method to boot your Linux OS
1. direct boot, this means you must provide kernel lines and initrd line.
Then when there is new kernel line due to update you need to add those line into the menu.lst
2. indirect boot, either use chainloading or core image
Nice thing for this indirect boot is that, each time when kernel update of some update related to Grub2 ( grub-pc, etc), there is no need to make change to menu.lst

One thing to note, if you have only one Linux OS, there is little trouble letting Grub2 control MBR.
However if you multi boot a lots, and change often, then the indirect boot is very convenience.
scott36

Re: Grub2 - Change default installation (not MBR)

Post by scott36 »

Thanks for your reply,

To summarize your post: Grub2 will always install in the MBR once a kernel update from Linux Mint is released?

Cheers,
Scott
StanTheMan

Re: Grub2 - Change default installation (not MBR)

Post by StanTheMan »

If your MBR gets inadvertentely over-written , it is easy to re-do it.
With a MInt installer disk , load it to Live desktop.

Launch Terminal (Live)
(let's say your previous grub bootloader was on /dev/sda7)
cd /media
sudo mkdir sda7 (creates a virtual mount pint)
sudo mount -t ext4 /dev/sda7 /media/sda7 (mounts the partition sda7 on this virtual mount point)
sudo grub-install --root-directory="/media/sda7" /dev/sda (re-writes MBR on sda and points its search to find a grub.cfg file on the Root which is temporarily mounted on this virtual directory)
Now re-boot, and your old boot list should display.
scott36

Re: Grub2 - Change default installation (not MBR)

Post by scott36 »

Thanks for that,

Scott
Locked

Return to “Installation & Boot”