Switching grub from another partition

kr flag

I have my own grub partition sda1 and various distros in sda2-7 (GPT). My grub installation on sda1 has a manually crafted config, background images etc. Recently I installed another distro and it installed it's own grub in it's own partition sda7. It detected other distros mostly correct but I want to use my own grub from sda1 because one day I will delete this distro and still want my own grub working. What exactly I have to do now?

I am lost because there are dozens grub-TAB programs and grub-install has multpiple confusing options like devices directories images etc.

I know there are BIOS and UEFI installs but this is so confusing I do not even know which one my system has now. I remember creating 100MB fat16 disk for uefi but if any of the distros used it is unknown.

Can I simply type grub-install /dev/sda -d /mnt/mygrub ?


sda1 ext2 grub
sda2 efi parition I created manually empty, not it as some files created by ubuntu install
sda3 btrfs linux from scratch
sda4 btrfs debian
sda5 btrfs freebsd
sda6 ntfs reactos
sda7 btrfs ubuntu

I have sda1/boot/grub/grub.cfg with all the menu entries. Now sda2/EFI/BOOT have something else that I cannot really recognize. It has grub.cfg also.

guiverc avatar
cn flag
`grub` is installed in the `/boot/grub/` **directory** of the installed OS and not in its own partition; stage 0 exists outside of the partition - but it lives on the MBR which is outside of all partitions (ie. a sector of the drive reserved for that purpose & outside of partition table consistent with PC design since 1982 for compatibility purposes). According to your question; the last installed was Ubuntu - meaning Ubuntu should already control the `grub` (ie. stage0/MBR will point to Ubuntu) meaning your issue is a non-Ubuntu issue. Please clarify as your details make little sense to me.
oldfred avatar
cn flag
The ESP is normally FAT32, but supposedly FAT16 will work. UEFI boot & BIOS boot are not compatible. Or once you start booting in one mode you cannot switch. Or grub can only boot other installs in same boot mode. You can manually install grub and create your own grub.cfg. But then you have to know enough about grub to maintain that as none of the tools to update grub will work. How to: Create a Customized GRUB2 Screen that is Maintenance Free.- Cavsfan
kr flag
Thanks for the replies. My situation is that I already know a lot about grub, I got my grub modules, I crafted the config for all kernels, I learned how to provide kernel parameters, I can create initrd from scratch, I can use grub commands like search, create menus, boot from btrfs subvolumes etc. The only part I am missing is that Ubuntu took MY grub.cfg and all modules/images that come with it away from me and now my system uses something that resides in Ubuntu's `/boot/grub`. I just want my copy of grub back.
kr flag
I believe I just need to update the boot sector to tell it on which partition to look for the config. I have no problems editing config by hand, that's what I want actually. I hacked boot process since atari 8bit, maybe I am just too stupid to get the important part.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.