Wednesday, September 28, 2016

KALI Linux 2016.2 on UEFI and Audio problem solved (Dual Boot with Windows 10)

Installing Kali Linux 2016.2 in a UEFI boot-mode laptop/PC (Dual Boot with Windows 10)
The blog is also useful for those who wish to perform Dual boot with Kali Linux and Windows 10 or Windows 8.1

Before going into the setup, let me give you some basics of boot loaders and boot mode.
So what is UEFI and Legacy Boot Mode ....?????
These are two different methods to boot-up the OS installed on the PC.

The Difference between UEFI and Legacy comes in the firmware, they both use for booting up the HDD installed in the PC.
Legacy Mode refers to BIOS firmware. Basic Input/Output System(BIOS) was the first popular firmware for desktop PC introduced in 1975 by IBM for its CP/M OS. Even though it is still widely present, computers have evolved tremendously and BIOS is unable to provide advanced features of modern hardware.
Unified Extensible Firmware Interface(UEFI) is the successor to BIOS. UEFI uses the GUID Partition Table (GPT) whereas BIOS uses the Master Boot Record(MBR) partitioning scheme. GPT and MBR are both formats specifying physical partitioning information on the hard disk.
The basic differences are like -
1. Max size of a single partition in Legacy is ~2TB, but in UEFI it's ~9 zetabytes
2. The number of primary partitions in Legacy is 4, and in UEFI is 128. (still you can go dynamic drives)
A bootloader basically is a program that contains the details of the files which have to loaded on the startup of the computer, so as to make the OS boot-up at the computer start.
3. Legacy mode supports the storage of only one bootloader program, but UEFI enabled the users to store more than one bootloader program.
That means, you can install and keep the Windows Boot Manager as well as the GRUB loader (of Linux) both at the same time in the HDD.
4. UEFI enabled the support for Secure Boot, which is a sort of mechanism to prevent boot-time viruses from loading.

BIOS is pretty much outdated and UEFI offers many useful features. Thus it is recommended to install any operating system in UEFI mode. Note: One can't install in UEFI mode by booting in legacy mode.
Microsoft also started the support of UEFI with all it's OS Windows 8 onwards.

So, let's get started. Before that make sure you have the tools required for this.

Tools required will be

1. Rufus USB Tool, by Akeo................... get it here
2. Kali Linux Live USB Dist. .................. get it here
3. EFI File for booting into UEFI Mode ...................
for the time being just get it from here.... make sure you download both these files..

Okay so let's start..


Now let's build up our bootable media.............. a USB
Preferably take a 4 GB or 8 GB USB

Now open up Rufus Tools

1. Select your USB Media

2. keep the Partion System and Target System Type, File System and Cluster Size in default settings



4. Select the ISO of Kali Linux

5. Now click on start

Now let it complete....

After it's done...........
Now open up the USB in Windows Explorer
And Create a folder with name EFI in capital
Inside EFI.... create a folder Boot
Copy the contents of the EFI folder, that you downloaded from my google drive..... into this folder..
That's all....

Now let's come to fact what these EFI files are. They are the EFI files, made for the boot-up process of the linux distro FEDORA. Since they both are linux distro's so they can be easily modded to suit other linux live distros as well. I took them from the live-disk of Fedora 23, and editted them to work with Kali Linux 2016.1/2016.2.

Now restart your PC...
Get into the boot menu, using F12 or F8 or F9.
Make sure that the bootable USB in the USB 2.0 slot and is in FAT32 file system. After that open up
Do keep the secure boot disabled.
Iff, you encounter any problem disabling the Secure Boot, comment below.....

After doing this successfully, Kali Linux Boot Menu should show up...



Select the graphical install in the menu and follow the installation wizard....
After it's completed...
Reboot
You'll see the Kali Boot Loader installed on your PC in UEFI boot mode

Iff, by any chance, you happen to encounter a problem, saying
Some of. your hardware requires the installation of non-free firmware
then, select NO and proceed. This problem comes up when an unsupported hardware is detected.
You need not worry about this, because you can definitely install these firmwares later on after the installation of the OS is done.
Yeah but, beware, due to this error, you may find that some device of the PC may not work. (like the WiFi driver in most of the laptops with 6th gen Intel Core i Processors, do not work on Kali Linux).
(the missing firmware may be different, on different PC)

