Results 1 to 4 of 4

Thread: GRUB Boot Loader Not installing on Hard Drive

  1. #1

    GRUB Boot Loader Not installing on Hard Drive

    Dear Team,

    I have problem to create GRUB boot loader. I have followed instruction and guidance given in forum by _defalt on 26/7/2017. I still have error as below:

    root@kali:~# fdisk -l
    Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: C0BFEB53-C641-4AD0-A2D1-A4EAED3AA3AB

    Device Start End Sectors Size Type
    /dev/sda1 2048 1050623 1048576 512M EFI System
    /dev/sda2 1050624 968499199 967448576 461.3G Linux filesystem
    /dev/sda3 968499200 976771071 8271872 4G Linux swap


    Disk /dev/loop0: 2.6 GiB, 2821902336 bytes, 5511528 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes

    root@kali:~# sudo mount /dev/sda2 /mnt
    root@kali:~# mount --bind /dev /mnt/dev
    root@kali:~# mount --bind /proc /mnt/proc
    root@kali:~# mount --bind /sys /mnt/sys
    root@kali:~# mount /dev/sda1 /mnt/boot/efi
    root@kali:~# mount -o remount,rw /dev/sda1 /mnt/boot/efi
    root@kali:~# mkdir /mnt/hostrun
    root@kali:~# mount --bind /run /mnt/hostrun
    root@kali:~# chroot /mnt
    root@kali:/# mkdir /run/lvm
    root@kali:/# mount --bind /hostrun/lvm /run/lvm
    root@kali:/# grub-install /dev/sda
    Installing for x86_64-efi platform.
    EFI variables are not supported on this system.
    EFI variables are not supported on this system.
    grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

    Need your help
    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    656
    Your efivars kernel module is not loaded.

    Run this command to test it:
    #efivar-tester

    UEFI variables are not supported on this machine.

    #modprobe efivars

    Test again:
    #efivar-tester

    This will no longer report an error, and now you can install grub the same way you were doing before.

  3. #3
    Dear Team,

    I believe efivars not install in my system. The errors are as below:

    root@kali:/# efivar-tester
    root@kali:/# apt-get install efivars-tester
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package efivars-tester

    Can you help me to get efivars package, I saw in github but anyway to get easy from this forum.

    Regards

  4. #4
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    656
    I can't see any error when you enter efivar-tester. It means it is installed. If you are unsure about it enter:
    dpkg -l | grep efivar

    If it's not installed enter:
    apt update
    apt-cache search efivar

    This will give you the full name of the module

    apt install efivar-full name

Posting Permissions

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