LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Windows not loading after grub install (https://www.linuxquestions.org/questions/linux-newbie-8/windows-not-loading-after-grub-install-4175603246/)

Safeway44 04-05-2017 08:34 AM

Windows not loading after grub install
 
From the Grub menu Windows 8 does not load after I select it I get an error
File:\Boot\BCD
Status: 0xc000000e

When I change the BIOS to UEFI from legacy Windows works
but then Kali is not accessible.I had to install Kali under Legacy because under UEFI the CD didn't do its thing, other than the computer brand's logo on the screen glaring.

During install Grub was placed in MBR. As this is a UEFI system is MBR even required? I don't have a spare USB lying around so if the solution can be utilizing the CD that work be ideal.CD is tested and working.

Kali iso is a recent download and it's meant to be UEFI friendly. Kali is loading fine. Thanks

hazel 04-05-2017 11:08 AM

As far as I know, modern versions of Windows will not boot from a GPT disk with a bios. You have to use uefi. And, as you probably know, it is dangerous to keep switching modes because sooner or later you are going to use the wrong one. However, it is possible to convert a bios install to uefi. Basically you have to reinstall grub in uefi mode so that it goes onto your efi system partition. You can do that, using your installation disc.
Here's something I found on a Ubuntu site:
Code:

sudo mount /dev/sda1 /mnt # Mount the root filesystem in /mnt
sudo mkdir /mnt/boot/efi # Create a directory to mount the ESP in
sudo mount /dev/sda3 /mnt/boot/efi # Mount the ESP
sudo grub-install --root-directory=/mnt /dev/sda # Run the grub install

Basically you boot from the CD, mount your normal root partition, mount the efi system partition on the root partition's /boot/efi directory and then install grub there.

trumpforprez 04-05-2017 04:13 PM

Quote:

Originally Posted by Safeway44 (Post 5692916)
Kali iso is a recent download and it's meant to be UEFI friendly. Kali is loading fine. Thanks

What is Kali? Can you tell us more about what it is?

Once a new OS is installed, it is sometimes necessary to run
Code:

update-grub
from the terminal.
So boot your linux distro, run 'update grub' and see if this makes a difference.

Making changes on BIOS to UEFI is not related to your problem.
All linux distros should now be 'UEFI-friendly'.

yancek 04-05-2017 05:07 PM

Quote:

What is Kali?
It's an operating system designed specifically and only for penetration testing/computer forensics and is basically meant for experts. Obviously, it can be used by people wishing to learn/study computer forensics and is absolutely not recommended as a standard Desktop distribution as explained at their site below.

http://docs.kali.org/introduction/sh...use-kali-linux

Mixing MBR and UEFI as mentioned above is the problem and the simplest solution to the problem the OP has would be to install Kali on a flash drive and select that drive on boot when he wants to try to learn penetration testing.

Quote:

As this is a UEFI system is MBR even required? I
If you are using UEFI, you should not have any boot code in the MBR and mixing the two is going to lead to boot problems. If you can boot either by making a change in the BIOS, that's the best you can do if you can't get Kali to install uefi. I'd suggest taking a close look at the Kali documentation on installing UEFI.

BW-userx 04-05-2017 05:27 PM

sounds like you did a different boot method for each one, I'd suggest installing Linux by the same means windows boots. kiss is involved here, get their greatest hits album on apple cares today. :D but that gpt thing well then....

Rickkkk 04-05-2017 05:52 PM

Quote:

Originally Posted by BW-userx (Post 5693120)
sounds like you did a different boot method for each one ...

Agreed.

Quote:

, I'd suggest installing Linux by the same means windows boots ...
Also agreed. Several previous posts suggest solutions. ...

Quote:

... kiss is involved here, get their greatest hits album on apple cares today. :D ...
... smirk ... that's worth a Deuce ... :D

Cheers ...

Safeway44 04-06-2017 08:50 PM

Quote:

Originally Posted by hazel (Post 5692966)
Basically you have to reinstall grub in uefi mode so that it goes onto your efi system partition. You can do that, using your installation disc.


Quote:

Originally Posted by hazel (Post 5692966)
Basically you boot from the CD,

Should I be in legacy or UEFI when I do this? The CD won't do anything when its in UEFI with the iso in it.

Quote:

Originally Posted by hazel (Post 5692966)
mount your normal root partition,

Am I in terminal when I do this? What screen should I be seeing on my screen to execute this? Do I use Gparted?

Safeway44 04-06-2017 08:52 PM

Quote:

Originally Posted by yancek (Post 5693113)
If you are using UEFI, you should not have any boot code in the MBR and mixing the two is going to lead to boot problems.

I recall placing Grub in MBR when prompted during install, I should have said no. How do I remove it from MBR?

Safeway44 04-06-2017 08:54 PM

Quote:

Originally Posted by BW-userx (Post 5693120)
kiss is involved here, get their greatest hits album on apple cares today.

No thanks, I just want to Gpart all night and everyday:)

