0

TL;DR; I want to use Linux Mint GRUB instead of Kali Linux. Is there a way to disable the GRUB of Kali Linux and used GRUB of Linux Mint?

Linux Mint GRUB is installed on a separate partion (/dev/sdb4) Kali Linux GRUB is installed together in its / directory (/dev/sdb2)

I recently installed Kali Linux on my Laptop with Linux Mint installed. However, after installation, the GRUB used is Kali (determined by the kali background image) and my old GRUB (Linux Mint) was overwritten(?). I also checked the partition where I installed Kali Linux and found a separate boot folder.

During installation of Kali, option to install new boot loader was not given.

I understand there are commands like grub-install or something that I can run on my host system, in this case Linux Mint. However, I also read that during installtion of GRUB it writes something in the master boot record.

$ lsblk
NAME     SIZE RO TYPE MOUNTPOINT
sda    698.7G  0 disk # extra disk for files
└─sda1 698.7G  0 part /media/user/Shared #Samba share
sdb    489.1G  0 disk # main disk
├─sdb1     4G  0 part [SWAP] # this is shared between 2 distro
├─sdb2   200G  0 part # Partition for Kali Linux
├─sdb3   200G  0 part / # Partition for Linux Mint
├─sdb4   976M  0 part /boot/efi # EFI partition (from Mint installation)
└─sdb5  84.1G  0 part /media/user/DPartition # partition shared between distro

I want to use the GRUB installed in /dev/sdb4 instead of the GRUB installed in the /dev/sdb2:/boot.

Is there a way to disable or delete the GRUB in Kali Linux? Any help will do. Thanks!!!

P.S. I don't have a live CD right now, I just used a borrowed flash disk to boot and install linux from USB.

-edit- I can boot from Mint and Kali using the GRUB of Kali linux.

I understand since I am using UEFI I can just remove the GRUB from Kali and my laptop will just boot from /dev/sdb4 however I cannot risk it since I don't have a live cd to use right now. Is there a way to do this without using a live cd?

  • Can you boot into Mint via Kali's grub menu? – sudodus Jul 13 '18 at 14:54
  • I can but I prefer to have the grub controlled by Mint rather than Kali. – waaaw Jul 13 '18 at 15:01
  • OK, that makes is fairly simple to replace grub. – sudodus Jul 13 '18 at 15:08
  • Is there way to replace it? – waaaw Jul 13 '18 at 15:22
  • I am working on an answer. Please boot into Mint and run the following command to check if it is booted in UEFI or BIOS mode: test -d /sys/firmware/efi && echo efi || echo bios and let me know. – sudodus Jul 13 '18 at 15:24
1

When you can boot Mint via Kali's grub menu, you can replace grub to make it point to Mint.

  • Boot into Linux Mint and run the following commands

  • Check if you are running in BIOS mode or UEFI mode. It seems that Mint was installed in UEFI mode, but you can check with

    test -d /sys/firmware/efi && echo efi || echo bios
    
  • Check where you have grub.cfg. It is usually in /boot/grub, which is the default.

    find /boot -name 'grub.cfg'
    

    If it is somewhere else you need an option to point to the correct location. See man grub-install for the details.

  • Install the grub bootloader. See the following link,

    help.ubuntu.com/community/Grub2/Installing#Reinstalling_GRUB_2_from_a_Working_System

    sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda
    

    This command works in BIOS mode and I checked now that it works in UEFI mode too (tested with Lubuntu 18.04 LTS and Ubuntu 16.04.1 LTS in a NUC).

  • Then run the following command to make Mint see Kali (there should be at least one menu item for Kali in Mint's grub menu),

    sudo update-grub
    

Solution (after comments and a chat)

Running those commands from Mint could not overwrite/remove the file grubx64.efi, that points to Kali. But the OP saw it and did it manually.

  • Thanks man, I have question regarding grub-install. I have a separate partition for boot (/dev/sdb4) and I want to have the boot files on that partition alone. Will grub-install /dev/sdb do the trick then? – waaaw Jul 13 '18 at 17:27
  • Maybe not, so please check more before going ahead. 1. At least in Ubuntu, a separate boot partition will be mounted as /boot and you should use it like that (check with find /boot ... as described; 2. Furthermore, UEFI boot will usually point to /dev/sda (the first drive), but I notice your output of lsblk in the question. Please boot into Mint and run lsblk and check where you have the EFI system partition. – sudodus Jul 13 '18 at 17:39
  • If you want more specific help with Mint, please tell me which version it is. – sudodus Jul 13 '18 at 17:42
  • Im sorry. I am booted on linux mint. Version is 19. Also the EFI partition is /dev/sdb4 (I remember Mint dont want to install without this EFI partition). Also, I followed the instructions above (used /dev/sdb for grub-install) but Kali grub is still used. – waaaw Jul 13 '18 at 17:46
  • If you can boot into Mint when the extra disk for files is disconnected, it will be easier to get things correct. If it is mounted via /etc/fstab you can comment that out (with a # in the beginning of the line). – sudodus Jul 13 '18 at 17:48
1

If the commands by sudodus does not work to you and you are also on UEFI mode, you can try a quick solution:

In /boot/efi/EFI/ there will be directories of all the OS with grub bootloader in your system. What I did is removed the file grubx64.efi inside kali directory and reboot my system.

Note: Take precautions in removing this file as it can make your system not bootable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.