8

I try to use an expert recipe configuring lvm for debian 6.0.5 netinstall. I don't want to be asked any questions, but it keeps asking me "Write the changes to disks and configure LVM?"

Here is part of my preseed.cfg:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto-lvm/new_vg_name string vg00
d-i partman-auto/expert_recipe string                         \
  boot-root ::                                            \
          128 50 128 ext2                                 \
                  $primary{ } $bootable{ }                \
                  method{ format } format{ }              \
                  use_filesystem{ } filesystem{ ext2 }    \
                  mountpoint{ /boot }                     \
          .                                               \
          10000 50 10000 ext4                             \
                  $defaultignore{ }                       \
                  $lvmok{ }                               \
                  lv_name{ root }                         \
                  method{ format }                        \
                  format{ }                               \
                  use_filesystem{ }                       \
                  filesystem{ ext4 }                      \
                  mountpoint{ / }                         \
         .                                                \
          2048 90 2048 linux-swap                         \
                  method{ swap } format{ }                \
          .                                               \
          10000 50 10000 ext4                             \
                  $defaultignore{ }                       \
                  $lvmok{ }                               \
                  lv_name{ var }                          \
                  method{ format }                        \
                  format{ }                               \
                  use_filesystem{ }                       \
                  filesystem{ ext4 }                      \
                  mountpoint{ /var }                      \
         .                                                
d-i partman-lvm/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/confirm_nooverwrite boolean true
d-i partman/choose_partition select finish
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/confirm_write_changes_to_disks_and_configure_lvm boolean true
d-i partman/choose_partition \
   select Finish partitioning and write changes to disk

This looks like a know problem, I am thinking of posts likes this, but the suggested solution seems not to work for me. Any hints?

3 Answers 3

12

At http://www.debian.org/releases/stable/i386/apbs04.html.en it says

d-i partman/choose_partition select finish

instead of

d-i partman/choose_partition \
  select Finish partitioning and write changes to disk

And also adds:

d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true    

Other hints:

2
  • More hints added.
    – S19N
    Aug 8, 2012 at 9:44
  • Actually, it was a question of having the right options in the right order ... thank you for leading me into the right direction. I'll post my working config in a seperate answer.
    – Isaac
    Aug 13, 2012 at 14:25
6

My 2 cents with Ubuntu 12.04 LTS variation. It seems to be necessary to also add

d-i partman/confirm_nooverwrite boolean true
d-i partman-md/confirm_nooverwrite boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

Without the last two lines, the installation worked unattended on some VirtualBox VMs, while it didn't on others! The VMs were identically configured and – you guessed it! – running on the same machine. Both new and the ones with existing partitions were tried. Of course, I've tried everything else before I tried to re-run a "successfully tested" ISO.

5

Here is how I got my automatic partitioning working, thanks to S19N:

    ### Partitioning
    # Specify a disk to partition. The device name
    # can be given in either devfs or traditional non-devfs format.
    d-i partman-auto/disk string /dev/sda
    # In addition, you'll need to specify the method to use.
    # The presently available methods are: "regular", "lvm" and "crypto"
    d-i partman-auto/method string lvm

    # If one of the disks that are going to be automatically partitioned
    # contains an old LVM configuration, the user will normally receive a
    # warning. This can be preseeded away...
    d-i partman-auto/purge_lvm_from_device boolean true

    # http://cptyesterday.wordpress.com/2012/06/17/notes-on-using-expert_recipe-in-debianubuntu-preseed-files/
    d-i partman-auto/choose_recipe select boot-root
    d-i partman-auto-lvm/new_vg_name string vg00


    # You can put an entire recipe into the preconfiguration file in one
    # (logical) line. 
    # This creates 
    # a 128MB ext2 formatted partitin mounted at /boot
    # the rest will be used as a physical volume. Furthermore,
    # a 10GB ext4 formated LV mounted at /, and
    # a 10GB ext4 formated LV mounted at /var
    # will be created
    d-i partman-auto/expert_recipe string                         \
          boot-root ::                                            \
                  128 50 128 ext2                                 \
                          $primary{ } $bootable{ }                \
                          method{ format } format{ }              \
                          use_filesystem{ } filesystem{ ext2 }    \
                          mountpoint{ /boot }                     \
                  .                                               \
                  10000 50 10000 ext4                             \
                          $defaultignore{ }                       \
                          $lvmok{ }                               \
                          lv_name{ root }                         \
                          method{ format }                        \
                          format{ }                               \
                          use_filesystem{ }                       \
                          filesystem{ ext4 }                      \
                          mountpoint{ / }                         \
                 .                                                \
                  2048 90 2048 linux-swap                         \
                          method{ swap } format{ }                \
                  .                                               \
                  10000 50 10000 ext4                             \
                          $defaultignore{ }                       \
                          $lvmok{ }                               \
                          lv_name{ var }                          \
                          method{ format }                        \
                          format{ }                               \
                          use_filesystem{ }                       \
                          filesystem{ ext4 }                      \
                          mountpoint{ /var }                      \
                 .

    # Write the changes to disks and configure LVM?
    d-i partman/confirm boolean true
    d-i partman-lvm/confirm boolean true
    d-i partman-lvm/confirm_nooverwrite boolean true

    # http://ubuntuforums.org/showthread.php?p=9626883
    d-i partman-lvm/device_remove_lvm boolean true
    #d-i partman-lvm/confirm boolean true

    # This makes partman automatically partition without confirmation.
    d-i partman/choose_partition \
          select Finish partitioning and write changes to disk
    d-i partman/confirm_nooverwrite boolean true
1
  • d-i partman-lvm/confirm_nooverwrite boolean true is the only line that was missing from my preseed file, and adding it took care of the issue for me. Thanks.
    – Flimzy
    Dec 4, 2012 at 23:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .