So my question is, Is it possible to install the EFI partition onto both drives when doing a seed install on Ubuntu? That way if one drive goes, the relevant efi partition/data is there on the second drive, and it can just boot off that. Or is it only possible to install it to the first drive. Here's my working seed file to install it only to the first drive, setup RAID 1 and LVM. But I'd like to know how to do both
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/method string raid
d-i partman-auto-lvm/new_vg_name string vg0
d-i partman-auto-lvm/guided_size string 90%
d-i partman-auto/expert_recipe string \
efi-lvm :: \
1 1 1 free \
$bios_boot{ } \
method{ biosgrub } \
. \
256 10 256 fat32 \
$primary{ } \
$lvmignore{ } \
method{ efi } \
format{ } \
.\
20000 30 1000000000 raid \
\$lvmignore{ } \
\$primary{ } \
method{ raid } \
.\
20000 50 400000 ext4 \
\$defaultignore{ } \
\$lvmok{ } \
lv_name{ root } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } \
label{ Root } \
.\
2048 40 2048 swap \
\$defaultignore{ } \
\$lvmok{ } \
lv_name{ swap } \
method{ swap } \
format{ } \
.
d-i partman-auto-raid/recipe string \
1 2 0 lvm - /dev/sda2#/dev/sdb2 \
.
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman-md/confirm_nooverwrite boolean true
d-i partman/confirm_nooverwrite boolean true
d-i mdadm/boot_degraded boolean true
I also have the following in ny seed file to sum up the drives and trash any lvm bits.
d-i partman/early_command \
string debconf-set partman-auto/disk "\$(list-devices disk | head -n1)"
d-i partman/early_command string vgs -separator=: -noheadings | cut -f1 -d: | while read vg ; do vgchange -an \$vg ; done ; pvs -separator=: -noheadings | cut -f1 -d: | while read pv ; do pvremove -ff -y \$pv ; done