debian 6 preseeding 一直询问“将更改写入磁盘并配置 LVM?”

debian 6 preseeding 一直询问“将更改写入磁盘并配置 LVM?”

我尝试使用专家配方为 debian 6.0.5 netinstall 配置 lvm。我不想被问任何问题,但它一直问我“将更改写入磁盘并配置 LVM?”

这是我的 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

这看起来像是一个新问题,我正在考虑帖子喜欢这个,但建议的解决方案似乎对我不起作用。有什么提示吗?

答案1

http://www.debian.org/releases/stable/i386/apbs04.html.en它说

d-i partman/choose_partition select finish

代替

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

并且还补充道:

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

其他提示:

答案2

我对 Ubuntu 12.04 LTS 版本的看法。似乎还需要添加

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

如果没有最后两行,安装在某些 VirtualBox VM 上可以无人值守地运行,而在其他 VM 上则不行!这些 VM 的配置相同,而且 — 您猜对了! — 在同一台机器上运行。新 VM 和具有现有分区的 VM 都试过了。当然,在我尝试重新运行“成功测试”的 ISO 之前,我已经尝试了所有其他方法。

答案3

感谢 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

相关内容