Score:0

Preseed ubuntu 21.04 help please :(

in flag

I am quite "new" with ubuntu and linux in general. I am setting up a preseed to install a 10GB Ubuntu VM. I don't really need more space. Everything works more or less well but, I don't know how the partitions work. I have read this post and I don't really understand the process. I leave the entire preseed and part of the partitions. If someone can help me to put the partitions correctly I would highly appreciate it: D. The idea is having this Partition in the preseed.

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
Sergio Rodriguez avatar
in flag
Thanks for everything
user535733 avatar
cn flag
Your question should include the Ubuntu Release (18.04? 21.04?) and the Ubuntu Flavor (Ubuntu Desktop? Ubuntu Server? Xubuntu?). Are you married to using Preseed? Or are you open to cloud-init solutions, too?
Sergio Rodriguez avatar
in flag
Hi. sorry. Is ubuntu Desktop 21.04. The problem is that it only creates the first 3 partitions. I prefer to use preseed to know where I am failing. I think the size is not putting it right. Thank you very much for your answer
user535733 avatar
cn flag
Please edit your question instead of using comments. Comments are intended to help you improve your question until it is answerable. Comments are not intended for conversation.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.