Page 1 of 6 123 ... LastLast
Results 1 to 10 of 52

Thread: How to EFI install Kali Linux (Beginner Ways)

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    9

    How to EFI install Kali Linux (Beginner Ways)

    Hello, I am new to Kali Linux, and I just bought a laptop (Asus N56VJ-DH71) which runs UEFI system (my my, it costs me 2 days because of this).

    Anyway, it was hard to install Kali Linux with the EFI system because you encounter some weird errors and you have to fix them manually.

    I am going to write a complete guide here (I don't really know much, but I've followed most of the guides on Google and spent 2 days for it. So I might be able to get you out of desperating installing Kali in EFI system).

    Installing with Normal ISO Kali file:

    Requirements:
    • Internet (Wifi or Cable)
    • USB (4 GBs)
    • Rufus or Win32 Disk Imager (to make bootable USB)
    • EFI system (obviously, if you don't have EFI system, you can just install it normally)
    • 2 hours of your time


    1. Download Kali Linux ISO with this link: http://www.kali.org/downloads/

    2. Download Rufus or Win32 Disk Imager and make bootable USB with the Kali Linux ISO you just downloaded in step 1. See Picture.

    3. Create a folder /EFI/Boot in your USB (You now have some data of Kali Linux in your USB already). See Picture.

    4. Download bootx64.efi, MokManager.efi (don't know if this is needed, but I just do it anyway), and grubx64.efi from here: ftp://mirrors.kernel.org/fedora/rele...4/os/EFI/BOOT/
    then put them into /EFI/Boot folder you created in step 3.

    5. Create a file named grub.cfg in /EFI/Boot in your USB with the following contents:
    Note: You can download the file here too: grub.txt. But make sure you put it into /EFI/Boot folder in your USB along with the 3 files in step 4 and change the name to grub.cfg. See Picture.

    Code:
    # Config file for GRUB2 - The GNU GRand Unified Bootloader
    # /boot/grub/grub.cfg
    
    # DEVICE NAME CONVERSIONS
    #
    # Linux Grub
    # -------------------------
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,2)
    # /dev/sda3 (hd0,3)
    #
    # root=UUID=dc08e5b0-e704-4573-b3f2-cfe41b73e62b persistent
    
    set menu_color_normal=yellow/blue
    set menu_color_highlight=blue/yellow
    
    function load_video {
    insmod efi_gop
    insmod efi_uga
    insmod video_bochs
    insmod video_cirrus
    insmod all_video
    }
    
    load_video
    set gfxpayload=keep
    
    # Timeout for menu
    set timeout=5
    
    # Set default boot entry as Entry 0
    set default=0
    set color_normal=yellow/blue
    
    menuentry "Kali - Live Non-persistent" {
    set root=(hd0,1)
    linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali
    initrdefi /live/initrd.img
    }
    
    menuentry "Kali - Live Persistent" {
    set root=(hd0,1)
    linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali persistence
    initrdefi /live/initrd.img
    }
    
    menuentry "Kali Failsafe" {
    set root=(hd0,1)
    linuxefi /live/vmlinuz boot=live config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal
    initrdefi /live/initrd.img
    }
    
    menuentry "Kali Forensics - No Drive or Swap Mount" {
    set root=(hd0,1)
    linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali noswap noautomount
    initrdefi /live/initrd.img
    }
    
    menuentry "Kali Graphical Install" {
    set root=(hd0,1)
    linuxefi /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788
    initrdefi /install/gtk/initrd.gz
    }
    
    menuentry "Kali Text Install" {
    set root=(hd0,1)
    linuxefi /install/vmlinuz video=vesa:ywrap,mtrr vga=788
    initrdefi /install/initrd.gz
    }
    You now have the bootable USB that EFI system can recognize it.

    6. Disable Secure Boot in BIOS but enable UEFI or EFI Mode (DO NOT USE Legacy/CMS mode).
    See picture

    If you're using Windows 8, follow this guide: http://forums.toshiba.com/t5/Windows...-8/ta-p/329292 (I know, Windows 8 is god damn weird)
    If you're just using normal Windows 7 or something like that, just press F2 while booting to get to BIOS.

    7. You can now see in the Boot section of your BIOS has the Boot Option for your USB. Boot it (anyway you can, if you don't know. Google them a little bit for your computer model, because each BIOS is different, I guess?)
    See picture

    Make sure Legacy Mode is turned off, or CMS is turned off.

    8. Install your Kali Linux as you see fit, BUT manually set up the Partition like this:
    See picture 1
    See picture 2
    See picture 3

    Code:
    Name: Kali Linux (your choice)
    Use as: Ext4 journaling file system
    Mount point: /
    Mount options: Default
    Label: none (you can label it if you want)
    Reserved blocks: 5%
    Typical usage: Standard
    Bootable flag: off
    Then you just need to press "Done setting up the partition" and "Finish partitioning and write changes to disk."
    (Maybe you could set a swap parition and others if you would like. Otherwise, you can just stick with this. I have no idea if it affects anything, but I'm new to Linux.)

    8. Follow the installation till you done. If no error occurs, you will be able to see a new Boot Option in your BIOS after you installed Kali Linux.

    Happy with your adventure if no error occurs. However, if error of grub-efi failed to install, take a look at below post.

    I will write a how-to on installing with Mini Kali Linux in EFI system later. I don't have the files with me right now, gotta change some stuffs on it too. But I can assure you that I'll do it tonight.

    If you have any question, or my instructions didn't clear anything. Please ask, I'll try to fix the Instructions and answer some of the questions if I can. But remember, I'm new to Linux.

    Thank you for reading the post.

    The followings are special thanks for the sources that I've read:
    https://forums.kali.org/showthread.p...all-Kali-Linux (posted by bofh28)
    ftp://mirrors.kernel.org/fedora/rele...4/os/EFI/BOOT/ (well, just thanks )
    http://forum.linuxbsdos.com/topic/11...for-kali-linux (who posted this? But thanks )
    http://bootableusb.net/install-windo...e-using-rufus/ (posted by bootable)
    https://forums.kali.org/showthread.p...de-Windows-8-1 (posted by vee9595)
    http://forums.toshiba.com/t5/Windows...-8/ta-p/329292 (posted by dmanh)
    Attached Images Attached Images
    Last edited by Rnihton; 2014-06-11 at 01:16 AM. Reason: Missed some information...

  2. #2
    Junior Member
    Join Date
    Jun 2014
    Posts
    9
    ERROR!!!!!!!!!!!!!
    See picture 1
    See picture 2

    Here comes the worst part, sigh...
    I've encountered an error that said:
    Code:
    The 'grub-efi' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.
    Don't worry about it, everything has a fix. and I've found it.
    Just continue with the installation WITHOUT boot loader until you're done, however, you won't be able to boot Kali because BIOS doesn't recognize GRUB yet (it's not installed...)
    See picture

    Here's how to fix it:

    1. Boot your USB again.

    2. Go in Kali Live mode.

    3. Connect to internet using Wifi or Local Cable.

    4. Type this command in (preparation for installing boot-repair):
    Code:
    apt-get install python-software-properties -y
    5. Then create a file "lsb-release" in /etc by typing (preparation for installing boot-repair):
    Code:
    leafpad /etc/lsb-release
    put in the following contents:
    Code:
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=12.04
    DISTRIB_CODENAME=precise
    DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
    See picture
    then save it and type this command in Terminal to add repository of boot-repair:
    Code:
    add-apt-repository ppa:yannubuntu/boot-repair
    then update it:
    apt-get update
    6. Install boot-repair using this command:
    Code:
    apt-get install boot-repair -y
    7. After done installing boot-repair, open it either using Applications menu -> System Tools -> Administration or type this command:
    Code:
    boot-repair &
    See picture

    8. Choose Advanced Options in boot-repair after it's launched.

    9. Leave everything the same, except the Secure Boot in GRUB option (uncheck it).
    See picture

    10. Click Apply.

    11. It'll repair the GRUB (or install it), if it asks anything, just press OK, Yes, Yes.

    12. It'll run a while, then a window will pop up, and it asks you to type some commands in Terminal. Just do as it said. (don't press "Forward" yet!)
    See picture

    13. The Terminal will sometime ask you for some more information, just press "Y" everytime (That's what I did, and I have no idea what it asked for LOL)

    14. After everything in the Terminal is done, just press Forward, and let boot-repair run for awhile untill it says "Repaired GRUB successfully" or something like that.
    See picture 1
    See picture 2

    15. Reboot your computer, go to your BIOS now. You'll see the Boot Option of "debian: ..." something... Move it to the top priority.
    See picture

    16. The Grub now has been fixed. You can customize it if you want. (Please Google it <3). But you'll be able to load your Kali Linux now.
    See picture

  3. #3
    Junior Member
    Join Date
    Jun 2014
    Posts
    2
    Thank you so much for the tutorial.

    I did all the steps, created the USB, created the folder, downloaded the files, disabled secure boot, left UEFI boot unchanged.
    I successfully booted from USB, BUT all I get is the GRUB 2 screen, no options for kali or anything else, I tried the "boot" command but I got an error stating "you need to load the kernel first" can anyone please help?

  4. #4
    Junior Member
    Join Date
    Jun 2014
    Posts
    9
    Quote Originally Posted by Xenonz View Post
    Thank you so much for the tutorial.

    I did all the steps, created the USB, created the folder, downloaded the files, disabled secure boot, left UEFI boot unchanged.
    I successfully booted from USB, BUT all I get is the GRUB 2 screen, no options for kali or anything else, I tried the "boot" command but I got an error stating "you need to load the kernel first" can anyone please help?
    Am I right in assuming that you haven't installed Kali yet? If so, then did you create the file "grub.cfg" and with its contents stated in Step 5?

    However, I've uploaded the file named "grub.txt", you have to change the name to "grub.cfg" in order for it to work.

    Hope this helps.

  5. #5
    Junior Member
    Join Date
    Jun 2014
    Posts
    2
    Yes you're right.

    Sorry for the idiotic problem I posted here, I formatted the USB and made it bootable again, downloaded the files again, and while making the grub configuration file it hit me, previously I made a .txt file named grub.cfg, so that would be grub.cfg.txt which is a text file, not configuration.

    I was able to live boot with no problems, tested my network cards all good, played around with it a little, but I didn't install, it wasn't my intention in the first place, since all the problems I might face + I don't really need it installed, I'm just seeing what I can do with the distro and its tools.

    So thank you again for the tutorial, and thanks for the help

  6. #6
    Junior Member
    Join Date
    Jun 2014
    Posts
    9
    Quote Originally Posted by Xenonz View Post
    Yes you're right.

    Sorry for the idiotic problem I posted here, I formatted the USB and made it bootable again, downloaded the files again, and while making the grub configuration file it hit me, previously I made a .txt file named grub.cfg, so that would be grub.cfg.txt which is a text file, not configuration.

    I was able to live boot with no problems, tested my network cards all good, played around with it a little, but I didn't install, it wasn't my intention in the first place, since all the problems I might face + I don't really need it installed, I'm just seeing what I can do with the distro and its tools.

    So thank you again for the tutorial, and thanks for the help
    You're welcome, Xenonz.

    Good to hear that you've got it working

  7. #7
    Junior Member
    Join Date
    Jun 2014
    Posts
    1
    I have completed all the steps, was able to create a bootable USB drive and to install Kali. I then used the boot repair because GRUB was not showing when booting for some reasons.

    Everything seems to be working fine now but when I boot, I don't see Kali in the Grub menu. I have the two following options in the menu:

    Windows UEFI bkpbootmgfw.efi
    Windows Boot UEFI loader

    and a bunch of entries for HP BIOS update and HP SystemDiags, but nothing about Kali.

    The only step that I modified in your procedure is the grub.cfg file (I couldn't get yours to work so I used the following one from another post).


    # Config file for GRUB2 - The GNU GRand Unified Bootloader


    # /boot/grub/grub.cfg

    # DEVICE NAME CONVERSIONS
    #
    # Linux Grub
    # -------------------------
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,2)
    # /dev/sda3 (hd0,3)
    #
    # root=UUID=dc08e5b0-e704-4573-b3f2-cfe41b73e62b persistent

    # Set default boot entry as Entry 0
    set default="0"

    set menu_color_normal=yellow/blue
    set menu_color_highlight=blue/yellow

    function load_video {
    insmod efi_gop
    insmod efi_uga
    insmod video_bochs
    insmod video_cirrus
    insmod all_video
    }

    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2

    # Timeout for menu
    set timeout=5

    set color_normal=yellow/blue

    search --no-floppy --set=root -l 'Kali x86_64'

    menuentry "Kali - Boot Non Persistent Mode" {
    linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali
    initrdefi /live/initrd.img
    }

    menuentry "Kali - Boot Persistent" {
    linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali persistence
    initrdefi /live/initrd.img
    }

    menuentry "Kali Graphical Install" {
    linuxefi /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788
    initrdefi /install/gtk/initrd.gz
    }

    menuentry "Kali Text Install" {
    linuxefi /install/vmlinuz video=vesa:ywrap,mtrr vga=788
    initrdefi /install/initrd.gz
    }

    What could be the cause of the problem?

    Thank you!

  8. #8
    Junior Member
    Join Date
    Jul 2014
    Posts
    1
    hey, i got an error when i tried to install kali linux with USB, i used rufus too, after finished the format and extracting session, the i reboot my computer
    it saids "unknown keyword in configuration file : @", i had already searching, like edit the syslinux.cfg, but it's didn't work, so what can i do to install Kali Linux on my computer please help me.
    Sorry for my bad english

  9. #9
    Since the release of 1.0.8, Kali now has EFI support out of the box!
    For more information: http://www.kali.org/news/kali-1-0-8-...-boot-support/
    This is a Kali-Linux support forum - not general IT/infosec help.

    Useful Commands: OS, Networking, Hardware, Wi-Fi
    Troubleshooting: Kali-Linux Installation, Repository, Wi-Fi Cards (Official Docs)
    Hardware: Recommended 802.11 Wireless Cards

    Search: https://www.kali.org/search/
    Documentation: http://docs.kali.org/ (Offline PDF version)
    Bugs Reporting & Tool Requests: https://bugs.kali.org/
    Kali Tool List, Versions & Man Pages: http://tools.kali.org/

  10. #10
    A few seconds after step 10 i get the message "Please enable a repository containing the [grub2] packages in the software sources of Kali GNU/Linux 2.0 (sda5). Then try again.", what does this mean (very new to linux sorry).

Tags for this Thread

Posting Permissions

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