Now, let's come to a very big problem, which supposedly appears due to the failure in loading up drivers in root mode.

This is the problem, which most of you would be facing, if you are working with root (admin) account on KALI LINUX 2016.2. The problem is that the Sound and Audio drivers (and may also be any other driver) won't load up, and you won't be able to hear any sound.
Solution to this is quite simple. You just need to go to the Settings, and make and account of any type, (preferably ADMINISTRATOR).


Make sure that the new account is ADMINISTRATOR, if you require it

Now Sign in using that account, and you should see all the audio drivers, (and any other driver which was not working previously), working as usual.

So that's all for this blog....

You encounter any problem......... ??????????
feel free to post it below in comments...
I assure your queries will be resolved asap...



author Chinmoy,

Allahabad, India
Check me on........

38 comments:

  1. I love you man, I've been working on this all day. Thanks a ton for the tutorial, helped me out heaps.

    ReplyDelete
    Replies
    1. your welcome... and I really appreciate that you commmented on my blog... :) :)

      Delete
  2. Thanks bro, i'll try it tomorrow...

    ReplyDelete
  3. Hello, I have followed the instructions of your tutorial, I have created the folder EFI, the folder Boot and inside this last I have copied the files of its folder of google drive and the bios of my pc does not recognize the pen usb when I enter the BIOS Choose start priority.
    Greetings.
    what i can do?

    ReplyDelete
    Replies
    1. open the BIOS setup menu on your system.
      now go to boot mode settings...
      there you need to select UEFI, Secure boot Disabled.

      This should help you out..
      reply to me if you need any more assistance..

      Delete
  4. Its good tutorial brother..
    Very Useful i tried on asus x200m
    Dual boot win7 with kali linux 2016.2 x64
    But why if use kali 2016.2 x86 boot on flasdisk not working
    Is it just for kali x64 ?
    Help me broher..

    ReplyDelete
    Replies
    1. yes, this method is JUST for x64 systems.
      The reason behind this is the fact that 32-bit (x86) systems can simply be booted on Legacy Boot mode. You don't need to have it setup on UEFI boot mode.

      Delete
  5. thank you for answering
    brother can you give me a solution how to use kali linux x86 or 32 bit cuz i think kali linux-2016.2-amd64 lag on my laptop(asus x200m)
    thats way i want to boot kali x86.
    please gimme a solution brother..
    thanks..

    ReplyDelete
    Replies
    1. your welcome dude,
      but I'm a bit busy lately,
      I'll surely help you out after two weeks, please be patient till then.

      Delete
    2. its me
      thanks brother..
      i'm still waiting for it

      Delete
    3. I'll post a solution for you after two weeks,
      Please be patient.

      Delete
    4. bro, so thanks for your patience.
      .
      so here's your solution.

      Delete
    5. Download Kali Linux (x86) from the official website), and create a bootable USB using RUFUS as mentioned above.
      Make sure to select the FILESYSTEM --- FAT32.

      Now, open your BIOS menu, and select LEGACY boot mode,
      This option now disables your UEFI Boot settings, ie. you won't see any SECURE BOOT option now.

      Delete
    6. try to boot your PC normally, and see if Windows loads up.
      It should load up in normal situations,
      If it loads up, then Shut Down your PC, plug in the Bootable USB you made, and restart,

      Delete
    7. now go to the Boot menu while booting you system, and select the USB,

      Delete
    8. select the USB and it should boot up your PC.
      Now install as mentioned above.

      Delete
    9. however, this time, after the completion of installation, you MAY not see the option to boot up your Windows directly,
      ....
      Don't Worry...
      ....
      Start your linux, and once the main thing loads up, open the terminal on Kali, and enter ---
      sudo update-grub
      ---
      this will add Windows to the OS Selection menu, and you'll be able to DUAL boot your system.

      Delete
    10. reply to me if you found this useful, or if you encountered some error in the process.

      Delete
  6. Hello,

    (i use asus laptop 2017)
    Thanks to your tutorial i've finally managed to install linux and dual boot. The problem is: after login password my screen freezes. Fix: https://askubuntu.com/questions/160036/how-do-i-disable-acpi-when-booting. Now another problem is: after booted into linux my fans are spinning 100%. I have a gtx960m. Also when i'm trying to update it only does "Reading pakcage lists... Done and then it stops. Also tried to fix that(I live in NL so it's like nl.babylon.network ?), but no luck. So that are my 2 problems, any help?

    ReplyDelete
    Replies
    1. I'll surely help you out,
      but after two weeks time, as I'm a bit busy for the time being ! I hope you understand !

      Delete
    2. Allright, thank you.
      I'll wait!

      Delete
    3. hey, First of all, pls tell me the name and model of your ASUS laptop, so that I can find it myself on the internet.

      Delete
    4. next thing, the UPDATE ISSUES,
      the scene is like----
      Kali Linux corporation made some repositories which were valid for the last year ie 2016.
      Kali Linux 2016.1 & 2016.2 were supported by those repos.
      Now since they have released 2017.1 edition, the repos of 2016 may have got outdated & abandoned. That's why you're getting those Issues while updating.

      Delete
    5. so the solution,
      1. open your terminal, and type in --- sudo gedit /etc/apt/sources.list
      2. go to the website -- http://git.kali.org/gitweb/
      3. add repo of whichever software you want.
      4. If this doesn't work, then go to https://launchpad.net/ubuntu
      5. search for the software you want, and then add the repository of that software manually,
      6. Remember that since Kali linux corp is itself not providing the updates, then how can you get them ??

      Delete
    6. I can't possibly help you out with the ACPI Problem, unless you post the pictures related to that !!

      Delete
    7. I would seriously suggest you to just backup your data from Kali Linux, and fresh install the latest version of Kali Linux 2017.1, it's better than 2016,
      the installation method is almost same.

      Delete
  7. Hello Chinmoy and thank you for the post.
    I was facing this problem, I just added the /UEFI/Boot/ folder and your files on my USB Live. Then reinstalled Kali and now i'm writing this post from my fresh UEFI dual boot Kali installation :)
    I also have the sound problem, I will try your solution when my system finished updating.
    Thanks for your work !
    Maarti

    ReplyDelete
    Replies
    1. you welcome, Maarti.
      and thank you for appreciating my work

      Delete
    2. Ok, creating a new account works for the account. But I've found a solution to fix the bug for the root account.

      Solution found here :
      curl -s https://raw.githubusercontent.com/nu11secur1ty/pulseaudio/master/pulseaudio.sh | bash

      [Advice : Never execute this kind of script blindly, read it before :) ]

      Works fine for me !

      Delete
    3. thanks for the suggestion,
      actually, that Pulse audio thing didn't work in my case.

      Delete
  8. your welcome, really appreciate this :)

    ReplyDelete
  9. I had previously installed kali.. without doing this stuff. I don't want to Reinstall. can you help me with a shortcut.

    ReplyDelete
    Replies
    1. if you've installed it previously, and if it is working fine, then you don't need to do anything !!
      as far as the audio problem is concerned, then you just need to create a user_account in your linux.

      Delete
  10. I installed kali without this. How can i reconfigure it to this.

    ReplyDelete
    Replies
    1. if you've installed it previously, and if it is working fine, then you don't need to do anything !!
      as far as the audio problem is concerned, then you just need to create a user_account in your linux.

      Delete
  11. hello bro
    does this tweak work for kali linux 2017.3 also? please reply

    ReplyDelete
    Replies
    1. I don't yet know if version 2017.3 is directly bootable into UEFI.
      however, I have seen that Kali Linux 2017.3 has the EFI folder in the ISO image, so I think it should be bootable into UEFI, without going through all this hard work.
      ......
      Well, I was thinking of posting an entirely new tutorial for Kali Linux v2017.3.
      I'll do that in the recent future.

      Delete