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


8

我尝试使用专家配方为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

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

Answers:


12

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    

其他提示:


添加了更多提示。
S19N 2012年

实际上,这是一个按正确顺序提供正确选项的问题……谢谢您引导我朝正确的方向前进。我将在单独的答案中发布我的工作配置。
艾萨克(Isaac)

6

我使用Ubuntu 12.04 LTS版本的2美分。似乎也有必要添加

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的配置完全相同,而且–您猜对了!–在同一台机器上运行。尝试了新分区和具有现有分区的分区。当然,在尝试重新运行“成功测试”的ISO之前,我已经尝试了其他所有方法。


5

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

d-i partman-lvm/confirm_nooverwrite boolean true是我的预置文件中唯一缺少的行,并添加了该行为我解决了该问题。谢谢。
Flimzy
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.