This message was deleted.
# elemental
a
This message was deleted.
s
Yes, you can make them smaller nothing prevents you from doing that beyond the fact they should be big enough to store multiple OS images. I'd say the bare minimum should stated as something like 4 times the size of the OS for image for state partition and 3 times the image size for the recovery partition. Reason for that is to be capable to keep the old system on one side. Then on another front we also need to extract the OS image into a temporary directory, apply changes if needed and then sync to a new image file, so that the root-tree to install lives twice in the FS even if it is just for a few minutes.
a
Thank you David, super helpful
s
In case you wonder how to apply the partitions configuration you can do it from the
SeedImage
resource cloud-config. You can't form the
MachineRegistration
resource as the
cloud-config
there is actually applied on first boot after the installation and at that time the partitions are already done. You need to influence the installation itself. For that you could create a seed image similar to the following:
Copy code
apiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
kind: SeedImage
metadata:
  name: custom-partitions-iso
  namespace: fleet-default
spec:
  cloud-config:
    write_files:
    - path: /etc/elemental/config.d/partitions.yaml
      content: |
        install:
          partitions:
            recovery:
              size: 8192
            state:
              size: 16384
  baseImage: <http://registry.suse.com/suse/sle-micro-iso/5.5:2.0.4|registry.suse.com/suse/sle-micro-iso/5.5:2.0.4> 
  registrationRef:
    name: <machine-registration-name-goes-here>
    namespace: fleet-default
Partition sizes are always in MB