0

I'm using the following partman settings for automated installs of VMs for some years now:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman/alignment string "optimal"
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              64 512 300% linux-swap                          \
                      $primary{ }                             \
                      method{ swap } format{ }                \
              .                                               \
              500 10000 1000000000 ext4                       \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .
d-i partman/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

This creates a small swap partition at the beginning and uses the rest of the disk for the root partition. This works well and allows easy partition extension when I need to increase the size of the virtual disk.

Now I'm trying to adapt this recipe to install a number of identical bare metal servers. To do that I just switched the partitions and set the sizes to more reasonable values for a machine with 256GB RAM and 460GB system disk (SSDs in a hardware RAID1, but that shouldn't matter):

  boot-root ::                                            \
          32768 65536 1000000000 ext4                     \
                  $primary{ } $bootable{ }                \
                  method{ format } format{ }              \
                  use_filesystem{ } filesystem{ ext4 }    \
                  mountpoint{ / }                         \
          .                                               \
          16384 16384 65536 linux-swap                    \
                  $primary{ }                             \
                  method{ swap } format{ }                \
          .                                                 

The rest of the partman* directives are identical.

As far as I understand the documentation (and additional posts like this) this should create a large root partition that spans nearly the entire disk, with a swap partition between 16 and 64 GB at the end.

Well, it doesn't. It creates a 450MB partition, followed by a 460GB swap partition.

enter image description here

When I install the same machine with the kickstart for VMs, the partitions are created properly as defined in the kickstart file:

enter image description here

So, what am I doing wrong with the recipe for the bare metal machine?

If it matters, the install iso is based on the Ubuntu 16.04.5 server iso.

This question has an open bounty worth +200 reputation from Gerald Schneider ending in 6 days.

This question has not received enough attention.

  • Did you try to set the maximum size for the root-fs to -1? Please also add the output of parted /dev/sda print or fdisk -l /dev/sda, not sure which tool is available during install. – Thomas 10 hours ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.