Results 1 to 9 of 9

Thread: [Fix]"grub-pc failed to install into /target/"[Fix]

  1. #1
    Join Date
    2014-Mar
    Posts
    1

    [Fix]"grub-pc failed to install into /target/"[Fix]

    Hi,

    Im new here, however, i come up with a solution.

    I'm pulling my hair on this problem and that's why I want to write a solution that I hope will be useful.

    The original problem :

    When i install(legacy no uefi) Kali Linux on my asus ux31a, the install process continued normally but at the grub installation this error appeared : grub-pc failed to install into /target/thin

    When i reboot, i have no OS, nothing ...

    Solution:

    I boot on my live of kali, then i chroot on the disk system :

    Code:
    sudo mount /dev/sdaX /mnt          
    sudo mount --bind /dev /mnt/dev    
    sudo mount --bind /dev/pts /mnt/dev/pts   
    sudo mount --bind /sys /mnt/sys    
    sudo mount -t proc /proc /mnt/proc 
    sudo chroot /mnt /bin/bash      
    mount -a
    I add the squeeze repository

    Code:
    vim /etc/apt/source.list
    add this :
    ## Security updates
    deb http://security.kali.org/kali-security kali/updates main contrib non-free
    deb ftp://ftp.fr.debian.org/debian/ squeeze main contrib  non-free
    deb http://security.debian.org/ squeeze/updates main contrib non-free
    # avant squeeze : deb http://volatile.debian.org/debian-volatile lenny/volatile main
    deb ftp://ftp.fr.debian.org/debian/ squeeze-updates main contrib  non-free
    #optionnel :
    deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
    
    save
    And i install grub

    Code:
    apt-get install grub-pc
    I choose the /dev/sda disk for the install and i update the grub running config file with :

    Code:
    update-grub
    in the hope that it may help you

  2. #2
    Join Date
    2014-Aug
    Posts
    1
    I had done a full install of Kali to my ASUS Q550L, which completely wiped Windows 8. When installing Kali from my USB, GRUB failed, and I continued with the installation anyway, then booted from Live USB. I tried to do:

    apt-get install grub-pc

    And this also fails. Why is this?

  3. #3
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Did you chroot your hard drive before trying to install grub?

    Essentially, as far as grub us concerned you just tried to install it on the live usb.

    You need to mount the file system of your install on /mnt and then chroot the directory so you can interact with it.

    After that, try running the reinstall.

  4. #4
    Adding Debian repos to your Kali OS is a sure way to break your installation.

  5. #5
    Join Date
    2015-Feb
    Posts
    2
    Tried this fix but another problem appeared when installing grub. It says package grub-pc is not available.
    What shall I do ?
    I add screenshot of whole process.

    Forgive me if this is unwise question, I'm not very experienced user.

  6. #6
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Did you run apt-get update?
    chown -R us ./base

  7. #7
    Join Date
    2015-Feb
    Posts
    2
    Unfortunately it ain't no solved the problem.
    Console :
    root@kali:~# apt-get update
    Get:1 http://security.kali.org kali/updates Release.gpg [836 B]
    Get:2 http://http.kali.org kali Release.gpg [836 B]
    Get:3 http://security.kali.org kali/updates Release [11.0 kB]
    Get:4 http://http.kali.org kali Release [21.1 kB]
    Get:5 http://security.kali.org kali/updates/main Sources [144 kB]
    Get:6 http://http.kali.org kali/main Sources [7568 kB]
    Ign http://security.kali.org kali/updates/contrib Translation-en
    Ign http://http.kali.org kali/contrib Translation-en
    Ign http://security.kali.org kali/updates/main Translation-en
    Ign http://http.kali.org kali/main Translation-en
    Ign http://security.kali.org kali/updates/non-free Translation-en
    Ign http://http.kali.org kali/non-free Translation-en
    Hit http://security.kali.org kali/updates/contrib Sources
    Hit http://http.kali.org kali/contrib Sources
    Hit http://security.kali.org kali/updates/non-free Sources
    Get:7 http://http.kali.org kali/non-free Sources [118 kB]
    Get:8 http://security.kali.org kali/updates/main amd64 Packages [283 kB]
    Get:9 http://http.kali.org kali/main amd64 Packages [8470 kB]
    Hit http://security.kali.org kali/updates/contrib amd64 Packages
    Hit http://http.kali.org kali/contrib amd64 Packages
    Hit http://security.kali.org kali/updates/non-free amd64 Packages
    Get:10 http://http.kali.org kali/non-free amd64 Packages [138 kB]
    Fetched 16.8 MB in 49s (338 kB/s)
    Reading package lists... Done
    root@kali:~# chroot
    chroot: missing operand
    Try `chroot --help' for more information.
    root@kali:~# sudo mount /dev/sda5 /mnt
    root@kali:~# sudo mount --bind /dev /mnt/dev
    root@kali:~# sudo mount --bind /dev/pts /mnt/dev/pts
    root@kali:~# sudo mount --bind /sys /mnt/sys
    root@kali:~# sudo mount -t proc /proc /mnt/proc
    root@kali:~# sudo chroot /mnt /bin/bash
    root@kali:/# mount -a
    root@kali:/# leafpad /etc/apt/source.list
    root@kali:/# apt-get install grub-pc
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package grub-pc is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'grub-pc' has no installation candidate
    root@kali:/# apt-get update
    Err http://security.kali.org kali/updates Release.gpg
    Could not resolve 'security.kali.org'
    Reading package lists... Done
    W: Failed to fetch http://security.kali.org/kali-securi...es/Release.gpg Could not resolve 'security.kali.org'

    W: Some index files failed to download. They have been ignored, or old ones used instead.
    root@kali:/# apt-get install grub-pc
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package grub-pc is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'grub-pc' has no installation candidate

  8. #8
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Could not resolve? Are you on the internet?

    If not, establish an internet connect that can resolve the repo before you try and install grub
    chown -R us ./base

  9. #9
    Join Date
    2016-Feb
    Posts
    1
    I have been having this issue for sometime now.

    I have tried various method to resolve it and didn't work until i installed it with internet connection.

    I booted the my laptop computer using kali live on a usb stick

    Connected the system to a wireless internet connection by tethering my phone.

    Started the installation of kali by clicking on Install Kali from Applications -> Usual Applications -> System Tools -> Install kali

    Follow the installation guide until you get to network configuration. Make sure you configure and connect any of your network adapters

    In my case I configured my wireless adapter because I didn't configure and share internet on my LAN connections

    On getting to grub installation, it failed several times because of internet failure but i continued repeating the grub installation until it finished downloading all the grub packages

    So, on concluding my installation, everything was perfect. My windows 7 installation was detected and booted Fine.

Similar Threads

  1. Replies: 0
    Last Post: 2020-11-13, 01:57
  2. Can't Boot: "Failed to isolate default target, freezing"
    By Coto16 in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2016-03-22, 20:42
  3. "GRUB installation failed" HELP
    By youkergav in forum Installing Archive
    Replies: 13
    Last Post: 2016-02-13, 10:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •