How would you approach this?
I am planning to update my Ubuntu 18.04.4 LTS server's motherboard from a Legacy BIOS motherboard to a UEFI Ryzen motherboard. I've got years of configurations invested, so a clean re-install is out of the question even if it's the best answer. I'd like to have a plan ready for minimal downtime.
My setup uses mdadm RAID and LVM, boot drives are formatted GPT, but without EFI partition. I have 2 spare drives available if it's easier to setup and transfer my config to those.
Current boot drive config:
sda 8:0 0 2.7T 0 disk
|-sda1 8:1 0 1M 0 part
|-sda2 8:2 0 954M 0 part
| `-md0 9:0 0 953.4M 0 raid1 /boot
|-sda3 8:3 0 93.1G 0 part
| `-md1 9:1 0 93.1G 0 raid1
| `-vg1-root_lv 253:0 0 193.1G 0 lvm /
|-sda4 8:4 0 1.8T 0 part
| `-md4 9:4 0 1.8T 0 raid1
| |-vg1-root_lv 253:0 0 193.1G 0 lvm /
| |-vg1-home 253:1 0 700G 0 lvm /home
| `-vg1-newvar 253:2 0 400G 0 lvm
|`-sda5 8:5 0 837.8G 0 part
| `-md5 9:5 0 837.7G 0 raid1
| |-vg1-home 253:1 0 700G 0 lvm /home
| `-vg1-backup 253:3 0 300G 0 lvm /backup
sdb 8:16 0 2.7T 0 disk
|-sdb1 8:17 0 1M 0 part
|-sdb2 8:18 0 954M 0 part
| `-md0 9:0 0 953.4M 0 raid1 /boot
|-sdb3 8:19 0 93.1G 0 part
| `-md1 9:1 0 93.1G 0 raid1
| `-vg1-root_lv 253:0 0 193.1G 0 lvm /
|-sdb4 8:20 0 1.8T 0 part
| `-md4 9:4 0 1.8T 0 raid1
| |-vg1-root_lv 253:0 0 193.1G 0 lvm /
| |-vg1-home 253:1 0 700G 0 lvm /home
| `-vg1-newvar 253:2 0 400G 0 lvm
|`-sdb5 8:21 0 837.8G 0 part
| `-md5 9:5 0 837.7G 0 raid1
| |-vg1-home 253:1 0 700G 0 lvm /home
| `-vg1-backup 253:3 0 300G 0 lvm /backup
sdf 8:80 0 2.7T 0 disk
|-sdf1 8:81 0 1M 0 part
|-sdf2 8:82 0 954M 0 part
| `-md0 9:0 0 953.4M 0 raid1 /boot
|-sdf3 8:83 0 93.1G 0 part
| `-md1 9:1 0 93.1G 0 raid1
| `-vg1-root_lv 253:0 0 193.1G 0 lvm /
|-sdf4 8:84 0 1.8T 0 part
| `-md4 9:4 0 1.8T 0 raid1
| |-vg1-root_lv 253:0 0 193.1G 0 lvm /
| |-vg1-home 253:1 0 700G 0 lvm /home
| `-vg1-newvar 253:2 0 400G 0 lvm
|`-sdf5 8:85 0 837.8G 0 part
| `-md5 9:5 0 837.7G 0 raid1
| |-vg1-home 253:1 0 700G 0 lvm /home
| `-vg1-backup 253:3 0 300G 0 lvm /backup
Option 1:
Somehow (HOW?) create a EFI System Partition on my mirrored boot drives. Install the board, boot from USB stick and attempt Boot-Repair (https://help.ubuntu.com/community/Boot-Repair). Is that all or am I forgetting something? The sticking point is figuring out how to shrink existing lvm/mdadm partitions.
Option 2:
On NEW drives, install Ubuntu 18.04LTS the normal way, thereby circumventing the whole issue of making an EFI partition. Then boot to a Live USB stick and rsync my original /, /home, and /backup partitions over. I imagine I'll have to rerun grub-install since my kernel images will all be different, right? Anything else to worry about? This sounds easier, quicker, and safer, since I can just reinstall my old board and boot from my original drives if I screw anything up.
Thoughts, concerns, suggestions?
Set UEFI to CSM/Legacy Mode
The simplest solution may be to set the UEFI in the new motherboard to emulate CSM/Legacy mode.
Some UEFI implimentations allow booting from either Legacy or UEFI boot devices by default. If this is the case, then your new system should boot from the old drives.
If not, you may have to change the default UEFI settings from UEFI boot mode to CSM/Legacy mode to boot from the old drives.
Hope this helps
Option 3: It appears even new modern motherboards still support Legacy mode and you don't HAVE to implement UEFI. The manual for the ASRock X570 Pro4 includes:
So that may well be the best answer for me.
Special thanks to user68186 who posted the best answer as a comment. If you want to repost as an answer, I'll definitely give you credit.