I recently dual-boot kali-linux-2016.2-amd64 with windows 10. After sometime I updated my windows 10 and due to this windows might have removed grub from the boot menu. Now I can’t boot kali-linux from the boot menu because it doesn’t appear there anymore.
So I decided to re-install grub by booting into Live-kali(Persistent) from USB. I entered the following command in the terminal:
fdisk -l sudo mount /dev/sda* /mnt sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys sudo chroot /mnt grub-install /dev/sda
CTRL + D
sudo umount /mnt/dev sudo umount /mnt/proc sudo umount /mnt/sys sudo umount /mnt
Here is Solutions:
It’s very hard to help you because you don’t know basic commands… but I’ll try okay?
fdisk -lyou list your current partition, like your image.
- With your image I can see that you have /dev/sda1 as EFI System, /dev/sda10 as Linux filesystem and /dev/sda11 as Linux swap. Keep this information.
When you boot with a live cd you must do a
chrootfor access your system, in other words, an operation that changes the apparent root directory for the current running process and its children. Lets go:
mount your system at /mnt. Remember? Linux filesystem? Yes. It’s /dev/sda10. So do command:
sudo mount /dev/sda10 /mnt.
You are using
sudobecause you must have administrator permissions to do it.
So, mount the temporary filesystems needed for programs work, with the commands:
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
You are modifying your boot, so you need your /boot partition too. Some systems uses the same partition for the /boot directory and system root (/). If you don’t know what is your case, so at this point check if you have files in the folder /mnt/boot/ (you will find your kernel images, configurations , etc).
– If the /mnt/boot folder is empty, so you need mount the /boot partition. The only other possibly usable partition on your case is /dev/sda1, so will be it. Mount at /mnt/boot.
– If you found the files, so the another partition at /dev/sda1 should be really the EFI Filesystem, and it must be mounted at /mnt/boot/EFI.
With all mounted,change root directory using:
sudo chroot /mnt /bin/bash
Now, inside chroot, you can install grub:
sudo grub-install /dev/sda
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