The Ubuntu installer defaults to a MBR drive setup when a UEFI BIOS isn't detected (such as when the hardware doesn't support EFI/is too old). It still uses LVM as the automatic partition scheme.
In Fedora there's a way to force the installer using a boot flag (inst.gpt) to create a GPT drive with LVM.
There's not currently a way to do this on Ubuntu so how do I convert the MBR drive to GPT with a LVM scheme, post-install? Currently the only documentation I have found (http://www.rodsbooks.com/gdisk/mbr2gpt.html) does not cover LVM setups (encrypted or not).
The setup I am attempting this on is Ubuntu 16.04.6 on a Dell Latitude E6400 (manufactured in 2009, it doesn't have EFI) but this would apply to any non-EFI system where the user wants to use GPT rather than MBR. Currently what happens when I run the installer and choose LVM (encrypted) is that the installer creates the scheme with MBR.
While some of what the answer here says may apply https://askubuntu.com/a/85857/39237 it does not cover LVM (encrypted or not).
Please note the answer I'm looking for doesn't necessarily need to cover encrypted LVM setups (it may not even be possible, but i am not 100% certain on this yet). An answer that covers an unencrypted LVM setup would be okay.
All you have to do is remove the old table (which doesn't break filesystems, but does break bootloader), then make a new one, with the same start sectors for all partitions with data (lvm, filesystems, etc.).
You could probably do this in the running system, but you'll get warnings and errors (on redhat distros, gparted is patched/configured to be idiot proof and stop you, but sgdisk and probably gdisk works). You should do it in a LIVE or rescue boot.
bios_grub
flag on (parted /dev/sdX set 1 bios_grub on
), or boot in UEFI mode and create an ESP partition (formatted withmkfs.vfat -F 32 ...
and esp flag on:parted /dev/sdX set 1 esp on
). Or you can create both and boot either at any time. (I would put bios_grub before ESP, and haven't tested the other way around). This is NOT your/boot
partition... it's in addition.grub-install ...
(if the distro doesn't figure out the rest automatically, here it is fullygrub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck --no-floppy /dev/sdX
), or use other EFI things, not grub.Use
gparted
or another partitioning tool from the live cd to format the drive and create a GPT partition table, then install Ubuntu. It will keep the existing partition table.