My brother gave me an old Windows 7 (legacy) in DualBoot with Ubuntu 16.10. Live-Ubuntu recognized that I already had a partition with Ubuntu on the HDD and suggested me to erase it with Ubuntu 20.04, which I accepted. The installation ended with an error about the boot module (grub2 I guess).
I tried to use the "Recommended repair" mode of boot-repair in Live-Usb mode, without success.
I mounted the drives (with the commands sudo mount /dev/sda2 /media/sda2, etc.) in Live-Usb mode, and tried to use the "Recommended repair" mode of boot-repair. Even if I got further and tried to reinstall the grub2 in \dev\sda6, it ended with an error.
I generated this file => . From this log I remark that there is a problem with my BootLoader on sdb1, and with the recognition of the several drives I have.
Here is a snapshot of my drives from Gparted:
\dev\sda2 is the C drive of Windows,
\dev\sda3 contains data without importance,
\dev\sda5 contains 2 folders (BOOT and ubuntu), in which are the bootloaders. The folder "BOOT" contains BOOTX64.EFI, fbx64.efi and mmx64.efi. The folder "ubuntu" contains BOOTX64.CSV, grub.cfg, grubx64.efi, mmx64.efi and shimx64.efi,
\dev\sda6 contains the \home\user from Ubuntu,
\dev\sdb1 contains data without importance.
I am surprised to read on the log file that there is a problem with \dev\sdb1, as it contains only data.
Is there a way to fix this? As some programs are only available on windows, I would like to avoid to erase windows 7.
As written here => , the Advanced options are "Not recommended for inexperienced users". I looked for a clear answer on the internet. Unfortunately I am not skilled enough and do not understand everything. Therefore I described the problem as much as possible, and I take my chances here.
61 Answer
This might happen if you install Ubuntu 20.04 in UEFI mode, while Windows 7 was installed in legacy BIOS mode. Ensure to boot the USB installer using legacy BIOS mode, and reinstall.
I had encountered a similar error when I installed Ubuntu in legacy BIOS mode on a UEFI enabled computer, which already had Windows installed.
In case you want to install Windows 10, I suggest you first install it in UEFI mode and then install Ubuntu.