1

Some context:

Earlier today, I attempted to re-install Kali Linux on my machine (dual booted with Windows). To accomplish this, I downloaded the ISO and put it on my Easy2Boot USB stick. In order to get my laptop to boot from the Easy2Boot stick, I needed to go to my BIOS and:

  • Disable PTT
  • Enable Legacy Option ROM
  • Switch to Legacy mode

This due to the fact that Easy2Boot doesn't support UEFI, and so the stick won't appear unless I do this.

I had no problems during the installation, but rather afterwards. I was fine booting into the system, but if I reverted the changes I made in the BIOS and returned to UEFI mode, I got the GRUB rescue prompt instead of Kali. Additionally, whilst those BIOS options were still set, GRUB couldn't detect my Windows installation. Ultimately, I used Rufus to install Kali with "Partition Scheme: GPT" and "Target System: UEFI (non CSM)". Upon doing this, I entered the installation process. Notably, the installer seemed to be different. Not only was it a different in its appearance, but the initial menu had different options.

My question:

How is it that switching between Legacy mode and UEFI mode has caused these problems? My understanding was that the only involvement that the MBR / GPT had in terms of booting was to provide the initial code from which to boot from.

  • Since GRUB was able to load in UEFI mode, why did it end up in recovery mode instead of continuing to boot Kali simply because of this change?

  • Why was there a difference between the installers I saw when in Legacy vs UEFI mode?

  • When in Legacy mode, why was GRUB unable to detect Windows? I would have thought that since the BIOS had already done its job in loading up GRUB, then it would have no problems, considering I know that GRUB has no problems detecting Windows when installed in UEFI mode.

8
  • 1
    Always use UEFI mode for UEFI PCs. Legacy is still there for (very) old or "special" OSes only and for how long I don't know but if I were to guess, 5 years from now we won't have this discussion, it'll be UEFI or nothing. Everyhting you're asking is easily googleable, namely Grub in Legacy won't detect Windows in a different mode (UEFI) and vice-versa. Also it's well known that Windows strictly requires MBR for BIOS (Legacy) and GPT for UEFI. I'm just a low level Ubuntu user and I know that and more. A Kali user is expected to know 10x what I know so...
    – user931000
    Commented Oct 26, 2018 at 20:39
  • 1
    I strongly suggest that you research UEFI and Legacy boot modes to understand what they are and how they are different. Commented Oct 26, 2018 at 20:41
  • ... I think it's time for you to rethink your choice of Linux distro. Kali is very specific for pentesting. It's NOT a desktop Linux for everyday use and it's targeted to professionals that are already very advanced Linux users. The answer here sums it up: unix.stackexchange.com/questions/399626/…
    – user931000
    Commented Oct 26, 2018 at 20:42
  • @GabrielaGarcia Many thanks for the link, it's a very interesting read. I shall say, though, that it is the challenges that I have faced and imagine facing with Kali that have led me to choose it, as a way of learning through my struggles - it isn't my choice for a home-use distribution.
    – VortixDev
    Commented Oct 26, 2018 at 20:55
  • Tapping specifically onto the point in that post that "If you ask a beginner question about Kali, many people will ignore you.", I would like to say that I believe the question would apply for any distribution: I only mention Kali to provide context.
    – VortixDev
    Commented Oct 26, 2018 at 20:57

2 Answers 2

2

My understanding was that the only involvement that the MBR / GPT had in terms of booting was to provide the initial code from which to boot from.

And the initial menu is actually part of this code. It's not provided by the OS; it is shown by the bootloader (which also does the job of a 'boot manager').

The bootloader by its nature is specific to a single type of firmware. (Even GRUB2 has separate cores for BIOS and UEFI, and its modules have to be compiled differently for either type.)

So it is completely possible that the same installation disk will use completely different boot loaders for BIOS and UEFI systems (e.g. syslinux for BIOS but systemd-boot on UEFI; or GRUB2 for BIOS but rEFInd on UEFI). If they provide boot menus, they all do it in their own way, with their own appearance and themes.

