Long story short: I am dual booting Windows 10 and Kali Linux however I don't want top use the grub boot loader.
Is there a way to change to Windows 10 boot loader and choose between Kali and Windows from there?
1 Answer
Written for Ubuntu but will apply for all distros
Assuming drive partitioned as (modify for your case accordingly)
/dev/sda1 - 100 MB - Win Reserved
/dev/sda2 - 252 GB - Win (c: drive)
/dev/sda3 - 31000 MB - Ubuntu {mount point - /}
/dev/sda5 - 1000 MB - swap {logical}
/dev/sda6 - optionally created - FAT32 file system - {mount point - /media/share}
The critical step {during installation} is : We need to tell the Ubuntu installer where to install the system bootloader (GRUB 2). We DO NOT want to install the bootloader on /dev/sda, as that would overwrite our disk’s master boot record, nor do we want to install it on /dev/sda1 or /dev/sda2, as that would overwrite the Windows bootmanager files and boot configuration data, or the operating system itself. Instead, let’s have Ubuntu install its bootloader on the partition that will contain the Ubuntu operating system – in our case /dev/sda3. To do this, click on the drop down list under
“Device for boot loader installation”
and select /dev/sda3 .
Select “Install Now” and Ubuntu will begin the installation. When it completes you’ll be asked whether you’d like to reboot or “continue testing”. You should select continue testing as the following steps require access to a terminal.
Configure Windows for Dual Boot
Now that we have our disk partitioned and Ubuntu installed, let’s set up our system to boot Windows or Ubuntu. This will involve copying the boot record of our Ubuntu partition to Windows, and using BCDEdit to create a new entry in the BCD store that will point to that file. This way Windows will display a menu at boot time that will give you a choice between Windows and Ubuntu.
First, let’s make a mount point for the FAT32 partition we created. Open a terminal and enter the following:
sudo su
mkdir /mnt/share Next, let’s mount the correct device to this directory. Recall from the partitioning steps above that the FAT32 partition is located at device /dev/sda6:
mount /dev/sda6 /mnt/share Write the first 512 bytes of our Ubuntu partition to a file and copy that file to our FAT32 partition:
dd if=/dev/sda3 of=/mnt/share/ubuntu.bin bs=512 count=1Note: using the FAT32 partition in the aforementioned steps is optional. You may chose to use another device such as a USB drive to copy the *.bin file to.
Exit out of the Ubuntu live system and reboot to Windows. Along the way, you may see Windows perform a disk check (don’t worry, that’s normal, and should only occur once as a result of these procedures). Log into Windows and open the FAT32 volume you created and you should see the ubuntu.bin file. Copy that file to the root of the Windows volume (e.g., C:).
Now we’ll use BCDEdit to add an entry to Windows’s BCD store. Administrative privileges are required to use BCDEdit, so use Win+r, type cmd, and then press
CTRL+SHIFT+ENTER
. Let’s start by creating an entry for our Linux distribution. Note here that you are free to choose another entry name if desired:
bcdedit /create /d “Ubuntu” /application bootsectorBCDEdit will return an alphanumeric identifier for this entry that I will refer to as {ID} in the remaining steps. You’ll need to replace {ID} by the actual returned identifier. An example of {ID} is {d7294d4e-9837-11de-99ac-f3f3a79e3e93}. Next, let’s specify which partition hosts a copy of the linux.bin file:
bcdedit /set {ID} device partition=c:The path to our ubuntu.bin file:
bcdedit /set {ID} path \ubuntu.binAn entry to the displayed menu at boot time:
bcdedit /displayorder {ID} /addlastand finally, let’s specify how long the menu choices will be displayed:
bcdedit /timeout 30That’s it! Now reboot and you will be presented with menu where you can choose to boot to Windows or Ubuntu. When you choose Ubuntu, you’ll be taken to the it bootloader menu where you can choose to continue booting Ubuntu.
On a final note, if at any time you want to eliminate the Ubuntu menu option simply delete the BCD store entry you created using the following command:
bcdedit /delete {ID} 2