请预先安装 ubuntu 21.04 帮助:(

请预先安装 ubuntu 21.04 帮助:(

我对 ubuntu 和 linux 还很“陌生”。我正在设置一个预置来安装 10GB 的 Ubuntu VM。我真的不需要更多空间。一切都或多或少地运行良好,但我不知道分区是如何工作的。我读过这篇文章,但我真的不明白这个过程。我留下了整个预置和部分分区。如果有人能帮助我正确地放置分区,我将不胜感激:D。这个想法是这样的分割在预种子中。

My preseed
# Alternatively, you may specify a disk to partition. If the system has only
# one disk the installer will default to using that, but otherwise the device
# name must be given in traditional, non-devfs format (so e.g. /dev/sda
# and not e.g. /dev/discs/disc0/disc).
# For example, to use the first SCSI/SATA hard disk:
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: 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 lvm 10 GB
d-i partman-auto/method string regular

# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max

# 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
d-i partman-lvm/confirm_nooverwrite 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, /var, and /tmp partitions
d-i partman-auto/choose_recipe select boot-root

# Or provide a recipe of your own...
# If you have a way to get a recipe file into the d-i environment, you can
# just point at it.
#d-i partman-auto/expert_recipe_file string /hd-media/recipe

# If not, you can put an entire recipe into the preconfiguration file in one
# (logical) line. This example creates a small /boot partition, suitable
# swap, and uses the rest of the space for the root partition:
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \

    499 499 500 ext4                      \
    \$defaultignore{ }                    \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ /boot }                   \
    .                                     \
    1000 1000 1000  ext4                  \
    \$lvmok{ }                            \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ / }                       \
    .                                     \
    2500 2000 2500 \$default_filesystem   \
    \$lvmok{ }                            \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ /var }                    \
    .                                     \
                                          \
    1000 900 1000 \$default_filesystem    \
    \$lvmok{ }                            \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ /tmp }                    \
    .
                                          \
    2000 1000 2500 \$default_filesystem    \
    \$lvmok{ }                            \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ /usr }                    \
    .
                                          \
    1000 900 1000 \$default_filesystem    \
    \$lvmok{ }                            \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ /var/log }                    \
    .

                                          \
    127 127 127 \$default_filesystem    \
    \$lvmok{ }                            \
    method{ format }                      \
    format{ }                             \
    use_filesystem{ }                     \
    filesystem{ ext4 }                    \
    mountpoint{ /var/log/audit }                    \
    .

    1000 1500 1500 \$default_filesystem   \
    \$lvmok{ }                            \
    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

相关内容