(It could also be that the original ISO doesn't have bootloaders for both firmware types – in some situations, Rufus inserts its own bootloader configuration (syslinux) into the mix.)

Finally, even if it's the same GRUB2 with the same base configuration, it might not have the same graphical mode available in both cases. Menu options might be missing because of differences in the firmwares themselves: e.g. "Boot existing OS" is done completely differently between BIOS and UEFI; and "Memory test" (memtest86) is a separate program, which itself needs to come in BIOS and UEFI variants...

Since GRUB was able to load in UEFI mode, why did it end up in recovery mode instead of continuing to boot Kali simply because of this change?

Unable to answer that without seeing the exact failure reported by GRUB. It could be that your EFI partition had the GRUB core files, but was missing the modules or the grub.cfg.

Again, remember that BIOS GRUB and UEFI GRUB act as two separate pieces of software. Even though they share most of the source code, they are compiled into different formats, they are installed into different locations on the system, and started differently by the firmwares.

When in Legacy mode, why was GRUB unable to detect Windows? I would have thought that since the BIOS had already done its job in loading up GRUB, then it would have no problems, considering I know that GRUB has no problems detecting Windows when installed in UEFI mode.

It sounds like your Windows system is configured to boot in UEFI mode, which means it only has an UEFI-compatible bootloader installed.

However, when the system is in BIOS mode, it has no way of starting UEFI programs – because they depend on the UEFI kernel being present and providing certain services. (Just like MS-DOS has no way of starting Windows programs...)

After all, the whole point of 'Legacy mode' is that the OS will only see the firmware as if it were a traditional PC BIOS; any UEFI services will be invisible.

(Similarly, I'm not sure if it's possible for an UEFI application to "downgrade" the system to 16-bit mode in order to chainload into BIOS-compatible boot code.)

1
  • Thanks! I had a suspicion that different code was used for UEFI vs Legacy, but I didn't want to make the assumption in my post. The key takeaway from this for me is that GRUB uses UEFI to aid the boot process - I wasn't aware of this, and assumed that the code was independent of the source used to boot it and so would work whether it was a UEFI or Legacy boot. Additionally, for some more information on the GRUB issue, I believe it said "unknown filesystem", and any attempt to repair it using methods described online failed at "insmod normal", where it would repeat the message.
    – VortixDev
    Commented Oct 27, 2018 at 1:31
1

You wrote:

I downloaded the ISO and put it on my Easy2Boot USB stick. In order to get my laptop to boot from the Easy2Boot stick, I needed to go to my BIOS and:

Disable PTT Enable Legacy Option ROM Switch to Legacy mode This due to the fact that Easy2Boot doesn't support UEFI, and so the stick won't appear unless I do this.

Easy2Boot may not support UEFI, but Rufus does. If you use Rufus to make a bootable USB stick, you can set it to support UEFI and it will work.

Do note that you actually need to select the correct settings for this to work. You need to set the partition scheme to GPT, then select UEFI (Non CSM) as the target system. Note that the newest version of Rufus does most of these settings automatically because in the past it confused people as to why it didn't work.

This is what I use in order to make custom Windows 10 installers with support for UEFI.

Since the other answer explained why it didn't work, but did not really go into detail as how to solve the problem the correct way, I decided to post this answer, because although the other answer is technically correct, I think this will answer your actual question better: What is the best way to install Linux on my computer.

Please understand, this is not a post to promote Rufus. There are other tools that work too, I just happen to have experience with Rufus, so I can guarantee that it will work. If you find another program more favorable that also supports UEFI, feel free to use that.

That said, I do see from the website from Easy2Boot that they should support UEFI mode by doing some conversion and stuff. Rufus is still far easier in my opinion though, but Easy2Boot, software that you already have, should be possible too.

2
  • 1
    I suggest adding the exact option that needs to be selected in Rufus - GPT/UEFI - before burning the ISO. This is because I think the default is the other, "MBR for BIOS and UEFI" which is in itself misleading and I've found many users just burning without changing it and the result being a USB that works for BIOS/Legacy only. The "DD" method also works and makes a 1:1 copy of the ISO which already contains bootloaders for both situations, instead of having Rufus inject its own choice of bootloaders.
    – user931000
    Commented Oct 26, 2018 at 21:51
  • @GabrielaGarcia Good point. I'll make an edit for that. :)
    – LPChip
    Commented Oct 26, 2018 at 22:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .