5

I am installing kali linux on my pc. while installing install the grub boot loader on a hard disk. I am trying to install kali linux with grub as your bootloader and that step is failing.

Error: GRUB installation failed.
The 'grub-pc' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.

Installation screenshot

I used bootable pendrive.

An error message like grub installation failed . what should I do ?

I am made a rufus usb insatller with kali linux . then Install manually, after install the system then I'm stuck in installing the grub boot load

Grub installation failed
the grub-pc package failed to install into /target without the GRUB boot loader this installed system will not boot

Then I select execute a shell,

mount --bind /dev /target/dev
mount --bind /dev/pts /target/dev/pts
mount --bind /proc /target/proc
mount --bind /sys /target/sys
chroot /target /bin/bash
root@kali:/# apt-get install grub-pc
reading package list done
building package list done
building dependency tree
reading state information done
packege grub-pc is not available ,but is reffered to by anther package this may mean that the package is missing, has been obsoloted or is only available from another source
1
  • Can you provide some more details? What kind of installation are you doing? What is your setup? Were you following a guide?
    – bertieb
    Commented Apr 3, 2017 at 16:51

9 Answers 9

7

here is a simpler fix:

1- go back to the previous window where you chose 'network mirror'
2- change 'yes' to 'no'
3- the issue should be solved, and you should be able to carry on with the installation procedure.

2

This issue seems to occur when your computer isn't connected to the Internet when the installation is running. The installer will be unable to verify the existing apt-get sources, and will disable them.

In my case, the DNS server wasn't set (so pinging any domain won't work), so I first ran sudo nano /etc/resolv.conf, and added some DNS servers:

nameserver 8.8.8.8

nameserver 8.8.4.4

pinging a server now succeeds.

Then, to enable the apt-get sources, I ran sudo nano /etc/apt/sources.list, and added the Kali rolling repositories (from http ://docs.kali.org/general-use/kali-linux-sources-list-repositories):

deb http://http.kali.org/kali kali-rolling main contrib non-free

#For source package access, uncomment the following line

deb-src http://http.kali.org/kali kali-rolling main contrib non-free

Close nano, and exit the shell. Run apt-get update, and then apt-get install grub-pc. They both succeeded, and I exited the shell to finish installing GRUB via the GUI.

2

it help me fix this fail installation go to execute shell put this command an go back to grub install again for configure disks:

mount --bind /dev /target/dev

mount --bind /dev/pts /target/dev/pts

mount --bind /proc /target/proc

mount --bind /sys /target/sys

chroot /target /bin/bash

root@kali:/# apt-get install grub-pc

0
1

Had the same issue while installing Kali Linux version 2017.1.

In order to fix this your PC should be connected to the internet because the setup retrieves some files before installing GRUB, if your PC isn't connected to the internet the installation fails.

1

I had the same issue - neglecting to setup the mirror .... I went back through the setup / selected Network mirror and >Next >Installed packages and installed Brub without issue.

The other issue was with the failed to mount CD - selecting none ? changing to sdb1 resolved and did not need to use the other "workarounds" ...

Hope this helps :)

0

Kali installation, It's all about choice.

-1. format your disk using PE system, we need a clear disk, or something will going wrong

  1. use refus to make USB driver

  2. just to be safe, use MBR based mix mode

  3. use dd mode to defend Wi-Fi firmware missing (iso file belongs to Windows, and Windows is bad on drivers)

  4. if you can disable secure boot, you can use UEFI in installation, else just use BIOS

  5. if you failed, try more option in -1 and 3 step.

  6. links may help

https://null-byte.wonderhowto.com/forum/fix-failed-detect-and-mount-cd-rom-problem-when-installing-kali-linux-0177158/

https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed

https://wiki.deepin.org/index.php?title=Repair_Boot

https://www.linux.com/learn/how-rescue-non-booting-grub-2-Linux

0

In my case the problem was with the .iso file I was using. Changing that fixed everything.

1
  • 6
    Welcome to Super User. Can you be more specific about the .iso problem? As written, it isn't clear what you started with, what was wrong with it, and what you changed it to . So it isn't a very actionable solution.
    – fixer1234
    Commented Feb 19, 2018 at 22:36
0

For some reasons the Linux cannot properly detect the network connection and consequently grub cannot be installed at the end of installation.

Despite what some have said above, I got no success by changing the primary network interface to another wired ethernet adapter, wireless adapter and even switching between different hotspots for wireless such as personal hotspot on my phone...

In my case, I could bypass the problem by clicking on back and went to package manager and change network mirror from YES to NO. Then clicked next next and it finished the installation perfectly! After installation however, I had to boot up and re-enable the network mirror to be able to install apps from online repositories. Simply issue the following commands:

gedit /etc/apt/sources.list

and uncomment the deb http://http.kali.org/kali kali-rolling main contrib non-free

and then type

apt-get update

Hope this helps!

-1

Try disable UEFI Secure Boot.

The Secure Boot option must be set to "Disabled" or "Off" to allow you to boot from external media correctly.

4
  • Just disabling Secure Boot alone wouldn't be enough to boot the installation media in question.
    – Ramhound
    Commented Apr 3, 2017 at 17:41
  • @Gfew I didn't find the boot secure option in the boot meni. then what should I do ?
    – Antony
    Commented Apr 4, 2017 at 15:25
  • @Gfew I need to install grub manually via terminal, I tried but couldn't get to install what should I do ?
    – Antony
    Commented Apr 5, 2017 at 3:49
  • @Gfew I edit my question please review what shuld I do?
    – Antony
    Commented Apr 6, 2017 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .