我正在尝试生成半自动化的 Ubuntu 安装。但是我在分区方面遇到了一些与预置文件有关的问题。
我希望发生的事情是:
- 跳过用户通常指定引导(包含所有不同变体)或手动分区的菜单
- 询问用户要使用哪个磁盘(如果我们有多个磁盘)
- 使用预置中指定的分区配方
目前我拥有的是:
### Partitioning
# In addition, you'll need to specify the method to use.
# The presently available methods are:
# - regular: use the usual partition types for your architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto/method string regular
d-i partman-auto/init_automatically_partition select Guided - use entire disk
# 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-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /usr, /var, and /tmp partitions
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
1 1 1 free \
$bios_boot{ } \
method{ biosgrub } \
. \
256 40 256 fat32 \
$primary{ } \
$lvmignore{ } \
method{ efi } \
format{ } \
. \
4096 4096 4096 linux-swap \
method{ swap } format{ } \
. \
100 10000 100000000 ext4 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
# This makes partman automatically partition without confirmation.
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
# Ask user if existing partitions need to be removed!
d-i partman/confirm boolean false
d-i partman-md/confirm boolean false
d-i partman-lvm/device_remove_lvm boolean false
d-i partman/confirm_nooverwrite boolean false
d-i partman-md/confirm_nooverwrite boolean false
d-i partman-lvm/confirm_nooverwrite boolean false
这个预置的问题是,即使我已经指定了“选择引导 - 使用整个磁盘”,它仍然使用第一个磁盘以及该磁盘上可用的剩余空间,而不是使用整个磁盘。
有人知道我该如何解决这个问题吗?
谢谢。