EFI and working LVM partman-auto/expert_recipe?

8,308

You need to create an EFI system partition. Then the installer will mount it at /boot/efi.

Adding something to effect of ...

 1 1 1 free            \
    $bios_boot{ }       \
    method{ biosgrub }  \
.                       \
256 40 256 fat32        \
    $primary{ }         \
    $lvmignore{ }       \
    method{ efi }       \
    format{ }           \
.

... at the beginning of your expert_recipe will create a 256MB partition (/dev/sda1 for example) that will be set up for EFI. There's also 1MB of free space before the first partition (priority 1). This is needed if you want to have GRUB install on a system that is partitioned with GPT, since GPT extends beyond the size of the 512K MBR.

Share:
8,308
farhany
Author by

farhany

Updated on September 18, 2022

Comments

  • farhany
    farhany over 1 year

    I have an LVM based recipe that used to work on non-EFI based systems. How do I recreate the same recipe so that it works in EFI/UEFI mode?

    I have the following recipe right now (and I've tried others too), but it fails with the message: "The attempt to mount a file system with type vfat in SCSI5 (2,0,0), partition #1 (sda) at /boot/efi failed."

    d-i partman-auto/expert_recipe string                        \
      boot-root-swap ::                                      \
              200 50 200 ext2                                \
                      $primary{ }                            \
                      $bootable{ }                           \
                      method{ format } format{ }             \
                      use_filesystem{ } filesystem{ ext2 }   \
                      mountpoint{ /boot }                    \
              .                                              \
              48000 70 1000000000 ext4                       \
                      $defaultignore{ }                      \
                      $lvmok{ }                              \
                      lv_name{ base }                        \
                      method{ format }                       \
                      format{ }                              \
                      use_filesystem{ }                      \
                      filesystem{ ext4 }                     \
                      mountpoint{ / }                        \
              .                                              \
              8000 60 24000 linux-swap                       \
                      $defaultignore{ }                      \
                      $lvmok{ }                              \
                      lv_name{ swap }                        \
                      method{ swap }                         \
                      format{ }                              \
              .