Score:0

Converting dual boot windows/ubuntu legacy to uefi

hk flag

I dual boot windows 10/ubuntu on my laptop and am looking to upgrade to windows 11. Problem is that when I initially installed windows/ubuntu, it was using legacy grub. I need to now enable secure boot uefi in order to upgrade to windows 11 but can't find guides on how to properly convert legacy grub to uefi in a dual boot situation. I've tried using boot-repair on an ubuntu liveCD but am running into 'locked nvram' issues.

Any help would be appreciated thanks

oldfred avatar
cn flag
Basically have have to totally reinstall. Windows only boots in BIOS/Legacy mode with MBR partitioning and only in UEFI mode with gpt partitioning. Conversion from MBR to gpt will totally erase entire drive. there is a Windows tool, but everyone that posted found it really did not work and ended up reinstalling anyway. Make sure you have good backups of data, not images as you cannot restore a BIOS/MBR image to UEFI/gpt.
Score:0
cc flag

I did this awhile ago, no problems on the Ubuntu side, but did have to reinstall windows. So from memory and a few notes: Step 0 is backup and test your backups by trying a restore to see if that works.

  1. Shrink the last partition and the extended partition to give some unallocated space (33 sectors +) at the end of the disk for a backup gpt partition table. Easy.
  2. Windows reinstall created another efI partition, so be prepared to deal with that. I created an EFI partition (type EFI, boot, esp flags), populated it with the shimx64.efi, grubx64.efi, grub.cfg stub linking to the maintained grub.cfg in the Ubuntu root, and then set up the default bootloader for the device, /EFI/Boot/bootx64.efi as a copy of shimx64.efi, had grubx64.efi in the Boot directory also, so no nvram entries needed, just boot the device.

3)Ubuntu should now boot in UEFI mode UEFI! Even with the old legacy grub.cfg file! Probably a good idea to install the grub-efi package to reinstall grub officially. Note I could not get Windows to boot (directly -- of course the legacy grub chainloader syntax would not work).

4)Reinstall Windows, and it makes another EFI. Copy over the files needed to the EFI you want to use from the other EFI.

Basically, most of my problems in the conversion were from Windows. But I'm not proficient in what Windows requires/uses for booting so maybe that's expected. Recently, I did try a disk clone, trying to add an EFI partition to a gpt disk that didn't have one, but couldn't get Windows to boot off that EFI (had a second boot disk). Basically gave up trying to make the EFI partition first on the new disk, and will at some point, add it to the end.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.