Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to set up a preseed installation that will automate most of the installation of a desktop computer with Ubuntu 13.04. Disk partitioning with LVM works fine, but I need to encrypt the drive. The documentation I read seems to indicate that simiply replacing d-i partman-auto/method string lvm with d-i partman-auto/method string crypto. But in this case, I get "An error occured while creating the keyfile." during installation.

I tried setting d-i partman-crypto/passphrase string XXX but it does not change anything. I would prefer not to have passphrase in preseed file anyway.

Error message is not very explicit (at least for me) and I cant seem to find the right documentation.

I load my preseed by customizing the desktop ISO with the following isolinux.cfg

default desktop
label desktop
  say Booting a Desktop install...
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/desktop.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --

If I do the same but based on the "server" ISO, using the isolinux.cfgbelow, the partioning works correctly, but tasksel tasksel/first multiselect ubuntu-desktop fails.

default desktop
label desktop
  say Booting a Desktop install...
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/desktop.seed initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/ram rw quiet --

Relevant section of my preseed file below:

### Partitioning
## Partitioning example
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string crypto

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-lvm/guided_size string max

#d-i partman-auto/choose_recipe select boot-root
d-i partman-auto-lvm/new_vg_name string crypted
d-i partman-crypto/passphrase string XXXX
d-i partman-crypto/passphrase-again string XXXX

d-i partman-auto/expert_recipe string                     \
  boot-root ::                                            \
          128 50 128 ext4                                 \
                  $primary{ }                             \
                  $bootable{ }                            \
                  method{ format }                        \
                  format{ }                               \
                  use_filesystem{ }                       \
                  filesystem{ ext4 }                      \
                  mountpoint{ /boot }                     \
          .                                               \
          4000 50 10000 ext4                              \
                  $defaultignore{ }                       \
                  $lvmok{ }                               \
                  lv_name{ root }                         \
                  method{ format }                        \
                  format{ }                               \
                  use_filesystem{ }                       \
                  filesystem{ ext4 }                      \
                  mountpoint{ / }                         \
          .                                               \
          4096 50 4096 linux-swap                         \
                  $defaultignore{ }                       \
                  $lvmok{ }                               \
                  lv_name{ swap }                         \
                  method{ swap } format{ }                \
          .                                               \
          1000 50 1000000 ext4                            \
                  $defaultignore{ }                       \
                  $lvmok{ }                               \
                  lv_name{ home }                         \
                  method{ format }                        \
                  format{ }                               \
                  use_filesystem{ }                       \
                  filesystem{ ext4 }                      \
                  mountpoint{ /home }                     \
         .

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
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
d-i partman/choose_partition select finish

d-i partman/mount_style select label
share|improve this question

2 Answers 2

Same preseed based on the ubuntu server CD seems to work. I dont really understand why yet, but I'm not going to complain...

While customizing the server CD, I use the following isolinux.cfg:

default desktop
label desktop
  say Booting a Desktop install...
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/desktop.seed initrd=/install/initrd.gz ramdisk_size=16384 root=/dev/ram rw quiet --
share|improve this answer

Change this:

d-i partman-crypto/passphrase string XXXX
d-i partman-crypto/passphrase-again string XXXX

to this:

d-i partman-crypto/passphrase password XXXX
d-i partman-crypto/passphrase-again password XXXX

..based on this documentation: https://wiki.ubuntu.com/Enterprise/WorkstationAutoinstallPreseed

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.