2

I'm trying to install Ubuntu 21.04 in a dual-boot set-up with the Windows 10 Pro that came on an old Asus Q551LN. First I "reset" Windows through its wizard so that all docs and apps are reset to factory defaults. The HD then has 4 partitions: Small NTFS one (probably Windows repair/recovery disk something?), then a large partition that is C: in Windows, then another small one, then a large one that was D: but I want to use for Ubuntu in stead.

  1. I made a bootable flash-drive with Ubuntu 21.04, then used this guide to boot from a USB flash drive and set "Launch CSM" to "Enabled" as per this step (important for later).

  2. Started installed using this tutorial. At step 4.) a.) did sudo parted -l and it said "msdos", so concluded that I don't have a GPT hard disk table. Since the BIOS-screens from the first step mentioned EFI and the Ubuntu installer gave warnings when I don't make a EFI System Partition I made these partitions:

    • an EFI System Partition of 250 MB

    • a 12 GiB Swap partition

    • a partition with the rest of the available space for /

    When install was almost done, got this error:

    Executing 'grub-install/dev/sda' failed. This is a fatal error.

  3. Found this video to fix that, so added repo ppa:yannubuntu/boot-repair, installed boot-repair and ran it, but it gives this error:

    LegacyWindows detected. The boot of you PC is in EFI mode. You may want to retry after changing it to BIOS-compatibility/CSM/Legacy mode. Are you sure you want to continue anyway?

    According to the BIOS setting I set in the first step, CSM is enabled?

Searching for the boot-repair LegacyWindows detected error I found this thread but I'm unsure of what to do, I'm hesitant to tell boot-repair "yes continue anyway" but also don't understand how I tell the Ubuntu installer to go with legacy BIOS and not UEFI if that's easier.

But maybe UEFI is better because then I won't have to "temporarily install a Windows boot loader, fix Windows, and then reinstall grub" as per oldfred in the last link?

I just wanna dual-boot Windows 10 and Ubuntu 21.04, what do?

Update after mentioned in the comments, these were my Rufus settings when making the flash drive, MBR (so not GPT) and I can only pick BIOS or UEFI as Target system. Also the "Use Rufus MBR with BIOS ID" option is greyed out:

Rufus options screenshot

asontu
  • 121
  • How it boots is how it installs and the same for using Boot Repair. If your Windows is in Legacy mode you also have to install Ubuntu in Legacy mode and boot the live session for Boot Repair in Legacy mode. In UEFI systems, even early ones, enabling CSM does NOT disables UEFI mode, it merely allows Legacy mode but then it depends on how it boots. If you made you Ubuntu USB with Rufus you may have selected UEFI/GPT so your USB only boot in UEFI mode. – ChanganAuto May 09 '21 at 14:35
  • @ChanganAuto I did use Rufus, should I try it with a BIOS-enabled flash drive then? Is that a different Ubuntu ISO I download or a setting in Rufus when flashing it? – asontu May 09 '21 at 14:41
  • You must use a BIOS/legacy enabled flash drive as commented above (or reinstall Windows in UEFI mode) and it's the same ISO, different settings in Rufus (BIOS/MBR). – ChanganAuto May 09 '21 at 15:21
  • @ChanganAuto I already did, it was always a BIOS/MBR flash drive (see update in question). When I'm in the Ubuntu Install screen where I make the partitions, how do I tell the installer to install with legacy MBR and not UEFI? – asontu May 09 '21 at 16:29
  • You don't tell the installer. Again, how it boots is how it installs. If yours is set as you say then it only boots in Legacy mode. With Windows Fast Startup disabled in Windows (a must when dual-booting a generically recommended even with Windows alone), booting as it as to in Legacy mode then it must work and install Grub in the MBR. However, the error that you mentioned when running Boot Repair suggests otherwise. I suggest changing the UEFI settings to enable CSM/Legacy only, confirm Windows is booting correctly and then try again with Boot Repair. – ChanganAuto May 09 '21 at 16:34
  • Windows doesn't boot since grub broke my MBR? So I can't do anything with my Windows install now either – asontu May 09 '21 at 16:36
  • Please keep in mind that regardless of the mode, Grub can only boot working Windows. But in Legacy/BIOS once Grub is installed it replaces the Windows bootloader so, from then on, Grub is the only one you can use to boot Ubuntu and Windows. If you need to repair Windows you'll need Windows installation media. – ChanganAuto May 09 '21 at 16:37

1 Answers1

0

The problem turned out to be related to the Asus BIOS firmware. I needed to change options that were already the correct ones to the "wrong" values (non-CSM) and then back to the correct (CSM) ones in order for the laptop to understand I would like to boot the USB Flash drive in non-UEFI mode so that Ubuntu will also install Grub in that mode.

After that it was the same as this answer in that I could ignore the "this won't work without an EFI System Partition" warning.

asontu
  • 121