Is there a way to automatically partition a percentage of the total capacity?

Asked by Alex Baggott

I'm creating a partman recipe for an SSD, on which I'd like to leave 10% of the total capacity unpartitioned. Is there a way to do this, or a way to tell partman to use only 90% of the total for the partitions in the recipe?

Here is what I have so far. The last partition (which is the one I'm trying to define as unpartitioned space) is formatted to ext2.

### Partitioning
# 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

# 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

###GPT
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
partman-partitioning partman-partitioning/choose_label select gpt

d-i partman-auto/expert_recipe string \
      boot-root :: \
              1 1 1 free \
                      $gptonly{ } \
                      $bios_boot{ } \
                      method{ biosgrub } \
              . \
              512 512 512 fat32 \
                      $gptonly{ } \
                      $primary{ } \
                      method{ efi } format{ } \
              . \
              100000 100084 1000000000 ext4 \
                      $gptonly{ } \
                      $primary{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext4 } \
                      mountpoint{ / } \
              . \
              4000 4004 100% linux-swap \
                      $gptonly{ } \
                      $primary{ } \
                      method{ swap } format{ } \
              . \
              10000 10010 48000 free \
                      $gptonly{ } \
                      $primary{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ free } \
              . \

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu partman-partitioning Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.