I have installed first Kubuntu (sda3), then installed Ubuntu (sda4) and finally Linux Mint (sda5) on the same SSD (back to back). I want to remove Linux Mint from the disk and from the grub menu. But since I have installed Linux Mint as final, grub customization works only on Mint.
I plan to remove sda5 partition but I am afraid if I lose the grub menu. How can I safely remove Linux Mint (sda5) and get control of the grub menu to Ubuntu (sda4)?
Thank you in advance.
grub-install /dev/sda
for example to make it take ownership), then from that OS remove the unwanted partition & you're done. If the first step is missed (making another OS own boot process), you'll end up with grub rescue as the Mint's grub is broken, so have whichever you want to own the process take over boot (make it's grub active)./dev/sda
as per my comment, as the MBR is the first 512 bytes (first sector) of the drive; it's reserved for that purpose, and there is only one (regardless of how many partitions you have; it's before them). Thegrub-install
command just installs the MBR into place..update-grub
can be used after removing the Mint partition to have it re-scan, notice Mint is gone & have correct menu options (grub menu is stored in /boot/grub/) but that'll occur on next kernel upgrade anyway...