Beginner's Guide to install Kali Linux in UEFI system (Lenovo Z510)
Here I am going to describe the steps to install Kali linux with dual boot in UEFI system. Your windows 8.1 installation will not be harmed.
Now the computers are starting to have UEFI instead of BIOS. So, if you want to multiboot with your Kali linux then you will face a formidabe problem since the linux distros have not yet fully supported it.
I am not first one to write on this topic and many experts have already written on this.
Then why am I writing this?
I am writing this because during my research I was not able to get all the stuffs under one hood.I had to work out different steps from different places and then finally I was able to install it. So I planed to arrange all in a sequential manner so to help other newbies.
Recently I bought a new lenovo Z510 with Windows 8.1. It has some wonderful features!After spending a week I decided to dual boot it with Kali Linux (I am not a linux pro, just a amature).
My first surprise came when I created bootable pen-drive and found that there is no option to boot from it. It was then I discovered that my old friend, BIOS, is counting its last days. Now the new systems have UEFI system instead of BIOS. Well my system has the option to revert back to BIOS under the name, Legacy System, but this means that I will not be able to boot into my windows 8.1. It also has a Secure Boot option enabled which prevented me booting from my pen-drive. So, what to do?
I did some research and at last now I am writing this from my newly installed Kali Linux.
I have done this on Lenovo Z510.
I have mentioned some reference sources wherever possible.
Your bingo celebration will be short lived!!!
You will find that you are not able to use your WiFi!!
Oh, come on, what is this?? Solve this!
Well, go ahead to solve your problem
ref: http://www.chokepoint.net/2014/04/installing-broadcom-bcm43142-drivers-on.html
Open the terminal and punch in the following commands
Go to Applications → System Tools → Preferences → System Settings
Open Network, turn off airplane mode and turn on WiFi.
Now the computers are starting to have UEFI instead of BIOS. So, if you want to multiboot with your Kali linux then you will face a formidabe problem since the linux distros have not yet fully supported it.
--You are free to skip this if you like--
I am not first one to write on this topic and many experts have already written on this.
Then why am I writing this?
I am writing this because during my research I was not able to get all the stuffs under one hood.I had to work out different steps from different places and then finally I was able to install it. So I planed to arrange all in a sequential manner so to help other newbies.
My first surprise came when I created bootable pen-drive and found that there is no option to boot from it. It was then I discovered that my old friend, BIOS, is counting its last days. Now the new systems have UEFI system instead of BIOS. Well my system has the option to revert back to BIOS under the name, Legacy System, but this means that I will not be able to boot into my windows 8.1. It also has a Secure Boot option enabled which prevented me booting from my pen-drive. So, what to do?
-------------------------------------------------
I did some research and at last now I am writing this from my newly installed Kali Linux.
I have done this on Lenovo Z510.
I have mentioned some reference sources wherever possible.
Some Direct Links
Requirements:
- A pen-drive of at least 4 GB capacity.
- At least 30 GB free hard drive space. If you don't have it then consider shrinking a drive with windows drive manager to get the free space.
- A wired internet connection with at least 4 GB usage(including the kali linux ISO file) . The installer downloads some files, most importantly the UEFI version of grub loader, or so have I learnt.
- Windows vista or later. If you have XP then find a way to create a UEFI bootable pendive since rufus doesn't support it.
Steps to Install:
ref: http://www.isoc.my/profiles/blogs/continuing-my-adventures-with-uefi-windows-8-1-kali-linux-dual
ref: https://forums.kali.org/showthread.php?271-How-to-EFI-install-Kali-Linux
ref: https://forums.kali.org/showthread.php?271-How-to-EFI-install-Kali-Linux
Step 1: Get the main thing
Download the appropriate kali linux iso file from http://www.kali.org/downloads/ (not the mini version) directly or through torrent.
Step 2: Create a UEFI bootable pen-drive
- Download Rufus from http://rufus.akeo.ie/
- Insert your pen-drive
- open Rufus
- Select your device. Select 'GPT partition scheme for UEFI computer'. Select the kali linux iso file.
- Then click start and wait till the process completes!
- After this completes open your pendrive in Explorer
- Create a folder named EFI. Inside it crate another folder named BOOT. Open it.
- Download BOOTX64.efi, grubx64.efi, Mokmanager.efi (and nothing else) from http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Fedora/x86_64/os/EFI/BOOT/
- Copy the files to BOOT folder created earlier.
- Open Notepad. Copy and paste the following content in it:
# 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 - Boot Non Persistent Mode" {
set root=(hd0,1)
linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali
initrdefi /live/initrd.img
}
menuentry "Kali - Boot 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
}
- Go to save as. Browse to the boot folder.
Enter grub.cfg in 'File Name'.Change 'Save as type' to 'All Files'.
Then Save it.
Now you have a UEFI bootable pendrive with Kali linux!
Step 3: Booting from pen-drive
- Turn off your computer.
- If you have Secure Boot enabled in your system it may create problem so try disabling it from BIOS Setup. If you don't know first check it out.It is system specific.
- Insert your pen-drive. Enter the 'boot menu' and select your pen-drive to boot from.
This step depends on your system.
In Lenovo Z510, you have a small button beside power jack,called Novo Button, press it when the system is off. - If it warns you that you are booting with secure boot off, then press enter key.
If you have completed all the above steps successfully then you should see the grub boot-loader options.
Select the graphical install option.
Step 4: Installation process.
I think it will be better if you see the video to guide you through this process. You should run this video on a mobile (with a screen large enough to read the text in the video) or another computer while installing this.
Step 5: Celebration process
If you complete all the steps in the video then, BINGO, you have successfully dual booted your system with Kali linux.For Lenovo Z510 users and all those who have broadcom BCM 43142 wireless network card
To check your wireless card open terminal and type - lspci | grep 802.11Your bingo celebration will be short lived!!!
You will find that you are not able to use your WiFi!!
Oh, come on, what is this?? Solve this!
Well, go ahead to solve your problem
ref: http://www.chokepoint.net/2014/04/installing-broadcom-bcm43142-drivers-on.html
Open the terminal and punch in the following commands
- wget https://gist.githubusercontent.com/chokepoint/11305606/raw/52109f648c2ad5ec6a65bf8eee78fbda15fa1cfb/bcm43142_drivers.sh
- chmod +x bcm43142_drivers.sh
- ./bcm43142_drivers.sh
If all the above commands gets executed without and error then you have successfully enabled your WiFi.
Go to Applications → System Tools → Preferences → System Settings
Open Network, turn off airplane mode and turn on WiFi.
Now check your WiFi.
If its working then shout loudly BINGO!!!
Feel free to share your experiences and problems in comments!!
If its working then shout loudly BINGO!!!
To set the Windows as the first entry in grub choice menu so that it gets selected at startup automatically instead of linux:
- Open Computer → File System → boot → grub (i.e. goto /boot/grub)
- Open grub.cfg
- Study it a bit.
It is arranged in blocks. - Find the block containing the windows entry. Copy it.
- Go to the line before block with the kali linux entry. Paste it before the block.
- Delete the other windows entry below it.
You are done!!
Feel free to share your experiences and problems in comments!!
Which version of Kali did you use? Did you use 32bit or 64bit?
ReplyDeleteThanks
I used an 64 bit version.
DeleteWhat has your experience with airdump-ng and z510?
ReplyDeleteI just find that it keeps freezing.
Bad, I experienced problem with airdump-ng, but a slightly different one. As mentioned, I am having BCM-43142. I was not able to enter into monitor mode. Every time I did so, as per the instructions given at:http://www.broadcom.com/docs/linux_sta/README_6.30.223.248.txt , it would freeze.
DeleteThe solution to this problem is to use an external wifi card...
DeleteI used TPlinks TL-WN7200ND and it worked great.
Thanks for all your help!
Yes, this is a solution to it.
DeleteHere is a official report on drivers.
http://www.aircrack-ng.org/doku.php?id=compatibility_drivers
You can choose a external card based on its driver.
Here is another blog on it:
http://www.blackmoreops.com/2014/01/08/recommended-usb-wireless-cards-kali-linux/
Thanks for replying !!
Download BOOTX64.efi, grubx64.efi, Mokmanager.efi (and nothing else) from
ReplyDeletehttp://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/os/EFI/BOOT/
above link not working
Sorry for the broken link,
DeleteI have updated link, thanks to Krishna!
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Fedora/x86_64/os/EFI/BOOT/
ReplyDeletehere u go
Thanks man!
DeleteHey,
ReplyDeleteReally good tutorial. But when i create the bootable pendrive, i cant access it to copy the EFI/BOOT folder because it says you need to format the drive before you can use it. Im using Lenovo z500. Please help.
It asks me to check if the correct file system is mounted.....