Rickkkk 04-06-2017 11:17 PM

Quote:

Originally Posted by Safeway44 (Post 5693626)
No thanks, I just want to Gpart all night and everyday:)

... I think we're hitting Rock Bottom ... :D

... OK I'll stop.

hazel 04-07-2017 03:02 AM

Quote:

Originally Posted by Safeway44 (Post 5693620)
Should I be in legacy or UEFI when I do this? The CD won't do anything when its in UEFI with the iso in it.

At this stage, you'll have to boot the CD in bios mode. The point is to change that for the future.
Quote:

Am I in terminal when I do this?
Yes. These are console commands.
Quote:

What screen should I be seeing on my screen to execute this?
I have no idea. I've never used Kali. And if you know so little about Linux as to ask these questions, you should not be using Kali either. It's really not a good distro for learning.
Quote:

Do I use Gparted?
Definitely not! gparted is a partitioning tool. There's probably nothing wrong with your partitioning scheme. You just need to install grub where the uefi expects to find bootloader code, i.e. in the efi system partition.

Safeway44 04-15-2017 08:22 AM

I started with root@(none)
Quote:

Originally Posted by hazel (Post 5692966)
sudo mount /dev/sda1 /mnt # Mount the root filesystem in /mnt

Quote:

Originally Posted by hazel (Post 5692966)
sudo mkdir /mnt/boot/efi # Create a directory to mount the ESP in

I typed it in and got: "already exists"

Quote:

Originally Posted by hazel (Post 5692966)
sudo mount /dev/sda3 /mnt/boot/efi # Mount the ESP

I typed it in and got:
"sudo: unable to resolve host(none): connection refused" Which connection is that?

Quote:

Originally Posted by hazel (Post 5692966)
sudo grub-install --root-directory=/mnt /dev/sda # Run the grub install

Do I need to be online (connected) to install? Can it be done through Grub prompt too?

Quote:

Originally Posted by hazel (Post 5692966)
Basically you boot from the CD, mount your normal root partition, mount the efi system partition on the root partition's /boot/efi directory and then install grub there.


hazel 04-15-2017 08:54 AM

Are you logging in remotely? That "connection refused" thing usually occurs when people use ssh.

Make sure you are using the right device name for the partition. It probably isn't sda3 on your system. That extract I gave you was just an example. Running fdisk -l will give you a list of the partitions on your own hard drive together with their types. The one that is down as an efi system partition is the one you need to mount.

You can check if the efi system partition actually has mounted by subsequently using the mount command without any arguments.

Safeway44 04-16-2017 02:58 AM

Quote:

Originally Posted by hazel (Post 5697265)
Are you logging in remotely? That "connection refused" thing usually occurs when people use ssh.

No I am not logging in remotely. Accessing a computer that's sitting on my desk in front of me.


Quote:

Originally Posted by hazel (Post 5697265)
The one that is down as an efi system partition is the one you need to mount.

I ran fdisk and was able to see a list of partitions and one labelled EFI.

However when I tried fdisk l on a virtualbox version of Kali I didn't, instead I got: Welcome to fdisk (util-linux 2.29.1)
Changes will remain in memory only, until you decide to write them to disk. Be careful before using the write command.

fdisk: cannot open 1: no such file or directory


Quote:

Originally Posted by hazel (Post 5697265)
You can check if the efi system partition actually has mounted by subsequently using the mount command without any arguments.

Is this what you mean by no arguments?:
sudo mount

hazel 04-16-2017 03:47 AM

Quote:

Originally Posted by Safeway44 (Post 5697544)
No I am not logging in remotely. Accessing a computer that's sitting on my desk in front of me.


I ran fdisk and was able to see a list of partitions and one labelled EFI.

However when I tried fdisk l on a virtualbox version of Kali I didn't, instead I got: Welcome to fdisk (util-linux 2.29.1)
Changes will remain in memory only, until you decide to write them to disk. Be careful before using the write command.

fdisk: cannot open 1: no such file or directory

That should be "-l" for "list", not a 1
Quote:

Is this what you mean by no arguments?:
sudo mount
Exactly, except that you don't need sudo when you use mount this way. Listing mounted partitions is a job anyone is allowed to do. The term "arguments" always refers to strings that follow a command. They provide extra information for the program.

You know, someone who is so much a beginner as you are shouldn't be using Kali at all.


All times are GMT -5. The time now is 11:25 AM.