I have a multiple hard drive setup with Ubuntu-18.04 as a primary OS (for some accident installed in legacy/BIOS mode, first Linux experience). Recently I added an extra SSD and installed win10 on it. Somehow I managed to get things to work, but the problem is that win10 boot in UEFI while ubuntu in legacy/BIOS mode. As I am new to ubuntu, I figured out the legacy type of install only after I tried to boot-repair in UEFI and broke my working grub (luckily I managed to restore it). I don't want to break things again, so I have a few questions:
- Is it safe/ok to dual boot legacy ubuntu and UEFI windows by simply switching the boot order directly in "bios" firmware? (I am ok with doing that, but maybe I should avoid this practice?)
- How can I convert my ubuntu 18.04 to UEFI mode without breaking anything to enable normal dual boot setup?
Regarding the second question, yes I read https://help.ubuntu.com/community/UEFI, but it didn't help much since it does not provide a ready-to-use solution. With my level of understanding of how boot works I came up with the following idea to fix my setup:
- I have several disks
/dev/nvme0n1
for windows, /dev/nvme1n1
for linux and some/dev/sda
,/dev/sdb
for storage. Linux partitions are/dev/nvme1n1p1=/boot
,/dev/nvme1n1p2=/
,/dev/nvme1n1p3=swap
,/dev/nvme1n1p4=/home
. (/boot
is large enough) - Boot in currently installed legacy ubuntu 18.04, use GParted to unmount
/boot
, erase it, make new fat32 (vfat) partition on the same place and remount it to/boot/efi
(also add a corresponding record in/etc/fstab
). - Reboot and boot to boot-repair disk (https://sourceforge.net/projects/boot-repair-cd/) in UEFI mode and click recommended fix.
- Reboot to uefi ubuntu, run
$>sudo update-grub
? Done?
But I decided not to go for it as I am afraid that something will go wrong and I will end up with an entirely failed system. (It was really scary to enter grub-rescue> or grub> and when it failed to load after specifying correct boot and root folders...) Or maybe there is a simpler and more clear way (e.g. do the boot repair in current running ubuntu, then just reboot).
Thanks in advance.
/boot/efi
is the EFI System Partition (ESP). You should have an ESP since you have Windows installed in EFI-mode. Do not delete your/boot
-partition, this would make Ubuntu unable to boot. Instead, find out the correct partition, create the folder/boot/efi
, mount the ESP there and install the bootloader as described in the link. – mook765 Dec 01 '20 at 14:12