2

I am trying to configure a preseed image using RAID + encryption. I originally wanted to do this without LVM, however it does not seem (at least with encryption) that this is possible. I simply want to know if this is even possible via preseed -- that is, to have both RAID and encryption partitioned. All the documentation I'm seeing states (from what I can tell) that you can only have either RAID or encryption. I'm not seeing any way to preseed both.

FWIW, here is what I've used for LVM+encryption:

### Disk Configuration
d-i     partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
d-i partman-auto/method string crypto
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string crypt
d-i partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string                         \
      root-encrypted ::                                       \
              1000 1000 1000 ext3                                \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              500 10000 1000000000 ext4                       \
                      $lvmok{ } lv_name{ root }               \
                      in_vg { crypt }                         \
                      $primary{ }                             \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .                                               

d-i partman-md/device_remove_md boolean true
d-i partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

And this is what I've tested that works for LVM+RAID:

### Disk Configuration
d-i     partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
d-i     partman-auto/method string raid
d-i     partman-lvm/device_remove_lvm boolean true
d-i     partman-md/device_remove_md boolean true
d-i     partman-lvm/confirm boolean true
d-i     partman-auto/choose_recipe select boot-root
d-i     partman-auto-lvm/new_vg_name string cryptroot
d-i     partman-auto/expert_recipe string        \
           boot-root ::                          \
             1024 30 1024 raid                   \
                $lvmignore{ }                    \
                $primary{ } method{ raid }       \
             .                                   \
             10000 35 20000 raid          \
                $lvmignore{ }                    \
                $primary{ } method{ raid }       \
             .                                   \
             10000 35 20000 ext4            \
                $defaultignore{ }                \
                $lvmok{ }                        \
                lv_name{ root }                  \
                method{ format }                 \
                format{ }                        \
                use_filesystem{ }                \
                filesystem{ ext4 }               \
                mountpoint{ / }                  \
             .
d-i partman-auto-raid/recipe string                                   \
    10 6 0 ext4 /boot                                                 \
          /dev/sda1#/dev/sdb1#/dev/sdc1#/dev/sdd1#/dev/sde1#/dev/sdf1 \
          --layout#n6                                                 \
    .                                                                 \
    10 6 0 lvm -                                                      \
          /dev/sda2#/dev/sdb2#/dev/sdc2#/dev/sdd2#/dev/sde2#/dev/sdf2 \
          --layout#n6                                                 \
    .                               
d-i     mdadm/boot_degraded boolean false
d-i     partman-md/confirm boolean true
d-i     partman-partitioning/confirm_write_new_label boolean true
d-i     partman-basicfilesystems/no_swap boolean false
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

I suppose, I'm trying to meld the two, and I've tried a few different combinations but not have worked out. Essentially, I believe you can have only either partman-auto/method string crypt or partman-auto/method string raid but not both. Can anyone confirm or deny this for me? Thanks in advance.

Your Answer

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

Browse other questions tagged or ask your own question.