V
V
vlarkanov2019-02-26 12:08:35
Debian
vlarkanov, 2019-02-26 12:08:35

Ubuntu Server 16.04: how to convert installed OS to uefi without data loss?

Hello! Before me there is a task: to transfer the installed OS from one disk to mdadm RAID1 consisting of 2 disks. I succeeded.
The data was migrated to a degraded RAID1 (from one disk), the bootloader was corrected, and after a successful boot, the first disk was also added to RAID1. Now I have a RAID1 of SATA SSD + NVME SSD.
But the problem is that my motherboard can only boot from NVME in UEFI mode - I need to somehow force the already installed OS to boot in UEFI. Now I'm trying to start on a test environment.
Given: two disks, both in RAID1, at the beginning of each disk an EFI partition is created (so far empty). We will assume that vda is SATA, and vdb is NVME.
Device Boot Start End Sectors Size Id Type
/dev/vda1 2048 206847 204800 100M ef EFI (FAT-12/16/32)
/dev/vda2 206848 8595455 8388608 4G fd Linux raid autodetect
Device Boot Start End Sectors Size Id Type
/dev/vdb1 2048 206847 204800 ef EFI ( FAT-12/16/32)
/dev/vdb2 206848 8595455 8388608 4G fd Linux raid autodetect
How to "teach" the system to boot from UEFI?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vlarkanov, 2019-02-26
@vlarkanov

As a result, I did this:
1) loaded the Ubuntu Server installer into UEFI. Installed Ubuntu on a second drive in a degraded RAID1 of one drive instead of two;
2) loaded the existing system through Legacy; mounted the degraded raid into a daddy, deleted everything there, synced the existing OS there (while maintaining rights);
3) corrected fstab, got into a mounted folder, updated GRUB;
4) booted via UEFI, saw that the transferred system was working, added the first disk to the array (having previously created the same partitions);
5) copied the contents of /boot/efi to the efi partition of the first disk. Now the system boots from both drives in UEFI mode;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question