Dual boot Kali and Mint. Want to use Grub of Mint
Solution 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.
Solution 2
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.
Related videos on Youtube
waaaw
not really into anything other than playing computer games.
Updated on September 18, 2022Comments
-
waaaw over 1 year
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?
-
sudodus almost 6 yearsCan you boot into Mint via Kali's grub menu?
-
sudodus almost 6 yearsOK, that makes is fairly simple to replace grub.
-
waaaw almost 6 yearsIs there way to replace it?
-
sudodus almost 6 yearsI 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. -
waaaw almost 6 yearsCommand resulted in 'efi'
-
sudodus almost 6 yearsI checked in UEFI and uploaded an answer with details.
-
-
waaaw almost 6 yearsThanks 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?
-
sudodus almost 6 yearsMaybe 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 withfind /boot ...
as described; 2. Furthermore, UEFI boot will usually point to/dev/sda
(the first drive), but I notice your output oflsblk
in the question. Please boot into Mint and runlsblk
and check where you have the EFI system partition. -
sudodus almost 6 yearsIf you want more specific help with Mint, please tell me which version it is.
-
waaaw almost 6 yearsIm 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.
-
sudodus almost 6 yearsIf 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). -
waaaw almost 6 yearsI commented the extra disk in /etc/fstab. Rebooted and still see Kali Grub. Right now only /dev/sdb partitions are mounted except for /dev/sdb2 (kali partition)
-
sudodus almost 6 yearsLet us continue this discussion in chat.
-
waaaw almost 6 yearsI recovered the old grub now. Apparently. the efi partition has entry for the grub it can use. I remove the one for Kali and rebooted. Success. P.S. I am marking this as correct answer and will add another answer for the efi partition.