2

I have Acer V3-772G 1 TB Harddisk. I shrinked my biggest partition in order to install Kali Linux. When installing Kali, GRUB couldn't detect windows 8 so I kept going on(I installed grub as my masterboot). After installed Kali there was no way to boot Windows 8.1, but booting Kali was OK with GRUB in legacy-BIOS. When I tried to change bios to UEFI it couldn't find any OS (took too much time, nearly 1 hour). So I tried to update GRUB with boot-repair within a Ubuntu Live USB. But after updating GRUB I terrified, in UEFI and Legacy mode grub couldn't find ANY OS (Both Kali and Windows) so I have no option other than using Ubuntu Live. I tried every possible options but nothing has worked for me. I tried rEFInd in UEFI mode it worked only for Kali. I still cannot boot my windows 8.1 . I considered to restore to factory setting with a Windows Rescue USB but kept telling me "No driver found". Please help me to dual boot or remove Kali and restore my Windows 8.1

3

This is a common problem with Windows 8.0 and 8.1 machines.

With Windows 8.0, Microsoft no longer relies on an efi file to boot windows, they use a more advanced format for speed up the boot process and keep more persistence between reboot cycles. Sadly, GRUB cannot yet detect this boot format.

The proper way to dual boot Windows 8.1 is to first disable quickboot and secureboot in BIOS, then boot into Windows. This will force the the windows bootloader to generate an efi file for other bootloaders like GRUB.

You of course, have a bigger problem because you now have a GRUB bootloader and thus cannot force Windows 8 to generate the efi file. To do this, ensure quickboot and secureboot are disabled. When you are at GRUB, press c to drop to the GRUB command line. Boot to Windows using the following command:

chainload (hd0,0)+1

You may need to use the tab-autocomplete option to find the correct partitions.

IF THIS FAILS, SEE BELOW.

Now that Windows has an efi file, reboot into Kali Linux. From a root terminal run:

sudo update-grub 

You should see a GRUB debug output line roughly equivalent to:

/dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi

The file "bootmgfw.efi" is what you need to force the Windows bootloader to generate. You should now have a dual boot between Kali and Windows 8.

IF CHAINLOAD FAILS:

Before beginning, you need to have a Kali (or any type of Debian live cd) and the Windows recovery disk/USB. You do not need to re-install the entire system. When the Windows recovery environment starts, choose the option to open a command prompt. Run the following commands:

diskpart
select disk 0

This mounts the harddrive with Windows and GRUB.

Next run:

list volume

This should list the partitions on the disk, including the peripheral mount (your recovery cd or USB). Make a note of the drive letter. The run the following to quit diskpart:

exit

Now that you have the drive letter of the recovery partition that includes the bootloader files, enter the boot directory (you need the quotes):

cd "<your drive letter>\boot"

Now run:

dir

This lists the files in the boot directory. You should see a file named

bootsect.exe

If you don't, you're in the wrong place. Consider looking up a more in depth recovery tutorial.

Next:

bootsect /nt60 SYS /mbr

Now reboot, GRUB will not appear but Windows should start. What you've done is set the Windows bootloader as the system entry point, you have not actually deleted any partitions for either operating system including the one containing GRUB. Again, at this point, ensure quickboot and secureboot are disabled. Reboot into Windows generating the boot efi file. Now that Windows it bootable from GRUB, we need to restore it. Using your Kali/Debian live disk, boot into the Linux operating system and open a root shell. Ensure boot-repair (only available from a live disk) is installed:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
sudo boot-repair
sudo update-grub

This will replace the Windows bootloader as the system entry point with GRUB, again in the process nothing is actually deleted.

If this isn't available as on option (it is on my Ubuntu and Kali live disks), look at your distro version's GRUB restore options.

On the update-grub command, you should see debug output resembling this:

/dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi

Now reboot, you should see Kali and Windows options in GRUB now.

SIDENOTE:

I would not recommend a strictly Windows/Kali dualboot for a few reasons.

First, Kali uses legacy GRUB, not GRUB 2 (now 2.02). This can make dualbooting very painful and laggy on high resolution, modern displays. If you have a discrete graphics card, this can cause other problems getting booting to work properly.

Second, Kali uses a custom Kernel version (noted Kali1) for which many modern Ethernet cards do not have drivers (available as bcmwl-kernel-source for standard kernels). You either have to modify drivers, or add Debian repos for standard kernels and swap this.

Third, why Kali? It's a pen-testing distro that, comparatively (and respectfully), sucks at most everything else. If you truly are doing pen-testing, you should have separate boot, root, and home partitions, where root and home are encrypted and require passwords prior to booting that you provide to initramfs. I don't do a lot of pen-testing, but when I do I sure as hell don't write my plugins and scripts in Kali. For this reason, I always keep another Linux distro installed.

What I'm getting at here, is Kali is for experienced Debian users, who ought to know the current problems with dual-booting Windows 8. Consider installing a friendlier distro alongside Windows first, I like Ubuntu (or one of it's flavors if you're a Unity hater). Ubuntu has better documentation, and ships with GRUB 2.02 and more grub tools. This along side the community will make an initial dual-boot setup easier. Once you have a stable dual-boot setup, adding a third Linux distro is incredibly easy (although harder if you encrypt Kali root dir).

My current boot system is GRUB 2.02 with Windows 8.1, Ubuntu 14.04, and Kali (with Kali1 and generic kernels/initramfs).

Hope this helps someone along the way.

0

First you have to install GRUB Customizer on your linux pc. For that you have to do the following:

 add-apt-repository ppa:danielrichter2007/grub-customizer
 apt-get update
 apt-get install grub-customizer 

If it doesn't work, then do the following

You need to install python-software-properties to be able to use the python-software-properties command.

 apt-get install python-software-properties

I suggest downloading the grub-customizer from source and build it from there.

step one: Install these packages:

#apt-get install cmake
#apt-get install g++ OR gcc-c++
#apt-get install libgtkmm-2.4-dev OR gtkmm24-devel (>= 2.18)
#apt-get install gettext
#apt-get install libssl-dev OR openssl-devel

(The package names may be different, depending on the distribution they are using on)

step two: download the sources:

download the tar.gz-package here: https://launchpad.net/grub-customizer/+download …and extract its contents.

step three: compile the sources:

Go into the source directory extracted from the tar.gz file, then run

$ cmake . && make

If you get a cmake version error, try to set the "cmake_minimum_required" value to your installed version - I only written down the lowest tested version, so older versions may be compatible too.

step four: install some (optional) runtime dependencies:

  • hwinfo

step five: install Grub Customizer

$ sudo make install

Then you can start Grub Customizer using the menu or by running gksu grub-customizer / sudo grub-customizer

0

Try to type on terminal in kali linux LiveCD.

~# sudo update-grub

Then you should see that Win 8 is listed in terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.