2

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?

  • The simplest solution may be to set the UEFI in the new motherboard to emulate Legacy mode. Then you won't need an ESP and your system should boot from the old drives. – user68186 Apr 21 at 15:53
  • Since you do not like the best answer and must not have backups, so when drive fails you will lose everything. You may be able to get by with a 100MB smaller /boot partition and add the ESP there. Note with gpt, you have GUID in primary partition table, backup partition table & in every partition that must be kept in sync. Option 2 is a re-install, and would let you boot with both drives connected. Any mirror image prevents reboot as duplicate UUIDs & GUIDs are not allowed. – oldfred Apr 21 at 16:15
  • I guess I just assumed that Legacy mode wasn't available anymore on brand new modern motherboards. You've absolutely right, if I can just turn UEFI off then that's the simplest answer! – idean Apr 21 at 18:39
  • I have converted my comment to an answer. I hope it works for your setup. – user68186 Apr 21 at 19:08
1

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

| improve this answer | |
0

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:

CSM
Enable to launch the Compatibility Support Module. Please do not disable unless
you’re running a WHCK test.
...
Launch Storage OpROM Policy
Select UEFI only to run those that support UEFI option ROM only. Select Legacy
only to run those that support legacy option ROM only. Select Do not launch to not
execute both legacy and UEFI option ROM.

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.